3
0
Fork 0
forked from mirrors/nixpkgs

gcc: fix c++ headers when same triplet cross compiling

When build platform and host platform differ, but have the same
triple, the code in nixpkgs will consider it a cross compilation,
but gcc won't. This will lead some derivations to look for c++
headers in the wrong place. To solve this always output the headers
in the non-cross location, like we do for the other gcc headers
already.
This commit is contained in:
Uri Baghin 2023-06-29 09:11:55 +10:00 committed by Adam Joseph
parent 49467e7255
commit 1cf2d7357c

View file

@ -135,6 +135,8 @@ let
# We pick "/" path to effectively avoid sysroot offset and make it work
# as a native case.
"--with-build-sysroot=/"
# Same with the stdlibc++ headers embedded in the gcc output
"--with-gxx-include-dir=${placeholder "out"}/include/c++/${version}/"
]
# Basic configuration