gcc: fix cross compilation to musl32

This commit is contained in:
Symphorien Gibol
2021-02-12 20:38:38 +01:00
parent 756ace721e
commit d68dee04b7
3 changed files with 13 additions and 4 deletions

View File

@@ -94,9 +94,6 @@ let
# In uclibc cases, libgomp needs an additional '-ldl'
# and as I don't know how to pass it, I disable libgomp.
"--disable-libgomp"
] ++ lib.optionals (targetPlatform.libc == "musl") [
# musl at least, disable: https://git.buildroot.net/buildroot/commit/?id=873d4019f7fb00f6a80592224236b3ba7d657865
"--disable-libmpx"
] ++ lib.optional (targetPlatform.libc == "newlib") "--with-newlib"
++ lib.optional (targetPlatform.libc == "avrlibc") "--with-avrlibc"
);
@@ -181,6 +178,9 @@ let
# On Illumos/Solaris GNU as is preferred
"--with-gnu-as" "--without-gnu-ld"
]
++ lib.optional (targetPlatform.libc == "musl")
# musl at least, disable: https://git.buildroot.net/buildroot/commit/?id=873d4019f7fb00f6a80592224236b3ba7d657865
"--disable-libmpx"
++ lib.optionals (targetPlatform == hostPlatform && targetPlatform.libc == "musl") [
"--disable-libsanitizer"
"--disable-symvers"