我试图交叉编译的GNU科学图书馆(GSL,V1.16),用于ARM架构(特别是树莓派)。 我已经使用了以下配置;
CROSS=armv6j-hardfloat-linux-gnueabi
./configure --host=x86_64-pc-linux-gnu --build=$CROSS --target=$CROSS \
CC=/usr/bin/$CROSS-gcc \
CXX=/usr/bin/$CROSS-g++ \
AR=/usr/bin/$CROSS-ar \
RANLIB=/usr/bin/$CROSS-ranlib \
CFLAGS="-march=armv6 -mfloat-abi=hard -mfpu-vfp"
我收到以下错误信息:
libtool: compile: /usr/bin/armv6j-hardfloat-linux-gnueabi-gcc
-DHAVE_CONFIG_H -I. -I.. -I.. -march=armv6 -mfloat-abi=hard -mfpu=vfp
-MT read.lo -MD -MP -MF .deps/read.Tpo -c read.c -o read.o
In file included from fp.c:10:0:
fp-gnux86.c: In function 'gsl_ieee_set_mode':
fp-gnux86.c:42:15: error: '_FPU_SINGLE' undeclared (first use in this function)
fp-gnux86.c:42:15: note: each undeclared identifier is reported only once for each function it appears in
fp-gnux86.c:45:15: error: '_FPU_DOUBLE' undeclared (first use in this function)
fp-gnux86.c:48:15: error: '_FPU_EXTENDED' undeclared (first use in this function)
fp-gnux86.c:57:15: error: '_FPU_RC_NEAREST' undeclared (first use in this function)
fp-gnux86.c:60:15: error: '_FPU_RC_DOWN' undeclared (first use in this function)
fp-gnux86.c:63:15: error: '_FPU_RC_UP' undeclared (first use in this function)
fp-gnux86.c:66:15: error: '_FPU_RC_ZERO' undeclared (first use in this function)
fp-gnux86.c:76:13: error: '_FPU_MASK_DM' undeclared (first use in this function)
make[2]: *** [fp.lo] Error 1
我编译64位Linux的Gentoo系统上。 我已经使用了Gentoo工具链来建立我的交叉编译器。 什么我做错了任何指针的高度赞赏。
提前致谢!