c++cgcclibgcc

gcc won't compile missing sys/cdefs.h


Trying to compile gcc on an armhf embedded device but it halts when trying to compile libgcc with xgcc saying it can't find sys/cdefs.h

libc6 and libc6-dev are already installed and cdefs.h can be found at /usr/arm-linux-gnueabihf/sys/

how do i add /usr/arm-linux-gnueabihf to the xgcc include path?


Solution

  • Needed to add --with-float=hard to the configure line.

    This is because MULTIARCH_DIRNAME is defined based on the with-float configuration option

    MULTIARCH_DIRNAME = $(call if_multiarch,arm$(ARM_EB)-linux-gnueabi$(if $(filter hard,$(with_float)),hf))

    As pointed out by the kind fellows at gcc