libOpenCL.so使用VFP寄存器参数,而输出不使用
libOpenCL.so uses VFP register arguments, output does not
目前我正在尝试为ARM架构构建Buddhabrot但当我出现以下错误时,我陷入了困境。我希望有人能帮忙。
libOpenCL.so uses VFP register arguments, output does not
libGAL.so uses VFP register arguments, output does not
这是我的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输出
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)
这告诉您libOpenCL.so和libGAL.so使用的是硬浮点和VFP单元,但您的程序被编译为使用软浮点的程序。
使用-mfloat-abi=hard
标志,也可能使用-mfpu=vfp
标志(请参阅gcc手册页,了解可能适用的其他vfp变体)。
如果您的平台不支持硬浮点ABI,或者您的处理器没有浮点单元,则不能使用这两个库。
您的交叉编译器不支持硬浮点,请尝试arm-linux-gnueabihf,它对我有效。
相关文章:
- C++输出参数与返回值
- C++函子作为函数的输出参数
- 将ctypes c_void_p强制转换为c输出参数
- 用输出参数包装一个c++函数,以便在javascript/node中使用
- 我可以将函数的输出参数存储到unique_ptr中吗?
- 在存在错误代码的情况下输出参数与 NRVO
- 具有输出参数的QT InvoKeMethod调用函数
- 将具有std ::向量的C 函数称为Julia的输入和输出参数
- jni jiniArray 作为输出参数不会更改参数的值
- 返回容器时删除输出参数
- 通过 API 填写"std::optional"<T>,获取输出"T*"参数
- 指针或局部变量,用于函数的输出参数
- 如何在输出参数中使用基类
- 值语义与具有大数据结构的输出参数
- 当输出参数是类时,如何在C++中调用COM方法
- 如何在不破坏现有代码的情况下将输出参数添加到功能
- stl数据结构的堆栈上输出参数与返回值的效率
- C# P/调用:本机输出参数值不会到达托管代码
- 在 C++11 中将结构作为输出参数传递
- 将字符串从 C# 方法返回到输出参数中的C++函数