diff --git a/pkgs/development/compilers/gcc/4.5/default.nix b/pkgs/development/compilers/gcc/4.5/default.nix index 5d05410a7fda..12e7e23e90b6 100644 --- a/pkgs/development/compilers/gcc/4.5/default.nix +++ b/pkgs/development/compilers/gcc/4.5/default.nix @@ -332,28 +332,26 @@ stdenv.mkDerivation ({ # # Likewise, the LTO code doesn't find zlib. - CPATH = concatStrings - (intersperse ":" (map (x: "${x.dev or x}/include") - (optionals (zlib != null) [ zlib ] - ++ optionals langJava [ boehmgc ] - ++ optionals javaAwtGtk xlibs - ++ optionals javaAwtGtk [ gmp mpfr ] - ++ optional (libpthread != null) libpthread - ++ optional (libpthreadCross != null) libpthreadCross + CPATH = makeSearchPathOutput "dev" "include" ([] + ++ optional (zlib != null) zlib + ++ optional langJava boehmgc + ++ optionals javaAwtGtk xlibs + ++ optionals javaAwtGtk [ gmp mpfr ] + ++ optional (libpthread != null) libpthread + ++ optional (libpthreadCross != null) libpthreadCross - # On GNU/Hurd glibc refers to Mach & Hurd - # headers. - ++ optionals (libcCross != null && - hasAttr "propagatedBuildInputs" libcCross) - libcCross.propagatedBuildInputs))); + # On GNU/Hurd glibc refers to Mach & Hurd + # headers. + ++ optionals (libcCross != null && + hasAttr "propagatedBuildInputs" libcCross) + libcCross.propagatedBuildInputs); - LIBRARY_PATH = concatStrings - (intersperse ":" (map (x: x + "/lib") - (optionals (zlib != null) [ zlib ] - ++ optionals langJava [ boehmgc ] - ++ optionals javaAwtGtk xlibs - ++ optionals javaAwtGtk [ gmp mpfr ] - ++ optional (libpthread != null) libpthread))); + LIBRARY_PATH = makeLibraryPath ([] + ++ optional (zlib != null) zlib + ++ optional langJava boehmgc + ++ optionals javaAwtGtk xlibs + ++ optionals javaAwtGtk [ gmp mpfr ] + ++ optional (libpthread != null) libpthread); EXTRA_TARGET_CFLAGS = if cross != null && libcCross != null then [ diff --git a/pkgs/development/compilers/gcc/4.8/default.nix b/pkgs/development/compilers/gcc/4.8/default.nix index 41b29400dd86..cf06fe9567e6 100644 --- a/pkgs/development/compilers/gcc/4.8/default.nix +++ b/pkgs/development/compilers/gcc/4.8/default.nix @@ -332,8 +332,10 @@ stdenv.mkDerivation ({ else ""} ${if javaAwtGtk then "--enable-java-awt=gtk" else ""} ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""} - --with-gmp=${gmp.dev} - --with-mpfr=${mpfr.dev} + --with-gmp-include=${gmp.dev}/include + --with-gmp-lib=${gmp.out}/lib + --with-mpfr-include=${mpfr.dev}/include + --with-mpfr-lib=${mpfr.out}/lib --with-mpc=${libmpc} ${if libelf != null then "--with-libelf=${libelf}" else ""} --disable-libstdcxx-pch @@ -454,27 +456,25 @@ stdenv.mkDerivation ({ # # Likewise, the LTO code doesn't find zlib. - CPATH = concatStrings - (intersperse ":" (map (x: "${x.dev or x}/include") - (optionals (zlib != null) [ zlib ] - ++ optionals langJava [ boehmgc ] - ++ optionals javaAwtGtk xlibs - ++ optionals javaAwtGtk [ gmp mpfr ] - ++ optional (libpthread != null) libpthread - ++ optional (libpthreadCross != null) libpthreadCross + CPATH = makeSearchPathOutput "dev" "include" ([] + ++ optional (zlib != null) zlib + ++ optional langJava boehmgc + ++ optionals javaAwtGtk xlibs + ++ optionals javaAwtGtk [ gmp mpfr ] + ++ optional (libpthread != null) libpthread + ++ optional (libpthreadCross != null) libpthreadCross - # On GNU/Hurd glibc refers to Mach & Hurd - # headers. - ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" ) - libcCross.propagatedBuildInputs))); + # On GNU/Hurd glibc refers to Mach & Hurd + # headers. + ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" ) + libcCross.propagatedBuildInputs); - LIBRARY_PATH = concatStrings - (intersperse ":" (map (x: x + "/lib") - (optionals (zlib != null) [ zlib ] - ++ optionals langJava [ boehmgc ] - ++ optionals javaAwtGtk xlibs - ++ optionals javaAwtGtk [ gmp mpfr ] - ++ optional (libpthread != null) libpthread))); + LIBRARY_PATH = makeLibraryPath ([] + ++ optional (zlib != null) zlib + ++ optional langJava boehmgc + ++ optionals javaAwtGtk xlibs + ++ optionals javaAwtGtk [ gmp mpfr ] + ++ optional (libpthread != null) libpthread); EXTRA_TARGET_CFLAGS = if cross != null && libcCross != null then [ diff --git a/pkgs/development/compilers/gcc/4.9/default.nix b/pkgs/development/compilers/gcc/4.9/default.nix index f758a1e172ef..a746b7e12b33 100644 --- a/pkgs/development/compilers/gcc/4.9/default.nix +++ b/pkgs/development/compilers/gcc/4.9/default.nix @@ -463,27 +463,25 @@ stdenv.mkDerivation ({ # # Likewise, the LTO code doesn't find zlib. - CPATH = concatStrings - (intersperse ":" (map (x: "${x.dev or x}/include") - (optionals (zlib != null) [ zlib ] - ++ optionals langJava [ boehmgc ] - ++ optionals javaAwtGtk xlibs - ++ optionals javaAwtGtk [ gmp mpfr ] - ++ optional (libpthread != null) libpthread - ++ optional (libpthreadCross != null) libpthreadCross + CPATH = makeSearchPathOutput "dev" "include" ([] + ++ optional (zlib != null) zlib + ++ optional langJava boehmgc + ++ optionals javaAwtGtk xlibs + ++ optionals javaAwtGtk [ gmp mpfr ] + ++ optional (libpthread != null) libpthread + ++ optional (libpthreadCross != null) libpthreadCross - # On GNU/Hurd glibc refers to Mach & Hurd - # headers. - ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" ) - libcCross.propagatedBuildInputs))); + # On GNU/Hurd glibc refers to Mach & Hurd + # headers. + ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" ) + libcCross.propagatedBuildInputs); - LIBRARY_PATH = concatStrings - (intersperse ":" (map (x: x + "/lib") - (optionals (zlib != null) [ zlib ] - ++ optionals langJava [ boehmgc ] - ++ optionals javaAwtGtk xlibs - ++ optionals javaAwtGtk [ gmp mpfr ] - ++ optional (libpthread != null) libpthread))); + LIBRARY_PATH = makeLibraryPath ([] + ++ optional (zlib != null) zlib + ++ optional langJava boehmgc + ++ optionals javaAwtGtk xlibs + ++ optionals javaAwtGtk [ gmp mpfr ] + ++ optional (libpthread != null) libpthread); EXTRA_TARGET_CFLAGS = if cross != null && libcCross != null then [ diff --git a/pkgs/development/compilers/gcc/5/default.nix b/pkgs/development/compilers/gcc/5/default.nix index 0f8a0bbf794a..6f8a32a7bfc0 100644 --- a/pkgs/development/compilers/gcc/5/default.nix +++ b/pkgs/development/compilers/gcc/5/default.nix @@ -337,8 +337,10 @@ stdenv.mkDerivation ({ else ""} ${if javaAwtGtk then "--enable-java-awt=gtk" else ""} ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""} - --with-gmp=${gmp.dev} - --with-mpfr=${mpfr.dev} + --with-gmp-include=${gmp.dev}/include + --with-gmp-lib=${gmp.out}/lib + --with-mpfr-include=${mpfr.dev}/include + --with-mpfr-lib=${mpfr.out}/lib --with-mpc=${libmpc} ${if libelf != null then "--with-libelf=${libelf}" else ""} --disable-libstdcxx-pch @@ -458,27 +460,25 @@ stdenv.mkDerivation ({ # # Likewise, the LTO code doesn't find zlib. - CPATH = concatStrings - (intersperse ":" (map (x: "${x.dev or x}/include") - (optionals (zlib != null) [ zlib ] - ++ optionals langJava [ boehmgc ] - ++ optionals javaAwtGtk xlibs - ++ optionals javaAwtGtk [ gmp mpfr ] - ++ optional (libpthread != null) libpthread - ++ optional (libpthreadCross != null) libpthreadCross + CPATH = makeSearchPathOutput "dev" "include" ([] + ++ optional (zlib != null) zlib + ++ optionals langJava [ boehmgc ] + ++ optionals javaAwtGtk xlibs + ++ optionals javaAwtGtk [ gmp mpfr ] + ++ optional (libpthread != null) libpthread + ++ optional (libpthreadCross != null) libpthreadCross - # On GNU/Hurd glibc refers to Mach & Hurd - # headers. - ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" ) - libcCross.propagatedBuildInputs))); + # On GNU/Hurd glibc refers to Mach & Hurd + # headers. + ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" ) + libcCross.propagatedBuildInputs); - LIBRARY_PATH = concatStrings - (intersperse ":" (map (x: x + "/lib") - (optionals (zlib != null) [ zlib ] - ++ optionals langJava [ boehmgc ] - ++ optionals javaAwtGtk xlibs - ++ optionals javaAwtGtk [ gmp mpfr ] - ++ optional (libpthread != null) libpthread))); + LIBRARY_PATH = makeLibraryPath ([] + ++ optional (zlib != null) zlib + ++ optional langJava boehmgc + ++ optionals javaAwtGtk xlibs + ++ optionals javaAwtGtk [ gmp mpfr ] + ++ optional (libpthread != null) libpthread); EXTRA_TARGET_CFLAGS = if cross != null && libcCross != null then [ diff --git a/pkgs/development/compilers/gcc/6/default.nix b/pkgs/development/compilers/gcc/6/default.nix index 6a1616154cb1..57172a2d9db9 100644 --- a/pkgs/development/compilers/gcc/6/default.nix +++ b/pkgs/development/compilers/gcc/6/default.nix @@ -335,8 +335,10 @@ stdenv.mkDerivation ({ else ""} ${if javaAwtGtk then "--enable-java-awt=gtk" else ""} ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""} - --with-gmp=${gmp.dev} - --with-mpfr=${mpfr.dev} + --with-gmp-include=${gmp.dev}/include + --with-gmp-lib=${gmp.out}/lib + --with-mpfr-include=${mpfr.dev}/include + --with-mpfr-lib=${mpfr.out}/lib --with-mpc=${libmpc} ${if libelf != null then "--with-libelf=${libelf}" else ""} --disable-libstdcxx-pch @@ -456,27 +458,25 @@ stdenv.mkDerivation ({ # # Likewise, the LTO code doesn't find zlib. - CPATH = concatStrings - (intersperse ":" (map (x: "${x.dev or x}/include") - (optionals (zlib != null) [ zlib ] - ++ optionals langJava [ boehmgc ] - ++ optionals javaAwtGtk xlibs - ++ optionals javaAwtGtk [ gmp mpfr ] - ++ optional (libpthread != null) libpthread - ++ optional (libpthreadCross != null) libpthreadCross + CPATH = makeSearchPath "dev" "include" ([] + ++ optional (zlib != null) zlib + ++ optional langJava boehmgc + ++ optionals javaAwtGtk xlibs + ++ optionals javaAwtGtk [ gmp mpfr ] + ++ optional (libpthread != null) libpthread + ++ optional (libpthreadCross != null) libpthreadCross - # On GNU/Hurd glibc refers to Mach & Hurd - # headers. - ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs" ) - libcCross.propagatedBuildInputs))); + # On GNU/Hurd glibc refers to Mach & Hurd + # headers. + ++ optionals (libcCross != null && libcCross ? "propagatedBuildInputs") + libcCross.propagatedBuildInputs); - LIBRARY_PATH = concatStrings - (intersperse ":" (map (x: x + "/lib") - (optionals (zlib != null) [ zlib ] - ++ optionals langJava [ boehmgc ] - ++ optionals javaAwtGtk xlibs - ++ optionals javaAwtGtk [ gmp mpfr ] - ++ optional (libpthread != null) libpthread))); + LIBRARY_PATH = makeLibraryPath ([] + ++ optional (zlib != null) zlib + ++ optional langJava boehmgc + ++ optionals javaAwtGtk xlibs + ++ optionals javaAwtGtk [ gmp mpfr ] + ++ optional (libpthread != null) libpthread); EXTRA_TARGET_CFLAGS = if cross != null && libcCross != null then [ diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 35bd07a59d2e..ad5f72d7d604 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -4573,6 +4573,7 @@ in libcCross = if crossSystem != null then libcCross else null; isl = if !stdenv.isDarwin then isl_0_14 else null; + cloog = if !stdenv.isDarwin then cloog else null; })); gcc49 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/4.9 {