On 23.03.21 16:47, Ahmad Fatoum wrote: > Hello Renaud, > > On 23.03.21 15:44, Barbier, Renaud wrote: >>>> Could it it be related to how our toolchain got build? >>> >>> Just ran into the same issue. Cause is as Roland describes the lack of --sysroot >>> as default and that it comes in via $CC, which Kbuild doesn't expect. >>> >>> I guess this would break building kernel host tools too or how do they solve it? >>>> >>>> Not working either: >>>> [renaud@ediowsrv01]$ make tools/leds >>>> DESCEND leds >>>> arm-oe-linux-gnueabi-gcc -Wall -Wextra -g -I../../include/uapi -o uledmon uledmon.c >>>> uledmon.c:14:10: fatal error: fcntl.h: No such file or directory >>>> 14 | #include <fcntl.h> >>>> | ^~~~~~~~~ > > Thanks for trying it out. Well, this is a general incompatibility of the SDK's environment > setup script with Kbuild then. I am wondering why they decided on not having a default > --sysroot. Raising the issue upstream could shed some light on this and perhaps result > in a fix. I don't think there is anything to fix here at the barebox side. > > FTR: we use meta-ptx extensively and AFAIK we haven't run into this issue. It only > popped up when using the SDK build, so bitbake seems to do the right thing in that case. FTR: There's a pending meta-ptx fix here: https://github.com/pengutronix/meta-ptx/pull/74 The solution for now seems to be to: export TARGETCFLAGS="${TARGET_LDFLAGS}${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}" export userccflags="${TARGETCFLAGS}" It's yet unclear whether userccflags is meant to be used this way, but it works for barebox. Cheers, Ahmad > > Cheers, > Ahmad > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox