gcc6: try to fix LOCAL_INCLUDE_DIR problem w/musl
This commit is contained in:
parent
5eea9e82f4
commit
fbf41b9ee2
@ -260,6 +260,7 @@ stdenv.mkDerivation ({
|
|||||||
let
|
let
|
||||||
libc = if libcCross != null then libcCross else stdenv.cc.libc;
|
libc = if libcCross != null then libcCross else stdenv.cc.libc;
|
||||||
in
|
in
|
||||||
|
(
|
||||||
'' echo "fixing the \`GLIBC_DYNAMIC_LINKER', \`UCLIBC_DYNAMIC_LINKER', and \`MUSL_DYNAMIC_LINKER' macros..."
|
'' echo "fixing the \`GLIBC_DYNAMIC_LINKER', \`UCLIBC_DYNAMIC_LINKER', and \`MUSL_DYNAMIC_LINKER' macros..."
|
||||||
for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
|
for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
|
||||||
do
|
do
|
||||||
@ -270,6 +271,11 @@ stdenv.mkDerivation ({
|
|||||||
-e 's|define[[:blank:]]*MUSL_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define MUSL_DYNAMIC_LINKER\1 "${libc.out}\2"|g'
|
-e 's|define[[:blank:]]*MUSL_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define MUSL_DYNAMIC_LINKER\1 "${libc.out}\2"|g'
|
||||||
done
|
done
|
||||||
''
|
''
|
||||||
|
+ stdenv.lib.optionalString (targetPlatform.libc == "musl")
|
||||||
|
''
|
||||||
|
sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR'
|
||||||
|
''
|
||||||
|
)
|
||||||
else null;
|
else null;
|
||||||
|
|
||||||
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
|
# TODO(@Ericson2314): Make passthru instead. Weird to avoid mass rebuild,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user