本文介绍了libOpenCL.so 使用 VFP 寄存器参数,输出不的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

目前我正在尝试为ARM架构构建Buddhabrot但是当我收到以下错误时,我一度陷入困境.我希望有人能帮忙.

currently I am trying to build Buddhabrot for ARM architecturebut 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

这是我的生成文件

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 单元,但您的程序被编译为使用软浮点的程序.

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.

使用 -mfloat-abi=hard 标志,可能还有 -mfpu=vfp 标志(有关其他可能适用的 vfp 变体,请参阅 gcc 手册页).

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

如果您的平台不支持硬浮点 ABI,或者您的处理器没有浮点单元,则不能使用这两个库.

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.

这篇关于libOpenCL.so 使用 VFP 寄存器参数,输出不的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 18:25