libOpenCL.so uses VFP register arguments, output does not

匿名 (未验证) 提交于 2019-12-03 01:34:02

问题:

currently I am trying to build Buddhabrot for ARM architecture but I am stuck at one point when I get the following error. I hope somebody can help.

libOpenCL.so uses VFP register arguments, output does not libGAL.so uses VFP register arguments, output does not 

here's my makefile

LIBS = -lm -lOpenCL -lGAL -lGL -lGLEW -lglut -lpthread CFLAGS = -Wall -g OBJECTS = main.o environment.o input.o animate.o buddhabrot.o buddhacl.o cmodules/timer.o all: prog prog: $(OBJECTS)     c++ $(CFLAGS) -o prog $(OBJECTS) $(LIBS) %.o: %.cpp $(LIBS) clean:     rm -f *.o prog cmodules/*.o 

c++ -v output

Using built-in specs. COLLECT_GCC=c++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabi/4.6.1/lto-wrapper Target: arm-linux-gnueabi Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.6.1-9ubuntu3' --with-    bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --    prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-plugin --enable-objc-gc --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-float=softfp --with-fpu=vfpv3-d16 --with-mode=thumb --disable-werror --enable-checking=release --build=arm-linux-gnueabi --host=arm-    linux-gnueabi --target=arm-linux-gnueabi Thread model: posix gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)  

回答1:

This is telling you that libOpenCL.so and libGAL.so are using hard floating points and the VFP unit, but your program is compiled to a program that uses soft floating points.

Use the -mfloat-abi=hard flag, and possibly -mfpu=vfp flag (see the gcc man page for other vfp variants that might be suitable).

If your platform doesn't support a hard float ABI, or your processor doesn't have a floating point unit, you cannot use these two libraries.



回答2:

your cross compiler dont support hard float, try arm-linux-gnueabihf instead,it works for me.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!