gcc: disable libsanitizer, libgomp on musl

This commit is contained in:
Will Dietz 2018-01-03 00:24:27 -06:00
parent 0e16989d39
commit 15d401dcfa
5 changed files with 6 additions and 5 deletions

View File

@ -169,7 +169,7 @@ let version = "4.8.5";
# To keep ABI compatibility with upstream mingw-w64
"--enable-fully-dynamic-string"
] else
optionals (targetPlatform.libc == "uclibc") [
optionals (targetPlatform.libc == "uclibc" || targetPlatform.libc == "musl") [
# In uclibc cases, libgomp needs an additional '-ldl'
# and as I don't know how to pass it, I disable libgomp.
"--disable-libgomp"

View File

@ -160,7 +160,7 @@ let version = "4.9.4";
# To keep ABI compatibility with upstream mingw-w64
"--enable-fully-dynamic-string"
] else
optionals (targetPlatform.libc == "uclibc") [
optionals (targetPlatform.libc == "uclibc" || targetPlatform.libc == "musl") [
# libsanitizer requires netrom/netrom.h which is not
# available in uclibc.
"--disable-libsanitizer"

View File

@ -160,7 +160,7 @@ let version = "5.5.0";
# To keep ABI compatibility with upstream mingw-w64
"--enable-fully-dynamic-string"
] else
optionals (targetPlatform.libc == "uclibc") [
optionals (targetPlatform.libc == "uclibc" || targetPlatform.libc == "musl") [
# libsanitizer requires netrom/netrom.h which is not
# available in uclibc.
"--disable-libsanitizer"

View File

@ -158,7 +158,7 @@ let version = "6.4.0";
# To keep ABI compatibility with upstream mingw-w64
"--enable-fully-dynamic-string"
] else
optionals (targetPlatform.libc == "uclibc") [
optionals (targetPlatform.libc == "uclibc" || targetPlatform.libc == "musl") [
# libsanitizer requires netrom/netrom.h which is not
# available in uclibc.
"--disable-libsanitizer"
@ -399,6 +399,7 @@ stdenv.mkDerivation ({
# On Illumos/Solaris GNU as is preferred
"--with-gnu-as" "--without-gnu-ld"
]
++ optional (targetPlatform == hostPlatform && targetPlatform.libc == "musl") "--disable-libsanitizer"
;
targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null;

View File

@ -156,7 +156,7 @@ let version = "7.3.0";
# To keep ABI compatibility with upstream mingw-w64
"--enable-fully-dynamic-string"
] else
optionals (targetPlatform.libc == "uclibc") [
optionals (targetPlatform.libc == "uclibc" || targetPlatform.libc == "musl") [
# libsanitizer requires netrom/netrom.h which is not
# available in uclibc.
"--disable-libsanitizer"