Open concatime opened 4 years ago
From https://gcc.gnu.org/install/configure.html:
If you specify the --with-native-system-header-dir=dirname option then the compiler will search that directory within dirname for native system headers rather than the default /usr/include.
A patch for this issue is available on the musl mailing list: https://www.openwall.com/lists/musl/2020/03/23/1
Is there a reason why it’s not yet merged?
I was also wondering why this was happening as well, and why the dirty solution to symlink usr
to .
was needed...
So any updates on the issue? I agree with the addition of --with-native-system-header-dir=/include
because it's what's expected by users regardless if it's 100% accurate...
Hi. When building a native compiler using a cross one, I’ve found it does not search for
/include
, where musl installs its headers.Step to reproduce
Create a
config.mak
with:Build the cross and native compilers:
Build a static posix shell (dash):
Finally:
Here is the output:
As you see, neither
../include
nor/include
is in the search path. One quick and dirty fix is to create/foo/usr
folder and create a symlink withln -s ../include /foo/usr/include
.Here is a stripped output of
tree -d /foo
: