尝试在 armhf 嵌入式设备上编译 gcc,但在尝试使用 xgcc 编译 libgcc 时停止,说找不到 sys/cdefs.h
libc6 和 libc6-dev 已经安装,cdefs.h 可以在/usr/arm-linux-gnueabihf/sys/找到
如何将/usr/arm-linux-gnueabihf 添加到 xgcc 包含路径?
最佳答案
需要将 --with-float=hard
添加到配置行。
这是因为 MULTIARCH_DIRNAME 是基于 with-float 配置选项定义的
MULTIARCH_DIRNAME = $(call if_multiarch,arm$(ARM_EB)-linux-gnueabi$(if $(filter hard,$(with_float)),hf))
正如 gcc的好心人指出的那样
关于c++ - gcc 不会编译缺少的 sys/cdefs.h,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39271028/