Le 12/12/2017 à 17:19, Didier Kryn a écrit :
Hello.
I'm compiling gcc-6.3.0 in a chroot where there are no system
headers in /usr/include. This means that both the toolchain used for
build and the built compiler are sysrooted.
The compilation fails in libmpx/mpxrt/mpxrt-utils.c because
PATH_MAX isn't defined.
PATH_MAX isn't defined because gcc/include-fixed/limits.h doesn't
contain the instruction #include_next <limits.h>
The reason why this instruction isn't there is that some process
in fixincludes hasn't found /usr/include/limits.h. Touching this file
is enough to solve the issue.
It seems to me that, when the toolchain is sysrooted, fixincludes
should search the sysroot for system headers, rather than the
canonical location. Dunno how to achieve that though.
Not sure which sysroot should be searched. Maybe it's the built
compiler's sysroot. In my case they're identical.
Didier