diff options
Diffstat (limited to 'pkgs/development/compilers/gcc')
-rw-r--r-- | pkgs/development/compilers/gcc/4.8/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/4.9/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/5/default.nix | 14 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/6/default.nix | 17 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/7/default.nix | 19 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/8/default.nix | 19 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/libgomp-dont-force-initial-exec.patch | 40 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/snapshot/default.nix | 6 |
8 files changed, 98 insertions, 29 deletions
diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index ed185b4be1a2..60db368c403a 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -116,6 +116,7 @@ let version = "4.8.5"; "--enable-sjlj-exceptions" "--enable-threads=win32" "--disable-win32-registry" + "--disable-libmpx" # requires libc ] else if crossStageStatic then [ "--disable-libssp" "--disable-nls" @@ -124,8 +125,9 @@ let version = "4.8.5"; "--disable-libgomp" "--disable-libquadmath" "--disable-shared" - "--disable-libatomic" # libatomic requires libc - "--disable-decimal-float" # libdecnumber requires libc + "--disable-libatomic" # requires libc + "--disable-decimal-float" # requires libc + "--disable-libmpx" # requires libc ] else [ (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" else "--with-headers=${getDev libcCross}/include") diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index 3f13562c1b8c..361db92cb767 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -121,6 +121,7 @@ let version = "4.9.4"; "--enable-sjlj-exceptions" "--enable-threads=win32" "--disable-win32-registry" + "--disable-libmpx" # requires libc ] else if crossStageStatic then [ "--disable-libssp" "--disable-nls" @@ -129,8 +130,9 @@ let version = "4.9.4"; "--disable-libgomp" "--disable-libquadmath" "--disable-shared" - "--disable-libatomic" # libatomic requires libc - "--disable-decimal-float" # libdecnumber requires libc + "--disable-libatomic" # requires libc + "--disable-decimal-float" # requires libc + "--disable-libmpx" # requires libc ] else [ (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" else "--with-headers=${getDev libcCross}/include") diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index 497ca40c3ae6..14da38b34fb4 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -60,6 +60,7 @@ let version = "5.5.0"; ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch ++ optional noSysDirs ../no-sys-dirs.patch ++ optional langFortran ../gfortran-driving.patch + ++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch ++ optional stdenv.hostPlatform.isMusl (fetchpatch { url = https://raw.githubusercontent.com/richfelker/musl-cross-make/e84b1bd1fc12a3def33111ca6df522cd6e5ec361/patches/gcc-5.3.0/0001-musl.diff; sha256 = "0pppbf8myi2kjhm3z3479ihn1cm60kycfv60gj8yy1bs0pl1qcfm"; @@ -107,6 +108,7 @@ let version = "5.5.0"; "--enable-sjlj-exceptions" "--enable-threads=win32" "--disable-win32-registry" + "--disable-libmpx" # requires libc ] else if crossStageStatic then [ "--disable-libssp" "--disable-nls" @@ -115,8 +117,9 @@ let version = "5.5.0"; "--disable-libgomp" "--disable-libquadmath" "--disable-shared" - "--disable-libatomic" # libatomic requires libc - "--disable-decimal-float" # libdecnumber requires libc + "--disable-libatomic" # requires libc + "--disable-decimal-float" # requires libc + "--disable-libmpx" # requires libc ] else [ (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" else "--with-headers=${getDev libcCross}/include") @@ -329,7 +332,12 @@ stdenv.mkDerivation ({ # On Illumos/Solaris GNU as is preferred "--with-gnu-as" "--without-gnu-ld" ] - ++ optional (targetPlatform == hostPlatform && targetPlatform.libc == "musl") "--disable-libsanitizer" + ++ optionals (targetPlatform == hostPlatform && targetPlatform.libc == "musl") [ + "--disable-libsanitizer" + "--disable-symvers" + "libat_cv_have_ifunc=no" + "--disable-gnu-indirect-function" + ] ; targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index 3f5d3172d12f..2a7af827f2dd 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -61,6 +61,7 @@ let version = "6.4.0"; ++ optional langFortran ../gfortran-driving.patch ++ [ ../struct-ucontext.patch ../struct-sigaltstack.patch ] # glibc-2.26 ++ optional langJava [ ../struct-ucontext-libjava.patch ] # glibc-2.26 + ++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch ; javaEcj = fetchurl { @@ -105,6 +106,7 @@ let version = "6.4.0"; "--enable-sjlj-exceptions" "--enable-threads=win32" "--disable-win32-registry" + "--disable-libmpx" # requires libc ] else if crossStageStatic then [ "--disable-libssp" "--disable-nls" @@ -113,11 +115,9 @@ let version = "6.4.0"; "--disable-libgomp" "--disable-libquadmath" "--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" + "--disable-libatomic" # requires libc + "--disable-decimal-float" # requires libc + "--disable-libmpx" # requires libc ] else [ (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" else "--with-headers=${getDev libcCross}/include") @@ -337,7 +337,12 @@ stdenv.mkDerivation ({ # On Illumos/Solaris GNU as is preferred "--with-gnu-as" "--without-gnu-ld" ] - ++ optional (targetPlatform == hostPlatform && targetPlatform.libc == "musl") "--disable-libsanitizer" + ++ optionals (targetPlatform == hostPlatform && targetPlatform.libc == "musl") [ + "--disable-libsanitizer" + "--disable-symvers" + "libat_cv_have_ifunc=no" + "--disable-gnu-indirect-function" + ] ; targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; diff --git a/pkgs/development/compilers/gcc/7/default.nix b/pkgs/development/compilers/gcc/7/default.nix index 30c1611f5fb3..fd3ce8df497d 100644 --- a/pkgs/development/compilers/gcc/7/default.nix +++ b/pkgs/development/compilers/gcc/7/default.nix @@ -56,7 +56,8 @@ let version = "7.3.0"; sha256 = "0mrvxsdwip2p3l17dscpc1x8vhdsciqw1z5q9i6p5g9yg1cqnmgs"; }) ++ optional langFortran ../gfortran-driving.patch - ++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch; + ++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch + ++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch; /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; @@ -77,6 +78,7 @@ let version = "7.3.0"; "--enable-sjlj-exceptions" "--enable-threads=win32" "--disable-win32-registry" + "--disable-libmpx" # requires libc ] else if crossStageStatic then [ "--disable-libssp" "--disable-nls" @@ -85,11 +87,9 @@ let version = "7.3.0"; "--disable-libgomp" "--disable-libquadmath" "--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" + "--disable-libatomic" # requires libc + "--disable-decimal-float" # requires libc + "--disable-libmpx" # requires libc ] else [ (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" else "--with-headers=${getDev libcCross}/include") @@ -293,7 +293,12 @@ stdenv.mkDerivation ({ # On Illumos/Solaris GNU as is preferred "--with-gnu-as" "--without-gnu-ld" ] - ++ optional (targetPlatform == hostPlatform && targetPlatform.libc == "musl") "--disable-libsanitizer" + ++ optionals (targetPlatform == hostPlatform && targetPlatform.libc == "musl") [ + "--disable-libsanitizer" + "--disable-symvers" + "libat_cv_have_ifunc=no" + "--disable-gnu-indirect-function" + ] ++ optional (targetPlatform.isAarch64) "--enable-fix-cortex-a53-843419" ; diff --git a/pkgs/development/compilers/gcc/8/default.nix b/pkgs/development/compilers/gcc/8/default.nix index 727cd9cbdbd7..427fe3fdddf7 100644 --- a/pkgs/development/compilers/gcc/8/default.nix +++ b/pkgs/development/compilers/gcc/8/default.nix @@ -51,7 +51,8 @@ let version = "8.2.0"; sha256 = ""; # TODO: uncomment and check hash when available. }) */ ++ optional langFortran ../gfortran-driving.patch - ++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch; + ++ optional (targetPlatform.libc == "musl" && targetPlatform.isPower) ../ppc-musl.patch + ++ optional (targetPlatform.libc == "musl") ../libgomp-dont-force-initial-exec.patch; /* Cross-gcc settings (build == host != target) */ crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; @@ -72,6 +73,7 @@ let version = "8.2.0"; "--enable-sjlj-exceptions" "--enable-threads=win32" "--disable-win32-registry" + "--disable-libmpx" # requires libc ] else if crossStageStatic then [ "--disable-libssp" "--disable-nls" @@ -80,11 +82,9 @@ let version = "8.2.0"; "--disable-libgomp" "--disable-libquadmath" "--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" + "--disable-libatomic" # requires libc + "--disable-decimal-float" # requires libc + "--disable-libmpx" # requires libc ] else [ (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" else "--with-headers=${getDev libcCross}/include") @@ -285,7 +285,12 @@ stdenv.mkDerivation ({ # On Illumos/Solaris GNU as is preferred "--with-gnu-as" "--without-gnu-ld" ] - ++ optional (targetPlatform == hostPlatform && targetPlatform.libc == "musl") "--disable-libsanitizer" + ++ optionals (targetPlatform == hostPlatform && targetPlatform.libc == "musl") [ + "--disable-libsanitizer" + "--disable-symvers" + "libat_cv_have_ifunc=no" + "--disable-gnu-indirect-function" + ] ; targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; diff --git a/pkgs/development/compilers/gcc/libgomp-dont-force-initial-exec.patch b/pkgs/development/compilers/gcc/libgomp-dont-force-initial-exec.patch new file mode 100644 index 000000000000..afd1f7456d32 --- /dev/null +++ b/pkgs/development/compilers/gcc/libgomp-dont-force-initial-exec.patch @@ -0,0 +1,40 @@ +From 01c433f4788441c0963005b9d3fad5b2865e6651 Mon Sep 17 00:00:00 2001 +From: Will Dietz <w@wdtz.org> +Date: Mon, 24 Sep 2018 19:57:50 -0500 +Subject: [PATCH] libgomp/configure.tgt: don't force initial-exec tls-model + +--- + libgomp/configure.tgt | 17 ----------------- + 1 file changed, 17 deletions(-) + +diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt +index 74d95a570c7..b608c55f0c1 100644 +--- a/libgomp/configure.tgt ++++ b/libgomp/configure.tgt +@@ -10,23 +10,6 @@ + # XCFLAGS Add extra compile flags to use. + # XLDFLAGS Add extra link flags to use. + +-# Optimize TLS usage by avoiding the overhead of dynamic allocation. +-if test $gcc_cv_have_tls = yes ; then +- case "${target}" in +- +- *-*-k*bsd*-gnu*) +- ;; +- +- *-*-linux* | *-*-gnu*) +- XCFLAGS="${XCFLAGS} -ftls-model=initial-exec" +- ;; +- +- *-*-rtems*) +- XCFLAGS="${XCFLAGS} -ftls-model=local-exec" +- ;; +- esac +-fi +- + # Since we require POSIX threads, assume a POSIX system by default. + config_path="posix" + +-- +2.19.0 + diff --git a/pkgs/development/compilers/gcc/snapshot/default.nix b/pkgs/development/compilers/gcc/snapshot/default.nix index dd6de818117f..230409e97538 100644 --- a/pkgs/development/compilers/gcc/snapshot/default.nix +++ b/pkgs/development/compilers/gcc/snapshot/default.nix @@ -69,6 +69,7 @@ let version = "7-20170409"; "--enable-sjlj-exceptions" "--enable-threads=win32" "--disable-win32-registry" + "--disable-libmpx" # requires libc ] else if crossStageStatic then [ "--disable-libssp" "--disable-nls" @@ -77,8 +78,9 @@ let version = "7-20170409"; "--disable-libgomp" "--disable-libquadmath" "--disable-shared" - "--disable-libatomic" # libatomic requires libc - "--disable-decimal-float" # libdecnumber requires libc + "--disable-libatomic" # requires libc + "--disable-decimal-float" # requires libc + "--disable-libmpx" # requires libc ] else [ (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" else "--with-headers=${getDev libcCross}/include") |