normad
normad

Reputation: 115

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?

Upvotes: 3

Views: 3027

Answers (2)

normad
normad

Reputation: 115

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

Upvotes: 3

user3629249
user3629249

Reputation: 16540

add the parameter: -I/usr/arm-linux-gnueabihf to the compile statement

Upvotes: 1

Related Questions