我正在使用 ARM 的10.3-2021.07 GCC 工具链对 Raspberry Pi 4B 进行交叉编译(特别是这个文件未压缩到ARMGCC
. 我还使用最新的 Raspberry OS映像作为 sysroot(循环安装到RPISYSROOT
)。主机是 Windows 主机上的 Ubuntu Xenial VM。
使用此编译行时(为便于阅读而编辑,CFLAGS
灵感来自 Pi's /proc/cpuinfo
、gentoo和GNU):
${ARMGCC}/bin/arm-none-linux-gnueabihf-g++ -std=c++11 \
-v -w -fexceptions -fpermissive --sysroot=$RPISYSROOT \
-pipe -mcpu=cortex-a72 -mfpu=neon-vfpv4 -mfloat-abi=hard -g \
-I . -I .. -I libA/include -I libB/include \
-I ${ARMGCC}/arm-none-linux-gnueabihf/libc/usr/include \
-I ${RPISYSROOT}/usr/include/arm-linux-gnueabihf \
-c file.cpp -o obj/debug/file.o
我收到以下错误:
$ARMGCC/arm-none-linux-gnueabihf/libc/usr/include/bits/mathcalls-helper-functions.h:20:24: error: ‘__fpclassify’ has not been declared
20 | __MATHDECL_ALIAS (int, __fpclassify,, (_Mdouble_ __value), fpclassify)
| ^~~~~~~~~~~~
我看到了__fpclassify
in和 Raspberry Pi 的工具ARMGCC
git repo 的使用,它们似乎都是相同文件的所有迭代:RPISYSROOT
usr/include/math.h
usr/include/bits/mathcalls-helper-functions.h
(路径可能略有不同)。但是,这些都没有提供__fpclassify
. libm
我认为,这似乎是其中的一部分,现在已经有libc
一段时间了。我已经将libc安装到RPISYSROOT
.
我发现的唯一实现来自uCLibc,但我不认为混合 libc 实现是一个好主意。
另外,由于 Raspberry Pi 是 armhf,我应该看到这些错误吗?