diff options
Diffstat (limited to 'pkgs/development/compilers/gcc/4.9/default.nix')
-rw-r--r-- | pkgs/development/compilers/gcc/4.9/default.nix | 41 |
1 files changed, 18 insertions, 23 deletions
diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index 009f28dc66b1..ea462099d230 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -1,10 +1,8 @@ -{ stdenv, targetPackages, fetchurl, noSysDirs +{ stdenv, targetPackages, fetchurl, noSysDirs, fetchpatch , langC ? true, langCC ? true, langFortran ? false , langObjC ? targetPlatform.isDarwin , langObjCpp ? targetPlatform.isDarwin , langJava ? false -, langAda ? false -, langVhdl ? false , langGo ? false , profiledCompiler ? false , staticCompiler ? false @@ -21,13 +19,11 @@ , libXrender ? null, xproto ? null, renderproto ? null, xextproto ? null , libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null , x11Support ? langJava -, gnatboot ? null , enableMultilib ? false , enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins , name ? "gcc" , libcCross ? null , crossStageStatic ? false -, gnat ? null , libpthread ? null, libpthreadCross ? null # required for GNU/Hurd , stripped ? true , gnused ? null @@ -39,8 +35,6 @@ assert langJava -> zip != null && unzip != null && zlib != null && boehmgc != null && perl != null; # for `--enable-java-home' -assert langAda -> gnatboot != null; -assert langVhdl -> gnat != null; # We enable the isl cloog backend. assert cloog != null -> isl != null; @@ -69,12 +63,23 @@ let version = "4.9.4"; ++ optionals enableParallelBuilding [ ../parallel-bconfig.patch ./parallel-strsignal.patch ] ++ optional (targetPlatform != hostPlatform) ../libstdc++-target.patch ++ optional noSysDirs ../no-sys-dirs.patch - # The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its - # target libraries and tools. - ++ optional langAda ../gnat-cflags.patch ++ optional langFortran ../gfortran-driving.patch ++ [ ../struct-ucontext.patch ../struct-sigaltstack-4.9.patch ] # glibc-2.26 - ; + # Retpoline patches pulled from the branch hjl/indirect/gcc-4_9-branch (by H.J. Lu, the author of GCC upstream retpoline commits) + ++ builtins.map ({commit, sha256}: fetchpatch {url = "https://github.com/hjl-tools/gcc/commit/${commit}.patch"; inherit sha256;}) + [{ commit = "e623d21608e96ecd6b65f0d06312117d20488a38"; sha256 = "1ix8i4d2r3ygbv7npmsdj790rhxqrnfwcqzv48b090r9c3ij8ay3"; } + { commit = "2015a09e332309f12de1dadfe179afa6a29368b8"; sha256 = "0xcfs0cbb63llj2gbcdrvxim79ax4k4aswn0a3yjavxsj71s1n91"; } + { commit = "6b11591f4494f705e8746e7d58b7f423191f4e92"; sha256 = "0aydyhsm2ig0khgbp27am7vq7liyqrq6kfhfi2ki0ij0ab1hfbga"; } + { commit = "203c7d9c3e9cb0f88816b481ef8e7e87b3ecc373"; sha256 = "0wqn16y7wy5kg8ngfcni5qdwfphl01axczibbk49bxclwnzvldqa"; } + { commit = "f039c6f284b2c9ce97c8353d6034978795c4872e"; sha256 = "13fkgdb17lpyxfksz1zanxhgpsm0jrss9w61nbl7an4im22hz7ci"; } + { commit = "ed42606bdab1c5d9e5ad828cd6fe1a0557f193b7"; sha256 = "0gdnn8v3p03imj3qga2mzdhpgbmjcklkxdl97jvz5xia2ikzknxm"; } + { commit = "5278e062ef292fd2fbf987d25389785f4c5c0f99"; sha256 = "0j81x758wf8v7j4rx5wc1cy7yhkvhlhv3wmnarwakxiwsspq0vrs"; } + { commit = "76f1ffbbb6cd9f6ecde6c82cd16e20a27242e890"; sha256 = "1py56y6gp7fjf4f8bbsfwh5bs1gnmlqda1ycsmnwlzfm0cshdp0c"; } + { commit = "4ca48b2b688b135c0390f54ea9077ef10aedd52c"; sha256 = "15r019pzr3k0lpgyvdc92c8fayw8b5lrzncna4bqmamcsdz7vsaw"; } + { commit = "98c7bf9ddc80db965d69d61521b1c7a1cec32d9a"; sha256 = "1d7pfdv1q23nf0wadw7jbp6d6r7pnzjpbyxgbdfv7j1vr9l1bp60"; } + { commit = "3dc76b53ad896494ca62550a7a752fecbca3f7a2"; sha256 = "0jvdzfpvfdmklfcjwqblwq1i22iqis7ljpvm7adra5d7zf2xk7xz"; } + { commit = "1e961ed49b18e176c7457f53df2433421387c23b"; sha256 = "04dnqqs4qsvz4g8cq6db5id41kzys7hzhcaycwmc9rpqygs2ajwz"; } + { commit = "e137c72d099f9b3b47f4cc718aa11eab14df1a9c"; sha256 = "1ms0dmz74yf6kwgjfs4d2fhj8y6mcp2n184r3jk44wx2xc24vgb2"; }]; javaEcj = fetchurl { # The `$(top_srcdir)/ecj.jar' file is automatically picked up at @@ -264,8 +269,6 @@ stdenv.mkDerivation ({ ++ (optionals langJava [ boehmgc zip unzip ]) ++ (optionals javaAwtGtk ([ gtk2 libart_lgpl ] ++ xlibs)) ++ (optionals (targetPlatform != hostPlatform) [targetPackages.stdenv.cc.bintools]) - ++ (optionals langAda [gnatboot]) - ++ (optionals langVhdl [gnat]) # The builder relies on GNU sed (for instance, Darwin's `sed' fails with # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it. @@ -318,8 +321,6 @@ stdenv.mkDerivation ({ ++ optional langCC "c++" ++ optional langFortran "fortran" ++ optional langJava "java" - ++ optional langAda "ada" - ++ optional langVhdl "vhdl" ++ optional langGo "go" ++ optional langObjC "objc" ++ optional langObjCpp "obj-c++" @@ -357,9 +358,6 @@ stdenv.mkDerivation ({ optional javaAwtGtk "--enable-java-awt=gtk" ++ optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++ - # Ada - optional langAda "--enable-libada" ++ - (import ../common/platform-flags.nix { inherit (stdenv) lib targetPlatform; }) ++ optional (targetPlatform != hostPlatform) crossConfigureFlags ++ optional (!bootstrap) "--disable-bootstrap" ++ @@ -452,7 +450,7 @@ stdenv.mkDerivation ({ ]); passthru = - { inherit langC langCC langObjC langObjCpp langAda langFortran langVhdl langGo version; isGNU = true; }; + { inherit langC langCC langObjC langObjCpp langFortran langGo version; isGNU = true; }; inherit enableParallelBuilding enableMultilib; @@ -475,13 +473,10 @@ stdenv.mkDerivation ({ maintainers = with stdenv.lib.maintainers; [ viric peti ]; - # gnatboot is not available out of linux platforms, so we disable the darwin build - # for the gnat (ada compiler). platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.freebsd ++ - stdenv.lib.platforms.illumos ++ - optionals (langAda == false) stdenv.lib.platforms.darwin; + stdenv.lib.platforms.illumos; }; } |