diff options
author | Will Dietz <github@wdtz.org> | 2018-02-21 21:48:44 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-21 21:48:44 -0600 |
commit | ebec14212e7cd2e6fac889b55b90ff1e14512b75 (patch) | |
tree | 2dc885db0b0ff0db92023d8f5850092c78a1fffe | |
parent | 1cacfe357b580dd6e9882d89cffa0f23eb8b8f4a (diff) | |
parent | 39f61d5c02fb4271526148c77726a538c86a6145 (diff) | |
download | nixlib-ebec14212e7cd2e6fac889b55b90ff1e14512b75.tar nixlib-ebec14212e7cd2e6fac889b55b90ff1e14512b75.tar.gz nixlib-ebec14212e7cd2e6fac889b55b90ff1e14512b75.tar.bz2 nixlib-ebec14212e7cd2e6fac889b55b90ff1e14512b75.tar.lz nixlib-ebec14212e7cd2e6fac889b55b90ff1e14512b75.tar.xz nixlib-ebec14212e7cd2e6fac889b55b90ff1e14512b75.tar.zst nixlib-ebec14212e7cd2e6fac889b55b90ff1e14512b75.zip |
Merge pull request #35310 from dtzWill/fix/gcc7-musl
gcc7: fix native and cross-musl build, sync w/gcc6 fixes
-rw-r--r-- | pkgs/development/compilers/gcc/7/default.nix | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index bbf87eccac75..e8997b1efb06 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -143,6 +143,9 @@ let version = "7.3.0"; "--disable-shared" "--disable-libatomic" # libatomic requires libc "--disable-decimal-float" # libdecnumber requires libc + # maybe only needed on musl, PATH_MAX + # https://github.com/richfelker/musl-cross-make/blob/0867cdf300618d1e3e87a0a939fa4427207ad9d7/litecross/Makefile#L62 + "--disable-libmpx" ] else [ (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" else "--with-headers=${getDev libcCross}/include") @@ -166,6 +169,8 @@ let version = "7.3.0"; # In uclibc cases, libgomp needs an additional '-ldl' # and as I don't know how to pass it, I disable libgomp. "--disable-libgomp" + # musl at least, disable: https://git.buildroot.net/buildroot/commit/?id=873d4019f7fb00f6a80592224236b3ba7d657865 + "--disable-libmpx" ] ++ [ "--enable-threads=posix" "--enable-nls" @@ -268,7 +273,7 @@ stdenv.mkDerivation ({ -e 's|define[[:blank:]]*MUSL_DYNAMIC_LINKER\([0-9]*\)[[:blank:]]"\([^\"]\+\)"$|define MUSL_DYNAMIC_LINKER\1 "${libc.out}\2"|g' done '' - + stdenv.lib.optionalString (hostPlatform.libc == "musl") + + stdenv.lib.optionalString (targetPlatform.libc == "musl") '' sed -i gcc/config/linux.h -e '1i#undef LOCAL_INCLUDE_DIR' '' |