lol
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'staging' (older one)

Hydra seems OK-ish, except that some aarch64 jobs need restarting
after qt4 timing out for the first time:
https://hydra.nixos.org/eval/1412641?compare=1412561

+2055 -1571
-1
lib/default.nix
··· 41 41 generators = callLibs ./generators.nix; 42 42 misc = callLibs ./deprecated.nix; 43 43 # domain-specific 44 - sandbox = callLibs ./sandbox.nix; 45 44 fetchers = callLibs ./fetchers.nix; 46 45 47 46 # Eval-time filesystem handling
+1
lib/maintainers.nix
··· 208 208 eqyiel = "Ruben Maher <r@rkm.id.au>"; 209 209 ericbmerritt = "Eric Merritt <eric@afiniate.com>"; 210 210 ericsagnes = "Eric Sagnes <eric.sagnes@gmail.com>"; 211 + ericson2314 = "John Ericson <John.Ericson@Obsidian.Systems>"; 211 212 erictapen = "Justin Humm <justin.humm@posteo.de>"; 212 213 erikryb = "Erik Rybakken <erik.rybakken@math.ntnu.no>"; 213 214 ertes = "Ertugrul Söylemez <esz@posteo.de>";
-48
lib/sandbox.nix
··· 1 - { lib }: 2 - with lib.strings; 3 - 4 - /* Helpers for creating lisp S-exprs for the Apple sandbox 5 - 6 - lib.sandbox.allowFileRead [ "/usr/bin/file" ]; 7 - # => "(allow file-read* (literal \"/usr/bin/file\"))"; 8 - 9 - lib.sandbox.allowFileRead { 10 - literal = [ "/usr/bin/file" ]; 11 - subpath = [ "/usr/lib/system" ]; 12 - } 13 - # => "(allow file-read* (literal \"/usr/bin/file\") (subpath \"/usr/lib/system\"))" 14 - */ 15 - 16 - let 17 - 18 - sexp = tokens: "(" + builtins.concatStringsSep " " tokens + ")"; 19 - generateFileList = files: 20 - if builtins.isList files 21 - then concatMapStringsSep " " (x: sexp [ "literal" ''"${x}"'' ]) files 22 - else if builtins.isString files 23 - then generateFileList [ files ] 24 - else concatStringsSep " " ( 25 - (map (x: sexp [ "literal" ''"${x}"'' ]) (files.literal or [])) ++ 26 - (map (x: sexp [ "subpath" ''"${x}"'' ]) (files.subpath or [])) 27 - ); 28 - applyToFiles = f: act: files: f "${act} ${generateFileList files}"; 29 - genActions = actionName: let 30 - action = feature: sexp [ actionName feature ]; 31 - self = { 32 - "${actionName}" = action; 33 - "${actionName}File" = applyToFiles action "file*"; 34 - "${actionName}FileRead" = applyToFiles action "file-read*"; 35 - "${actionName}FileReadMetadata" = applyToFiles action "file-read-metadata"; 36 - "${actionName}DirectoryList" = self."${actionName}FileReadMetadata"; 37 - "${actionName}FileWrite" = applyToFiles action "file-write*"; 38 - "${actionName}FileWriteMetadata" = applyToFiles action "file-write-metadata"; 39 - }; 40 - in self; 41 - 42 - in 43 - 44 - genActions "allow" // genActions "deny" // { 45 - importProfile = derivation: '' 46 - (import "${derivation}") 47 - ''; 48 - }
+1 -2
nixos/lib/testing.nix
··· 113 113 --add-flags "''${vms[*]}" \ 114 114 ${lib.optionalString enableOCR 115 115 "--prefix PATH : '${ocrProg}/bin:${imagemagick}/bin'"} \ 116 - --run "testScript=\"\$(cat $out/test-script)\"" \ 117 - --set testScript '$testScript' \ 116 + --run "export testScript=\"\$(cat $out/test-script)\"" \ 118 117 --set VLANS '${toString vlans}' 119 118 ln -s ${testDriver}/bin/nixos-test-driver $out/bin/nixos-run-vms 120 119 wrapProgram $out/bin/nixos-run-vms \
+7
pkgs/applications/audio/schismtracker/default.nix
··· 9 9 sha256 = "1ny7wv2wxm1av299wvpskall6438wjjpadphmqc7c0h6d0zg5kii"; 10 10 }; 11 11 12 + preConfigure = '' 13 + # Build fails on Linux with windres. 14 + export ac_cv_prog_ac_ct_WINDRES= 15 + ''; 16 + 12 17 configureFlags = "--enable-dependency-tracking"; 13 18 14 19 buildInputs = [ alsaLib python SDL ]; 20 + 21 + enableParallelBuilding = true; 15 22 16 23 meta = { 17 24 description = "Music tracker application, free reimplementation of Impulse Tracker";
+2
pkgs/applications/networking/cluster/mesos/default.nix
··· 14 14 # src/common/command_utils.cpp 15 15 # https://github.com/NixOS/nixpkgs/issues/13783 16 16 tarWithGzip = lib.overrideDerivation gnutar (oldAttrs: { 17 + # Original builder is bash 4.3.42 from bootstrap tools, too old for makeWrapper. 18 + builder = "${bash}/bin/bash"; 17 19 buildInputs = (oldAttrs.buildInputs or []) ++ [ makeWrapper ]; 18 20 postInstall = (oldAttrs.postInstall or "") + '' 19 21 wrapProgram $out/bin/tar --prefix PATH ":" "${gzip}/bin"
+2 -2
pkgs/applications/networking/instant-messengers/hipchat/default.nix
··· 78 78 --replace /opt/HipChat4/bin/HipChat4 $out/bin/hipchat 79 79 80 80 makeWrapper $d/HipChat.bin $out/bin/hipchat \ 81 - --set HIPCHAT_LD_LIBRARY_PATH '"$LD_LIBRARY_PATH"' \ 82 - --set HIPCHAT_QT_PLUGIN_PATH '"$QT_PLUGIN_PATH"' \ 81 + --run 'export HIPCHAT_LD_LIBRARY_PATH=$LD_LIBRARY_PATH' \ 82 + --run 'export HIPCHAT_QT_PLUGIN_PATH=$QT_PLUGIN_PATH' \ 83 83 --set QT_XKB_CONFIG_ROOT ${xkeyboard_config}/share/X11/xkb \ 84 84 --set QTWEBENGINEPROCESS_PATH $d/QtWebEngineProcess 85 85
+8 -1
pkgs/applications/science/astronomy/gravit/default.nix
··· 12 12 13 13 nativeBuildInputs = [ autoconf automake ]; 14 14 15 - preConfigure = "./autogen.sh"; 15 + preConfigure = '' 16 + ./autogen.sh 17 + 18 + # Build fails on Linux with windres. 19 + export ac_cv_prog_WINDRES= 20 + ''; 21 + 22 + enableParallelBuilding = true; 16 23 17 24 meta = { 18 25 homepage = http://gravit.slowchop.com;
+1
pkgs/applications/version-management/git-and-tools/git/default.nix
··· 32 32 ./symlinks-in-bin.patch 33 33 ./git-sh-i18n.patch 34 34 ./ssh-path.patch 35 + ./git-send-email-honor-PATH.patch 35 36 ]; 36 37 37 38 postPatch = ''
+47
pkgs/applications/version-management/git-and-tools/git/git-send-email-honor-PATH.patch
··· 1 + From 9a4396ddaedaf59ebee16d69900884e990b79cdd Mon Sep 17 00:00:00 2001 2 + From: Florian Klink <flokli@flokli.de> 3 + Date: Fri, 17 Nov 2017 13:21:37 +0100 4 + Subject: [PATCH] git-send-email: honor $PATH 5 + 6 + This will search $PATH for a sendmail binary, instead of the (previously 7 + fixed) list of paths. 8 + 9 + Signed-off-by: Florian Klink <flokli@flokli.de> 10 + --- 11 + Documentation/git-send-email.txt | 5 ++--- 12 + git-send-email.perl | 3 ++- 13 + 2 files changed, 4 insertions(+), 4 deletions(-) 14 + 15 + diff --git a/Documentation/git-send-email.txt b/Documentation/git-send-email.txt 16 + index bac9014ac..b9b1f2c41 100644 17 + --- a/Documentation/git-send-email.txt 18 + +++ b/Documentation/git-send-email.txt 19 + @@ -203,9 +203,8 @@ a password is obtained using 'git-credential'. 20 + specify a full pathname of a sendmail-like program instead; 21 + the program must support the `-i` option. Default value can 22 + be specified by the `sendemail.smtpServer` configuration 23 + - option; the built-in default is `/usr/sbin/sendmail` or 24 + - `/usr/lib/sendmail` if such program is available, or 25 + - `localhost` otherwise. 26 + + option; the built-in default is to search in $PATH if such program is 27 + + available, or `localhost` otherwise. 28 + 29 + --smtp-server-port=<port>:: 30 + Specifies a port different from the default port (SMTP 31 + diff --git a/git-send-email.perl b/git-send-email.perl 32 + index 2208dcc21..8e357aeab 100755 33 + --- a/git-send-email.perl 34 + +++ b/git-send-email.perl 35 + @@ -885,7 +885,8 @@ if (defined $initial_reply_to) { 36 + } 37 + 38 + if (!defined $smtp_server) { 39 + - foreach (qw( /usr/sbin/sendmail /usr/lib/sendmail )) { 40 + + my @sendmail_paths = map {"$_/sendmail"} split /:/, $ENV{PATH}; 41 + + foreach (@sendmail_paths) { 42 + if (-x $_) { 43 + $smtp_server = $_; 44 + last; 45 + -- 46 + 2.15.0 47 +
+3 -3
pkgs/applications/window-managers/qtile/default.nix
··· 36 36 37 37 postInstall = '' 38 38 wrapProgram $out/bin/qtile \ 39 - --set QTILE_WRAPPER '$0' \ 40 - --set QTILE_SAVED_PYTHONPATH '$PYTHONPATH' \ 41 - --set QTILE_SAVED_PATH '$PATH' 39 + --run 'export QTILE_WRAPPER=$0' \ 40 + --run 'export QTILE_SAVED_PYTHONPATH=$PYTHONPATH' \ 41 + --run 'export QTILE_SAVED_PATH=$PATH' 42 42 ''; 43 43 44 44 meta = with stdenv.lib; {
+2 -2
pkgs/applications/window-managers/weston/default.nix
··· 7 7 8 8 stdenv.mkDerivation rec { 9 9 name = "weston-${version}"; 10 - version = "1.12.0"; 10 + version = "3.0.0"; 11 11 12 12 src = fetchurl { 13 13 url = "http://wayland.freedesktop.org/releases/${name}.tar.xz"; 14 - sha256 = "ac7ac2a32e3b9f50131fccded5d2326bd36b2226712d90b61999118a09af5033"; 14 + sha256 = "19936zlkb75xcaidd8fag4ah8000wrh2ziqy7nxkq36pimgdbqfd"; 15 15 }; 16 16 17 17 nativeBuildInputs = [ pkgconfig ];
+12 -6
pkgs/build-support/setup-hooks/make-wrapper.sh
··· 47 47 varName="${params[$((n + 1))]}" 48 48 value="${params[$((n + 2))]}" 49 49 n=$((n + 2)) 50 - echo "export $varName=\"$value\"" >> "$wrapper" 50 + echo "export $varName=${value@Q}" >> "$wrapper" 51 + elif [[ "$p" == "--set-default" ]]; then 52 + varName="${params[$((n + 1))]}" 53 + value="${params[$((n + 2))]}" 54 + n=$((n + 2)) 55 + echo "export $varName=\${$varName-${value@Q}}" >> "$wrapper" 51 56 elif [[ "$p" == "--unset" ]]; then 52 57 varName="${params[$((n + 1))]}" 53 58 n=$((n + 1)) ··· 63 68 n=$((n + 3)) 64 69 if test -n "$value"; then 65 70 if test "$p" = "--suffix"; then 66 - echo "export $varName=\$$varName\${$varName:+$separator}$value" >> "$wrapper" 71 + echo "export $varName=\$$varName\${$varName:+${separator@Q}}${value@Q}" >> "$wrapper" 67 72 else 68 - echo "export $varName=$value\${$varName:+$separator}\$$varName" >> "$wrapper" 73 + echo "export $varName=${value@Q}\${$varName:+${separator@Q}}\$$varName" >> "$wrapper" 69 74 fi 70 75 fi 71 76 elif [[ "$p" == "--suffix-each" ]]; then ··· 74 79 values="${params[$((n + 3))]}" 75 80 n=$((n + 3)) 76 81 for value in $values; do 77 - echo "export $varName=\$$varName\${$varName:+$separator}$value" >> "$wrapper" 82 + echo "export $varName=\$$varName\${$varName:+$separator}${value@Q}" >> "$wrapper" 78 83 done 79 84 elif [[ ("$p" == "--suffix-contents") || ("$p" == "--prefix-contents") ]]; then 80 85 varName="${params[$((n + 1))]}" ··· 82 87 fileNames="${params[$((n + 3))]}" 83 88 n=$((n + 3)) 84 89 for fileName in $fileNames; do 90 + contents="$(cat "$fileName")" 85 91 if test "$p" = "--suffix-contents"; then 86 - echo "export $varName=\$$varName\${$varName:+$separator}$(cat "$fileName")" >> "$wrapper" 92 + echo "export $varName=\$$varName\${$varName:+$separator}${contents@Q}" >> "$wrapper" 87 93 else 88 - echo "export $varName=$(cat "$fileName")\${$varName:+$separator}\$$varName" >> "$wrapper" 94 + echo "export $varName=${contents@Q}\${$varName:+$separator}\$$varName" >> "$wrapper" 89 95 fi 90 96 done 91 97 elif [[ "$p" == "--add-flags" ]]; then
+1 -1
pkgs/development/compilers/chicken/eggDerivation.nix
··· 37 37 wrapProgram $f \ 38 38 --set CHICKEN_REPOSITORY $CHICKEN_REPOSITORY \ 39 39 --prefix CHICKEN_REPOSITORY_EXTRA : "$out/lib/chicken/${toString chicken.binaryVersion}/:$CHICKEN_REPOSITORY_EXTRA" \ 40 - --prefix CHICKEN_INCLUDE_PATH \; \"$CHICKEN_INCLUDE_PATH\;$out/share/\" \ 40 + --prefix CHICKEN_INCLUDE_PATH \; "$CHICKEN_INCLUDE_PATH;$out/share/" \ 41 41 --prefix PATH : "$out/bin:${chicken}/bin:$CHICKEN_REPOSITORY_EXTRA:$CHICKEN_REPOSITORY" 42 42 done 43 43
+1 -1
pkgs/development/compilers/dmd/2.067.1.nix
··· 146 146 147 147 wrapProgram $out/bin/dmd \ 148 148 --prefix PATH ":" "${stdenv.cc}/bin" \ 149 - --set CC "$""{CC:-$CC""}" 149 + --set-default CC "$CC" 150 150 151 151 cd $out/bin 152 152 tee dmd.conf << EOF
+1 -1
pkgs/development/compilers/dmd/default.nix
··· 152 152 153 153 wrapProgram $out/bin/dmd \ 154 154 --prefix PATH ":" "${stdenv.cc}/bin" \ 155 - --set CC "$""{CC:-$CC""}" 155 + --set-default CC "$CC" 156 156 157 157 cd $out/bin 158 158 tee dmd.conf << EOF
+130 -109
pkgs/development/compilers/gcc/4.5/default.nix
··· 67 67 gccArch = stdenv.lib.attrByPath [ "gcc" "arch" ] null targetPlatform; 68 68 gccCpu = stdenv.lib.attrByPath [ "gcc" "cpu" ] null targetPlatform; 69 69 gccAbi = stdenv.lib.attrByPath [ "gcc" "abi" ] null targetPlatform; 70 - withArch = if gccArch != null then " --with-arch=${gccArch}" else ""; 71 - withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else ""; 72 - withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else ""; 73 70 crossMingw = (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"); 74 71 75 72 crossConfigureFlags = 76 - withArch + 77 - withCpu + 78 - withAbi + 73 + optional (gccArch != null) "--with-arch=${gccArch}" ++ 74 + optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ 75 + optional (gccAbi != null) "--with-abi=${gccAbi}" ++ 79 76 # Ensure that -print-prog-name is able to find the correct programs. 80 - " --with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" + 81 - " --with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" + 82 - (if crossMingw && crossStageStatic then 83 - " --with-headers=${libcCross}/include" + 84 - " --with-gcc" + 85 - " --with-gnu-as" + 86 - " --with-gnu-ld" + 87 - " --with-gnu-ld" + 88 - " --disable-shared" + 89 - " --disable-nls" + 90 - " --disable-debug" + 91 - " --enable-sjlj-exceptions" + 92 - " --enable-threads=win32" + 93 - " --disable-win32-registry" 94 - else if crossStageStatic then 95 - " --disable-libssp --disable-nls" + 96 - " --without-headers" + 97 - " --disable-threads " + 98 - " --disable-libmudflap " + 99 - " --disable-libgomp " + 100 - " --disable-shared" + 101 - " --disable-decimal-float" # libdecnumber requires libc 102 - else 103 - " --with-headers=${libcCross}/include" + 104 - " --enable-__cxa_atexit" + 105 - " --enable-long-long" + 106 - (if crossMingw then 107 - " --enable-threads=win32" + 108 - " --enable-sjlj-exceptions" + 109 - " --enable-hash-synchronization" + 110 - " --enable-version-specific-runtime-libs" + 111 - " --disable-libssp" + 112 - " --disable-nls" + 113 - " --with-dwarf2" 114 - else 115 - " --enable-threads=posix" + 116 - " --enable-nls" + 117 - " --disable-decimal-float") # No final libdecnumber (it may work only in 386) 118 - ); 77 + [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" 78 + "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ 79 + (if crossMingw && crossStageStatic then [ 80 + "--with-headers=${libcCross}/include" 81 + "--with-gcc" 82 + "--with-gnu-as" 83 + "--with-gnu-ld" 84 + "--with-gnu-ld" 85 + "--disable-shared" 86 + "--disable-nls" 87 + "--disable-debug" 88 + "--enable-sjlj-exceptions" 89 + "--enable-threads=win32" 90 + "--disable-win32-registry" 91 + ] else if crossStageStatic then [ 92 + "--disable-libssp" 93 + "--disable-nls" 94 + "--without-headers" 95 + "--disable-threads" 96 + "--disable-libmudflap" 97 + "--disable-libgomp" 98 + "--disable-shared" 99 + "--disable-decimal-float" # libdecnumber requires libc 100 + ] else [ 101 + "--with-headers=${libcCross}/include" 102 + "--enable-__cxa_atexit" 103 + "--enable-long-long" 104 + ] ++ 105 + (if crossMingw then [ 106 + "--enable-threads=win32" 107 + "--enable-sjlj-exceptions" 108 + "--enable-hash-synchronization" 109 + "--enable-version-specific-runtime-libs" 110 + "--disable-libssp" 111 + "--disable-nls" 112 + "--with-dwarf2" 113 + ] else [ 114 + "--enable-threads=posix" 115 + "--enable-nls" 116 + "--disable-decimal-float" # No final libdecnumber (it may work only in 386) 117 + ])); 119 118 stageNameAddon = if crossStageStatic then "-stage-static" else 120 119 "-stage-final"; 121 120 crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; ··· 241 240 then [] 242 241 else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; 243 242 244 - configureFlags = " 245 - ${if enableMultilib then "" else "--disable-multilib"} 246 - ${if enableShared then "" else "--disable-shared"} 247 - ${if ppl != null then "--with-ppl=${ppl}" else ""} 248 - ${if cloogppl != null then "--with-cloog=${cloogppl}" else ""} 249 - ${if langJava then 250 - "--with-ecj-jar=${javaEcj} " + 243 + configureFlags = 244 + # Basic dependencies 245 + [ 246 + "--with-gmp=${gmp.dev}" 247 + "--with-mpfr=${mpfr.dev}" 248 + "--with-mpc=${libmpc}" 249 + ] ++ 250 + optional (libelf != null) "--with-libelf=${libelf}" ++ 251 + 252 + # Basic configuration 253 + [ 254 + "--disable-libstdcxx-pch" 255 + "--without-included-gettext" 256 + "--with-system-zlib" 257 + "--enable-languages=${ 258 + concatStrings (intersperse "," 259 + ( optional langC "c" 260 + ++ optional langCC "c++" 261 + ++ optional langFortran "fortran" 262 + ++ optional langJava "java" 263 + ++ optional langAda "ada" 264 + ++ optional langVhdl "vhdl" 265 + ) 266 + ) 267 + }" 268 + ] ++ 269 + optional (!enableMultilib) "--disable-multilib" ++ 270 + optional (!enableShared) "--disable-shared" ++ 271 + 272 + # Optional features 273 + optional (cloogppl != null) "--with-cloog=${cloogppl}" ++ 274 + optional (ppl != null) "--with-ppl=${ppl}" ++ 275 + 276 + # Java options 277 + optionals langJava [ 278 + "--with-ecj-jar=${javaEcj}" 251 279 252 280 # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See 253 281 # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>. 254 - "--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre " 255 - else ""} 256 - ${if javaAwtGtk then "--enable-java-awt=gtk" else ""} 257 - ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""} 258 - --with-gmp=${gmp.dev} 259 - --with-mpfr=${mpfr.dev} 260 - --with-mpc=${libmpc} 261 - ${if libelf != null then "--with-libelf=${libelf}" else ""} 262 - --disable-libstdcxx-pch 263 - --without-included-gettext 264 - --with-system-zlib 265 - --enable-languages=${ 266 - concatStrings (intersperse "," 267 - ( optional langC "c" 268 - ++ optional langCC "c++" 269 - ++ optional langFortran "fortran" 270 - ++ optional langJava "java" 271 - ++ optional langAda "ada" 272 - ++ optional langVhdl "vhdl" 273 - ) 274 - ) 275 - } 276 - ${ # Trick that should be taken out once we have a mips64el-linux not loongson2f 277 - if targetPlatform == hostPlatform && stdenv.system == "mips64el-linux" then "--with-arch=loongson2f" else ""} 278 - ${if langAda then " --enable-libada" else ""} 279 - ${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""} 280 - ${if targetPlatform != hostPlatform then crossConfigureFlags else ""} 281 - "; 282 + "--enable-java-home" 283 + "--with-java-home=\${prefix}/lib/jvm/jre" 284 + ] ++ 285 + optional javaAwtGtk "--enable-java-awt=gtk" ++ 286 + optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++ 287 + 288 + # Ada 289 + optional langAda "--enable-libada" ++ 290 + 291 + # Cross-compilation 292 + optional (targetPlatform != hostPlatform) crossConfigureFlags ++ 293 + 294 + # Platform-specific flags 295 + optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++ 296 + # Trick that should be taken out once we have a mips64el-linux not loongson2f 297 + optional (targetPlatform == hostPlatform && stdenv.system == "mips64el-linux") "--with-arch=loongson2f" 298 + ; 282 299 283 300 targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; 284 301 ··· 295 312 # If we are making a cross compiler, cross != null 296 313 NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; 297 314 dontStrip = true; 298 - configureFlags = '' 299 - ${if enableMultilib then "" else "--disable-multilib"} 300 - ${if enableShared then "" else "--disable-shared"} 301 - ${if ppl != null then "--with-ppl=${ppl.crossDrv}" else ""} 302 - ${if cloogppl != null then "--with-cloog=${cloogppl.crossDrv}" else ""} 303 - ${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""} 304 - ${if javaAwtGtk then "--enable-java-awt=gtk" else ""} 305 - ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""} 306 - --with-gmp=${gmp.crossDrv} 307 - --with-mpfr=${mpfr.crossDrv} 308 - --with-mpc=${libmpc.crossDrv} 309 - --disable-libstdcxx-pch 310 - --without-included-gettext 311 - --with-system-zlib 312 - --enable-languages=${ 313 - concatStrings (intersperse "," 314 - ( optional langC "c" 315 - ++ optional langCC "c++" 316 - ++ optional langFortran "fortran" 317 - ++ optional langJava "java" 318 - ++ optional langAda "ada" 319 - ++ optional langVhdl "vhdl" 315 + configureFlags = 316 + optional (!enableMultilib) "--disable-multilib" ++ 317 + optional (!enableShared) "--disable-shared" ++ 318 + optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++ 319 + optional javaAwtGtk "--enable-java-awt=gtk" ++ 320 + optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++ 321 + optional (ppl != null) "--with-ppl=${ppl.crossDrv}" ++ 322 + optional (cloogppl != null) "--with-cloog=${cloogppl.crossDrv}" ++ 323 + 324 + [ 325 + "--with-gmp=${gmp.crossDrv}" 326 + "--with-mpfr=${mpfr.crossDrv}" 327 + "--with-mpc=${libmpc.crossDrv}" 328 + "--disable-libstdcxx-pch" 329 + "--without-included-gettext" 330 + "--with-system-zlib" 331 + "--enable-languages=${ 332 + concatStrings (intersperse "," 333 + ( optional langC "c" 334 + ++ optional langCC "c++" 335 + ++ optional langFortran "fortran" 336 + ++ optional langJava "java" 337 + ++ optional langAda "ada" 338 + ++ optional langVhdl "vhdl" 339 + ++ optional langGo "go" 340 + ) 320 341 ) 321 - ) 322 - } 323 - ${if langAda then " --enable-libada" else ""} 324 - ${if targetplatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""} 325 - ${if targetPlatform != hostPlatform then crossConfigureFlags else ""} 326 - ''; 342 + }" 343 + ] ++ 344 + optional langAda "--enable-libada" ++ 345 + optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++ 346 + optional (targetPlatform != hostPlatform) crossConfigureFlags 347 + ; 327 348 }; 328 - 349 + 329 350 330 351 # Needed for the cross compilation to work 331 352 AR = "ar";
+188 -183
pkgs/development/compilers/gcc/4.8/default.nix
··· 108 108 javaAwtGtk = langJava && x11Support; 109 109 110 110 /* Platform flags */ 111 - platformFlags = let 112 - gccArch = stdenv.platform.gcc.arch or null; 113 - gccCpu = stdenv.platform.gcc.cpu or null; 114 - gccAbi = stdenv.platform.gcc.abi or null; 115 - gccFpu = stdenv.platform.gcc.fpu or null; 116 - gccFloat = stdenv.platform.gcc.float or null; 117 - gccMode = stdenv.platform.gcc.mode or null; 118 - withArch = if gccArch != null then " --with-arch=${gccArch}" else ""; 119 - withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else ""; 120 - withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else ""; 121 - withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else ""; 122 - withFloat = if gccFloat != null then " --with-float=${gccFloat}" else ""; 123 - withMode = if gccMode != null then " --with-mode=${gccMode}" else ""; 124 - in 125 - withArch + 126 - withCpu + 127 - withAbi + 128 - withFpu + 129 - withFloat + 130 - withMode; 111 + mkPlatformFlags = platform: let 112 + gccArch = platform.gcc.arch or null; 113 + gccCpu = platform.gcc.cpu or null; 114 + gccAbi = platform.gcc.abi or null; 115 + gccFpu = platform.gcc.fpu or null; 116 + gccFloat = platform.gcc.float or null; 117 + gccMode = platform.gcc.mode or null; 118 + in 119 + optional (gccArch != null) "--with-arch=${gccArch}" ++ 120 + optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ 121 + optional (gccAbi != null) "--with-abi=${gccAbi}" ++ 122 + optional (gccFpu != null) "--with-fpu=${gccFpu}" ++ 123 + optional (gccFloat != null) "--with-float=${gccFloat}" ++ 124 + optional (gccMode != null) "--with-mode=${gccMode}"; 131 125 132 - /* Cross-gcc settings */ 126 + /* Cross-gcc settings (build == host != target) */ 133 127 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 134 128 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; 135 - crossConfigureFlags = let 136 - gccArch = targetPlatform.gcc.arch or null; 137 - gccCpu = targetPlatform.gcc.cpu or null; 138 - gccAbi = targetPlatform.gcc.abi or null; 139 - gccFpu = targetPlatform.gcc.fpu or null; 140 - gccFloat = targetPlatform.gcc.float or null; 141 - gccMode = targetPlatform.gcc.mode or null; 142 - withArch = if gccArch != null then " --with-arch=${gccArch}" else ""; 143 - withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else ""; 144 - withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else ""; 145 - withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else ""; 146 - withFloat = if gccFloat != null then " --with-float=${gccFloat}" else ""; 147 - withMode = if gccMode != null then " --with-mode=${gccMode}" else ""; 148 - in 149 - withArch + 150 - withCpu + 151 - withAbi + 152 - withFpu + 153 - withFloat + 154 - withMode + 155 - # Ensure that -print-prog-name is able to find the correct programs. 156 - " --with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" + 157 - " --with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" + 158 - (if crossMingw && crossStageStatic then 159 - " --with-headers=${libcCross}/include" + 160 - " --with-gcc" + 161 - " --with-gnu-as" + 162 - " --with-gnu-ld" + 163 - " --with-gnu-ld" + 164 - " --disable-shared" + 165 - " --disable-nls" + 166 - " --disable-debug" + 167 - " --enable-sjlj-exceptions" + 168 - " --enable-threads=win32" + 169 - " --disable-win32-registry" 170 - else if crossStageStatic then 171 - " --disable-libssp --disable-nls" + 172 - " --without-headers" + 173 - " --disable-threads " + 174 - " --disable-libmudflap " + 175 - " --disable-libgomp " + 176 - " --disable-libquadmath" + 177 - " --disable-shared" + 178 - " --disable-libatomic " + # libatomic requires libc 179 - " --disable-decimal-float" # libdecnumber requires libc 180 - else 181 - (if crossDarwin then " --with-sysroot=${libcCross.out}/share/sysroot" 182 - else " --with-headers=${libcCross.dev}/include") + 183 - # Ensure that -print-prog-name is able to find the correct programs. 184 - " --enable-__cxa_atexit" + 185 - " --enable-long-long" + 186 - (if crossMingw then 187 - " --enable-threads=win32" + 188 - " --enable-sjlj-exceptions" + 189 - " --enable-hash-synchronization" + 190 - " --disable-libssp" + 191 - " --disable-nls" + 192 - " --with-dwarf2" + 193 - # I think noone uses shared gcc libs in mingw, so we better do the same. 194 - # In any case, mingw32 g++ linking is broken by default with shared libs, 195 - # unless adding "-lsupc++" to any linking command. I don't know why. 196 - " --disable-shared" + 197 - # To keep ABI compatibility with upstream mingw-w64 198 - " --enable-fully-dynamic-string" 199 - else (if targetPlatform.libc == "uclibc" then 200 - # In uclibc cases, libgomp needs an additional '-ldl' 201 - # and as I don't know how to pass it, I disable libgomp. 202 - " --disable-libgomp" else "") + 203 - " --enable-threads=posix" + 204 - " --enable-nls" + 205 - " --disable-decimal-float") # No final libdecnumber (it may work only in 386) 206 - ); 129 + crossConfigureFlags = 130 + mkPlatformFlags targetPlatform ++ 131 + 132 + # Ensure that -print-prog-name is able to find the correct programs. 133 + [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" 134 + "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ 135 + (if crossMingw && crossStageStatic then [ 136 + "--with-headers=${libcCross}/include" 137 + "--with-gcc" 138 + "--with-gnu-as" 139 + "--with-gnu-ld" 140 + "--with-gnu-ld" 141 + "--disable-shared" 142 + "--disable-nls" 143 + "--disable-debug" 144 + "--enable-sjlj-exceptions" 145 + "--enable-threads=win32" 146 + "--disable-win32-registry" 147 + ] else if crossStageStatic then [ 148 + "--disable-libssp" 149 + "--disable-nls" 150 + "--without-headers" 151 + "--disable-threads" 152 + "--disable-libgomp" 153 + "--disable-libquadmath" 154 + "--disable-shared" 155 + "--disable-libatomic" # libatomic requires libc 156 + "--disable-decimal-float" # libdecnumber requires libc 157 + ] else [ 158 + (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" 159 + else "--with-headers=${getDev libcCross}/include") 160 + "--enable-__cxa_atexit" 161 + "--enable-long-long" 162 + ] ++ 163 + (if crossMingw then [ 164 + "--enable-threads=win32" 165 + "--enable-sjlj-exceptions" 166 + "--enable-hash-synchronization" 167 + "--disable-libssp" 168 + "--disable-nls" 169 + "--with-dwarf2" 170 + # I think noone uses shared gcc libs in mingw, so we better do the same. 171 + # In any case, mingw32 g++ linking is broken by default with shared libs, 172 + # unless adding "-lsupc++" to any linking command. I don't know why. 173 + "--disable-shared" 174 + # To keep ABI compatibility with upstream mingw-w64 175 + "--enable-fully-dynamic-string" 176 + ] else 177 + optionals (targetPlatform.libc == "uclibc") [ 178 + # In uclibc cases, libgomp needs an additional '-ldl' 179 + # and as I don't know how to pass it, I disable libgomp. 180 + "--disable-libgomp" 181 + ] ++ [ 182 + "--enable-threads=posix" 183 + "--enable-nls" 184 + "--disable-decimal-float" # No final libdecnumber (it may work only in 386) 185 + ])); 207 186 stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; 208 187 crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; 209 188 ··· 329 308 then [] 330 309 else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; 331 310 332 - configureFlags = " 333 - ${if hostPlatform.isSunOS then 334 - " --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " + 335 - # On Illumos/Solaris GNU as is preferred 336 - " --with-gnu-as --without-gnu-ld " 337 - else ""} 338 - --enable-lto 339 - ${if enableMultilib then "--disable-libquadmath" else "--disable-multilib"} 340 - ${if enableShared then "" else "--disable-shared"} 341 - ${if enablePlugin then "--enable-plugin" else "--disable-plugin"} 342 - ${optionalString (isl != null) "--with-isl=${isl}"} 343 - ${optionalString (cloog != null) "--with-cloog=${cloog} --disable-cloog-version-check --enable-cloog-backend=isl"} 344 - ${if langJava then 345 - "--with-ecj-jar=${javaEcj} " + 311 + configureFlags = 312 + # Basic dependencies 313 + [ 314 + "--with-gmp-include=${gmp.dev}/include" 315 + "--with-gmp-lib=${gmp.out}/lib" 316 + "--with-mpfr-include=${mpfr.dev}/include" 317 + "--with-mpfr-lib=${mpfr.out}/lib" 318 + "--with-mpc=${libmpc}" 319 + ] ++ 320 + optional (libelf != null) "--with-libelf=${libelf}" ++ 321 + 322 + # Basic configuration 323 + [ 324 + "--enable-lto" 325 + "--disable-libstdcxx-pch" 326 + "--without-included-gettext" 327 + "--with-system-zlib" 328 + "--enable-static" 329 + "--enable-languages=${ 330 + concatStrings (intersperse "," 331 + ( optional langC "c" 332 + ++ optional langCC "c++" 333 + ++ optional langFortran "fortran" 334 + ++ optional langJava "java" 335 + ++ optional langAda "ada" 336 + ++ optional langVhdl "vhdl" 337 + ++ optional langGo "go" 338 + ++ optional langObjC "objc" 339 + ++ optional langObjCpp "obj-c++" 340 + ++ optionals crossDarwin [ "objc" "obj-c++" ] 341 + ) 342 + ) 343 + }" 344 + ] ++ 345 + 346 + # Optional features 347 + optional (isl != null) "--with-isl=${isl}" ++ 348 + optionals (cloog != null) [ 349 + "--with-cloog=${cloog}" 350 + "--disable-cloog-version-check" 351 + "--enable-cloog-backend=isl" 352 + ] ++ 353 + 354 + (if enableMultilib 355 + then ["--enable-multilib" "--disable-libquadmath"] 356 + else ["--disable-multilib"]) ++ 357 + optional (!enableShared) "--disable-shared" ++ 358 + (if enablePlugin 359 + then ["--enable-plugin"] 360 + else ["--disable-plugin"]) ++ 361 + 362 + # Java options 363 + optionals langJava [ 364 + "--with-ecj-jar=${javaEcj}" 346 365 347 366 # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See 348 367 # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>. 349 - "--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre " 350 - else ""} 351 - ${if javaAwtGtk then "--enable-java-awt=gtk" else ""} 352 - ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""} 353 - --with-gmp-include=${gmp.dev}/include 354 - --with-gmp-lib=${gmp.out}/lib 355 - --with-mpfr-include=${mpfr.dev}/include 356 - --with-mpfr-lib=${mpfr.out}/lib 357 - --with-mpc=${libmpc} 358 - ${if libelf != null then "--with-libelf=${libelf}" else ""} 359 - --disable-libstdcxx-pch 360 - --without-included-gettext 361 - --with-system-zlib 362 - --enable-static 363 - --enable-languages=${ 364 - concatStrings (intersperse "," 365 - ( optional langC "c" 366 - ++ optional langCC "c++" 367 - ++ optional langFortran "fortran" 368 - ++ optional langJava "java" 369 - ++ optional langAda "ada" 370 - ++ optional langVhdl "vhdl" 371 - ++ optional langGo "go" 372 - ++ optional langObjC "objc" 373 - ++ optional langObjCpp "obj-c++" 374 - ++ optionals crossDarwin [ "objc" "obj-c++" ] 375 - ) 376 - ) 377 - } 378 - ${if targetPlatform == hostPlatform 379 - then if hostPlatform.isDarwin 380 - then " --with-native-system-header-dir=${darwin.usr-include}" 381 - else " --with-native-system-header-dir=${getDev stdenv.cc.libc}/include" 382 - else ""} 383 - ${if langAda then " --enable-libada" else ""} 384 - ${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""} 385 - ${if targetPlatform != hostPlatform then crossConfigureFlags else ""} 386 - ${if !bootstrap then "--disable-bootstrap" else ""} 387 - ${if targetPlatform == hostPlatform then platformFlags else ""} 388 - "; 368 + "--enable-java-home" 369 + "--with-java-home=\${prefix}/lib/jvm/jre" 370 + ] ++ 371 + optional javaAwtGtk "--enable-java-awt=gtk" ++ 372 + optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++ 373 + 374 + # Ada 375 + optional langAda "--enable-libada" ++ 376 + 377 + # Cross-compilation 378 + optional (targetPlatform == hostPlatform) ( 379 + let incDir = if hostPlatform.isDarwin 380 + then "${darwin.usr-include}" 381 + else "${getDev stdenv.cc.libc}/include"; 382 + in "--with-native-system-header-dir=${incDir}" 383 + ) ++ 384 + 385 + optional (targetPlatform == hostPlatform) (mkPlatformFlags stdenv.platform) ++ 386 + optional (targetPlatform != hostPlatform) crossConfigureFlags ++ 387 + optional (!bootstrap) "--disable-bootstrap" ++ 388 + 389 + # Platform-specific flags 390 + optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++ 391 + optionals hostPlatform.isSunOS [ 392 + "--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit" 393 + # On Illumos/Solaris GNU as is preferred 394 + "--with-gnu-as" "--without-gnu-ld" 395 + ] 396 + ; 389 397 390 398 targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; 391 399 ··· 404 412 xgccAbi = targetPlatform.gcc.abi or null; 405 413 xgccFpu = targetPlatform.gcc.fpu or null; 406 414 xgccFloat = targetPlatform.gcc.float or null; 407 - xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else ""; 408 - xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else ""; 409 - xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else ""; 410 - xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else ""; 411 - xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else ""; 412 415 in { 413 416 AR = "${targetPlatform.config}-ar"; 414 417 LD = "${targetPlatform.config}-ld"; ··· 422 425 # If we are making a cross compiler, cross != null 423 426 NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; 424 427 dontStrip = true; 425 - configureFlags = '' 426 - ${if enableMultilib then "" else "--disable-multilib"} 427 - ${if enableShared then "" else "--disable-shared"} 428 - ${if cloog != null then "--with-cloog=${cloog.crossDrv} --enable-cloog-backend=isl" else ""} 429 - ${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""} 430 - ${if javaAwtGtk then "--enable-java-awt=gtk" else ""} 431 - ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""} 432 - --with-gmp=${gmp.crossDrv} 433 - --with-mpfr=${mpfr.crossDrv} 434 - --with-mpc=${libmpc.crossDrv} 435 - --disable-libstdcxx-pch 436 - --without-included-gettext 437 - --with-system-zlib 438 - --enable-languages=${ 439 - concatStrings (intersperse "," 440 - ( optional langC "c" 441 - ++ optional langCC "c++" 442 - ++ optional langFortran "fortran" 443 - ++ optional langJava "java" 444 - ++ optional langAda "ada" 445 - ++ optional langVhdl "vhdl" 446 - ++ optional langGo "go" 428 + configureFlags = 429 + optional (!enableMultilib) "--disable-multilib" ++ 430 + optional (!enableShared) "--disable-shared" ++ 431 + optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++ 432 + optional javaAwtGtk "--enable-java-awt=gtk" ++ 433 + optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++ 434 + optional (cloog != null) "--with-cloog=${cloog.crossDrv} --enable-cloog-backend=isl" ++ 435 + [ 436 + "--with-gmp=${gmp.crossDrv}" 437 + "--with-mpfr=${mpfr.crossDrv}" 438 + "--with-mpc=${libmpc.crossDrv}" 439 + "--disable-libstdcxx-pch" 440 + "--without-included-gettext" 441 + "--with-system-zlib" 442 + "--enable-languages=${ 443 + concatStrings (intersperse "," 444 + ( optional langC "c" 445 + ++ optional langCC "c++" 446 + ++ optional langFortran "fortran" 447 + ++ optional langJava "java" 448 + ++ optional langAda "ada" 449 + ++ optional langVhdl "vhdl" 450 + ++ optional langGo "go" 451 + ) 447 452 ) 448 - ) 449 - } 450 - ${if langAda then " --enable-libada" else ""} 451 - ${xwithArch} 452 - ${xwithCpu} 453 - ${xwithAbi} 454 - ${xwithFpu} 455 - ${xwithFloat} 456 - ''; 453 + }" 454 + ] ++ 455 + optional langAda "--enable-libada" ++ 456 + optional (xgccArch != null) "--with-arch=${xgccArch}" ++ 457 + optional (xgccCpu != null) "--with-cpu=${xgccCpu}" ++ 458 + optional (xgccAbi != null) "--with-abi=${xgccAbi}" ++ 459 + optional (xgccFpu != null) "--with-fpu=${xgccFpu}" ++ 460 + optional (xgccFloat != null) "--with-float=${xgccFloat}" 461 + ; 457 462 buildFlags = ""; 458 463 }; 459 464
+192 -183
pkgs/development/compilers/gcc/4.9/default.nix
··· 99 99 javaAwtGtk = langJava && x11Support; 100 100 101 101 /* Platform flags */ 102 - platformFlags = let 103 - gccArch = stdenv.platform.gcc.arch or null; 104 - gccCpu = stdenv.platform.gcc.cpu or null; 105 - gccAbi = stdenv.platform.gcc.abi or null; 106 - gccFpu = stdenv.platform.gcc.fpu or null; 107 - gccFloat = stdenv.platform.gcc.float or null; 108 - gccMode = stdenv.platform.gcc.mode or null; 109 - withArch = if gccArch != null then " --with-arch=${gccArch}" else ""; 110 - withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else ""; 111 - withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else ""; 112 - withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else ""; 113 - withFloat = if gccFloat != null then " --with-float=${gccFloat}" else ""; 114 - withMode = if gccMode != null then " --with-mode=${gccMode}" else ""; 115 - in 116 - withArch + 117 - withCpu + 118 - withAbi + 119 - withFpu + 120 - withFloat + 121 - withMode; 102 + mkPlatformFlags = platform: let 103 + gccArch = platform.gcc.arch or null; 104 + gccCpu = platform.gcc.cpu or null; 105 + gccAbi = platform.gcc.abi or null; 106 + gccFpu = platform.gcc.fpu or null; 107 + gccFloat = platform.gcc.float or null; 108 + gccMode = platform.gcc.mode or null; 109 + in 110 + optional (gccArch != null) "--with-arch=${gccArch}" ++ 111 + optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ 112 + optional (gccAbi != null) "--with-abi=${gccAbi}" ++ 113 + optional (gccFpu != null) "--with-fpu=${gccFpu}" ++ 114 + optional (gccFloat != null) "--with-float=${gccFloat}" ++ 115 + optional (gccMode != null) "--with-mode=${gccMode}"; 122 116 123 - /* Cross-gcc settings */ 117 + /* Cross-gcc settings (build == host != target) */ 124 118 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 125 119 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; 126 - crossConfigureFlags = let 127 - gccArch = targetPlatform.gcc.arch or null; 128 - gccCpu = targetPlatform.gcc.cpu or null; 129 - gccAbi = targetPlatform.gcc.abi or null; 130 - gccFpu = targetPlatform.gcc.fpu or null; 131 - gccFloat = targetPlatform.gcc.float or null; 132 - gccMode = targetPlatform.gcc.mode or null; 133 - withArch = if gccArch != null then " --with-arch=${gccArch}" else ""; 134 - withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else ""; 135 - withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else ""; 136 - withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else ""; 137 - withFloat = if gccFloat != null then " --with-float=${gccFloat}" else ""; 138 - withMode = if gccMode != null then " --with-mode=${gccMode}" else ""; 139 - in 140 - withArch + 141 - withCpu + 142 - withAbi + 143 - withFpu + 144 - withFloat + 145 - withMode + 146 - # Ensure that -print-prog-name is able to find the correct programs. 147 - " --with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" + 148 - " --with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" + 149 - (if crossMingw && crossStageStatic then 150 - " --with-headers=${libcCross}/include" + 151 - " --with-gcc" + 152 - " --with-gnu-as" + 153 - " --with-gnu-ld" + 154 - " --with-gnu-ld" + 155 - " --disable-shared" + 156 - " --disable-nls" + 157 - " --disable-debug" + 158 - " --enable-sjlj-exceptions" + 159 - " --enable-threads=win32" + 160 - " --disable-win32-registry" 161 - else if crossStageStatic then 162 - " --disable-libssp --disable-nls" + 163 - " --without-headers" + 164 - " --disable-threads " + 165 - " --disable-libgomp " + 166 - " --disable-libquadmath" + 167 - " --disable-shared" + 168 - " --disable-libatomic " + # libatomic requires libc 169 - " --disable-decimal-float" # libdecnumber requires libc 170 - else 171 - (if crossDarwin then " --with-sysroot=${libcCross.out}/share/sysroot" 172 - else " --with-headers=${libcCross.dev}/include") + 173 - " --enable-__cxa_atexit" + 174 - " --enable-long-long" + 175 - (if crossMingw then 176 - " --enable-threads=win32" + 177 - " --enable-sjlj-exceptions" + 178 - " --enable-hash-synchronization" + 179 - " --disable-libssp" + 180 - " --disable-nls" + 181 - " --with-dwarf2" + 182 - # I think noone uses shared gcc libs in mingw, so we better do the same. 183 - # In any case, mingw32 g++ linking is broken by default with shared libs, 184 - # unless adding "-lsupc++" to any linking command. I don't know why. 185 - " --disable-shared" + 186 - # To keep ABI compatibility with upstream mingw-w64 187 - " --enable-fully-dynamic-string" 188 - else (if targetPlatform.libc == "uclibc" then 189 - # libsanitizer requires netrom/netrom.h which is not 190 - # available in uclibc. 191 - " --disable-libsanitizer" + 192 - # In uclibc cases, libgomp needs an additional '-ldl' 193 - # and as I don't know how to pass it, I disable libgomp. 194 - " --disable-libgomp" else "") + 195 - " --enable-threads=posix" + 196 - " --enable-nls" + 197 - " --disable-decimal-float") # No final libdecnumber (it may work only in 386) 198 - ); 120 + crossConfigureFlags = 121 + mkPlatformFlags targetPlatform ++ 122 + 123 + # Ensure that -print-prog-name is able to find the correct programs. 124 + [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" 125 + "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ 126 + (if crossMingw && crossStageStatic then [ 127 + "--with-headers=${libcCross}/include" 128 + "--with-gcc" 129 + "--with-gnu-as" 130 + "--with-gnu-ld" 131 + "--with-gnu-ld" 132 + "--disable-shared" 133 + "--disable-nls" 134 + "--disable-debug" 135 + "--enable-sjlj-exceptions" 136 + "--enable-threads=win32" 137 + "--disable-win32-registry" 138 + ] else if crossStageStatic then [ 139 + "--disable-libssp" 140 + "--disable-nls" 141 + "--without-headers" 142 + "--disable-threads" 143 + "--disable-libgomp" 144 + "--disable-libquadmath" 145 + "--disable-shared" 146 + "--disable-libatomic" # libatomic requires libc 147 + "--disable-decimal-float" # libdecnumber requires libc 148 + ] else [ 149 + (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" 150 + else "--with-headers=${getDev libcCross}/include") 151 + "--enable-__cxa_atexit" 152 + "--enable-long-long" 153 + ] ++ 154 + (if crossMingw then [ 155 + "--enable-threads=win32" 156 + "--enable-sjlj-exceptions" 157 + "--enable-hash-synchronization" 158 + "--disable-libssp" 159 + "--disable-nls" 160 + "--with-dwarf2" 161 + # I think noone uses shared gcc libs in mingw, so we better do the same. 162 + # In any case, mingw32 g++ linking is broken by default with shared libs, 163 + # unless adding "-lsupc++" to any linking command. I don't know why. 164 + "--disable-shared" 165 + # To keep ABI compatibility with upstream mingw-w64 166 + "--enable-fully-dynamic-string" 167 + ] else 168 + optionals (targetPlatform.libc == "uclibc") [ 169 + # libsanitizer requires netrom/netrom.h which is not 170 + # available in uclibc. 171 + "--disable-libsanitizer" 172 + # In uclibc cases, libgomp needs an additional '-ldl' 173 + # and as I don't know how to pass it, I disable libgomp. 174 + "--disable-libgomp" 175 + ] ++ [ 176 + "--enable-threads=posix" 177 + "--enable-nls" 178 + "--disable-decimal-float" # No final libdecnumber (it may work only in 386) 179 + ])); 199 180 stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; 200 181 crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; 201 182 202 - bootstrap = targetPlatform == hostPlatform; 183 + bootstrap = targetPlatform == hostPlatform; 203 184 204 185 in 205 186 ··· 326 307 then [] 327 308 else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; 328 309 329 - configureFlags = " 330 - ${if hostPlatform.isSunOS then 331 - " --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " + 332 - # On Illumos/Solaris GNU as is preferred 333 - " --with-gnu-as --without-gnu-ld " 334 - else ""} 335 - --enable-lto 336 - ${if enableMultilib then "--enable-multilib --disable-libquadmath" else "--disable-multilib"} 337 - ${if enableShared then "" else "--disable-shared"} 338 - ${if enablePlugin then "--enable-plugin" else "--disable-plugin"} 339 - ${optionalString (isl != null) "--with-isl=${isl}"} 340 - ${optionalString (cloog != null) "--with-cloog=${cloog} --disable-cloog-version-check --enable-cloog-backend=isl"} 341 - ${if langJava then 342 - "--with-ecj-jar=${javaEcj} " + 310 + configureFlags = 311 + # Basic dependencies 312 + [ 313 + "--with-gmp-include=${gmp.dev}/include" 314 + "--with-gmp-lib=${gmp.out}/lib" 315 + "--with-mpfr=${mpfr.dev}" 316 + "--with-mpc=${libmpc}" 317 + ] ++ 318 + optional (libelf != null) "--with-libelf=${libelf}" ++ 319 + 320 + # Basic configuration 321 + [ 322 + "--enable-lto" 323 + "--disable-libstdcxx-pch" 324 + "--without-included-gettext" 325 + "--with-system-zlib" 326 + "--enable-static" 327 + "--enable-languages=${ 328 + concatStrings (intersperse "," 329 + ( optional langC "c" 330 + ++ optional langCC "c++" 331 + ++ optional langFortran "fortran" 332 + ++ optional langJava "java" 333 + ++ optional langAda "ada" 334 + ++ optional langVhdl "vhdl" 335 + ++ optional langGo "go" 336 + ++ optional langObjC "objc" 337 + ++ optional langObjCpp "obj-c++" 338 + ++ optionals crossDarwin [ "objc" "obj-c++" ] 339 + ) 340 + ) 341 + }" 342 + ] ++ 343 + 344 + (if enableMultilib 345 + then ["--enable-multilib" "--disable-libquadmath"] 346 + else ["--disable-multilib"]) ++ 347 + optional (!enableShared) "--disable-shared" ++ 348 + (if enablePlugin 349 + then ["--enable-plugin"] 350 + else ["--disable-plugin"]) ++ 351 + 352 + # Optional features 353 + optional (isl != null) "--with-isl=${isl}" ++ 354 + optionals (cloog != null) [ 355 + "--with-cloog=${cloog}" 356 + "--disable-cloog-version-check" 357 + "--enable-cloog-backend=isl" 358 + ] ++ 359 + 360 + # Java options 361 + optionals langJava [ 362 + "--with-ecj-jar=${javaEcj}" 343 363 344 364 # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See 345 365 # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>. 346 - "--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre " 347 - else ""} 348 - ${if javaAwtGtk then "--enable-java-awt=gtk" else ""} 349 - ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""} 350 - --with-gmp=${gmp.dev} 351 - --with-mpfr=${mpfr.dev} 352 - --with-mpc=${libmpc} 353 - ${if libelf != null then "--with-libelf=${libelf}" else ""} 354 - --disable-libstdcxx-pch 355 - --without-included-gettext 356 - --with-system-zlib 357 - --enable-static 358 - --enable-languages=${ 359 - concatStrings (intersperse "," 360 - ( optional langC "c" 361 - ++ optional langCC "c++" 362 - ++ optional langFortran "fortran" 363 - ++ optional langJava "java" 364 - ++ optional langAda "ada" 365 - ++ optional langVhdl "vhdl" 366 - ++ optional langGo "go" 367 - ++ optional langObjC "objc" 368 - ++ optional langObjCpp "obj-c++" 369 - ++ optionals crossDarwin [ "objc" "obj-c++" ] 370 - ) 371 - ) 372 - } 373 - ${if targetPlatform == hostPlatform 374 - then if hostPlatform.isDarwin 375 - then " --with-native-system-header-dir=${darwin.usr-include}" 376 - else " --with-native-system-header-dir=${getDev stdenv.cc.libc}/include" 377 - else ""} 378 - ${if langAda then " --enable-libada" else ""} 379 - ${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""} 380 - ${if targetPlatform != hostPlatform then crossConfigureFlags else ""} 381 - ${if !bootstrap then "--disable-bootstrap" else ""} 382 - ${if targetPlatform == hostPlatform then platformFlags else ""} 383 - "; 366 + "--enable-java-home" 367 + "--with-java-home=\${prefix}/lib/jvm/jre" 368 + ] ++ 369 + optional javaAwtGtk "--enable-java-awt=gtk" ++ 370 + optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++ 371 + 372 + # Ada 373 + optional langAda "--enable-libada" ++ 374 + 375 + # Cross-compilation 376 + optional (targetPlatform == hostPlatform) ( 377 + let incDir = if hostPlatform.isDarwin 378 + then "${darwin.usr-include}" 379 + else "${getDev stdenv.cc.libc}/include"; 380 + in "--with-native-system-header-dir=${incDir}" 381 + ) ++ 382 + 383 + optional (targetPlatform == hostPlatform) (mkPlatformFlags stdenv.platform) ++ 384 + optional (targetPlatform != hostPlatform) crossConfigureFlags ++ 385 + optional (!bootstrap) "--disable-bootstrap" ++ 386 + 387 + # Platform-specific flags 388 + optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++ 389 + optionals hostPlatform.isSunOS [ 390 + "--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit" 391 + # On Illumos/Solaris GNU as is preferred 392 + "--with-gnu-as" "--without-gnu-ld" 393 + ] 394 + ; 384 395 385 396 targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; 386 397 ··· 393 404 then "install-strip" 394 405 else "install"; 395 406 407 + /* For cross-built gcc (build != host == target) */ 396 408 crossAttrs = let 397 409 xgccArch = targetPlatform.gcc.arch or null; 398 410 xgccCpu = targetPlatform.gcc.cpu or null; 399 411 xgccAbi = targetPlatform.gcc.abi or null; 400 412 xgccFpu = targetPlatform.gcc.fpu or null; 401 413 xgccFloat = targetPlatform.gcc.float or null; 402 - xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else ""; 403 - xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else ""; 404 - xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else ""; 405 - xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else ""; 406 - xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else ""; 407 414 in { 408 415 AR = "${targetPlatform.config}-ar"; 409 416 LD = "${targetPlatform.config}-ld"; ··· 417 424 # If we are making a cross compiler, cross != null 418 425 NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; 419 426 dontStrip = true; 420 - configureFlags = '' 421 - ${if enableMultilib then "" else "--disable-multilib"} 422 - ${if enableShared then "" else "--disable-shared"} 423 - ${if cloog != null then "--with-cloog=${cloog.crossDrv} --enable-cloog-backend=isl" else ""} 424 - ${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""} 425 - ${if javaAwtGtk then "--enable-java-awt=gtk" else ""} 426 - ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""} 427 - --with-gmp=${gmp.crossDrv} 428 - --with-mpfr=${mpfr.crossDrv} 429 - --with-mpc=${libmpc.crossDrv} 430 - --disable-libstdcxx-pch 431 - --without-included-gettext 432 - --with-system-zlib 433 - --enable-languages=${ 434 - concatStrings (intersperse "," 435 - ( optional langC "c" 436 - ++ optional langCC "c++" 437 - ++ optional langFortran "fortran" 438 - ++ optional langJava "java" 439 - ++ optional langAda "ada" 440 - ++ optional langVhdl "vhdl" 441 - ++ optional langGo "go" 427 + configureFlags = 428 + optional (!enableMultilib) "--disable-multilib" ++ 429 + optional (!enableShared) "--disable-shared" ++ 430 + optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++ 431 + optional javaAwtGtk "--enable-java-awt=gtk" ++ 432 + optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++ 433 + optional (cloog != null) "--with-cloog=${cloog.crossDrv}" "--enable-cloog-backend=isl" ++ 434 + [ 435 + "--with-gmp=${gmp.crossDrv}" 436 + "--with-mpfr=${mpfr.crossDrv}" 437 + "--with-mpc=${libmpc.crossDrv}" 438 + "--disable-libstdcxx-pch" 439 + "--without-included-gettext" 440 + "--with-system-zlib" 441 + "--enable-languages=${ 442 + concatStrings (intersperse "," 443 + ( optional langC "c" 444 + ++ optional langCC "c++" 445 + ++ optional langFortran "fortran" 446 + ++ optional langJava "java" 447 + ++ optional langAda "ada" 448 + ++ optional langVhdl "vhdl" 449 + ++ optional langGo "go" 450 + ) 442 451 ) 443 - ) 444 - } 445 - ${if langAda then " --enable-libada" else ""} 446 - ${xwithArch} 447 - ${xwithCpu} 448 - ${xwithAbi} 449 - ${xwithFpu} 450 - ${xwithFloat} 451 - ''; 452 + }" 453 + ] ++ 454 + optional langAda "--enable-libada" ++ 455 + optional (xgccArch != null) "--with-arch=${xgccArch}" ++ 456 + optional (xgccCpu != null) "--with-cpu=${xgccCpu}" ++ 457 + optional (xgccAbi != null) "--with-abi=${xgccAbi}" ++ 458 + optional (xgccFpu != null) "--with-fpu=${xgccFpu}" ++ 459 + optional (xgccFloat != null) "--with-float=${xgccFloat}" 460 + ; 452 461 buildFlags = ""; 453 462 }; 454 463
+187 -183
pkgs/development/compilers/gcc/5/default.nix
··· 103 103 javaAwtGtk = langJava && x11Support; 104 104 105 105 /* Platform flags */ 106 - platformFlags = let 107 - gccArch = stdenv.platform.gcc.arch or null; 108 - gccCpu = stdenv.platform.gcc.cpu or null; 109 - gccAbi = stdenv.platform.gcc.abi or null; 110 - gccFpu = stdenv.platform.gcc.fpu or null; 111 - gccFloat = stdenv.platform.gcc.float or null; 112 - gccMode = stdenv.platform.gcc.mode or null; 113 - withArch = if gccArch != null then " --with-arch=${gccArch}" else ""; 114 - withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else ""; 115 - withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else ""; 116 - withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else ""; 117 - withFloat = if gccFloat != null then " --with-float=${gccFloat}" else ""; 118 - withMode = if gccMode != null then " --with-mode=${gccMode}" else ""; 119 - in 120 - withArch + 121 - withCpu + 122 - withAbi + 123 - withFpu + 124 - withFloat + 125 - withMode; 106 + mkPlatformFlags = platform: let 107 + gccArch = platform.gcc.arch or null; 108 + gccCpu = platform.gcc.cpu or null; 109 + gccAbi = platform.gcc.abi or null; 110 + gccFpu = platform.gcc.fpu or null; 111 + gccFloat = platform.gcc.float or null; 112 + gccMode = platform.gcc.mode or null; 113 + in 114 + optional (gccArch != null) "--with-arch=${gccArch}" ++ 115 + optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ 116 + optional (gccAbi != null) "--with-abi=${gccAbi}" ++ 117 + optional (gccFpu != null) "--with-fpu=${gccFpu}" ++ 118 + optional (gccFloat != null) "--with-float=${gccFloat}" ++ 119 + optional (gccMode != null) "--with-mode=${gccMode}"; 126 120 127 - /* Cross-gcc settings */ 121 + /* Cross-gcc settings (build == host != target) */ 128 122 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 129 123 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; 130 - crossConfigureFlags = let 131 - gccArch = targetPlatform.gcc.arch or null; 132 - gccCpu = targetPlatform.gcc.cpu or null; 133 - gccAbi = targetPlatform.gcc.abi or null; 134 - gccFpu = targetPlatform.gcc.fpu or null; 135 - gccFloat = targetPlatform.gcc.float or null; 136 - gccMode = targetPlatform.gcc.mode or null; 137 - withArch = if gccArch != null then " --with-arch=${gccArch}" else ""; 138 - withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else ""; 139 - withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else ""; 140 - withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else ""; 141 - withFloat = if gccFloat != null then " --with-float=${gccFloat}" else ""; 142 - withMode = if gccMode != null then " --with-mode=${gccMode}" else ""; 143 - in 144 - withArch + 145 - withCpu + 146 - withAbi + 147 - withFpu + 148 - withFloat + 149 - withMode + 150 - # Ensure that -print-prog-name is able to find the correct programs. 151 - " --with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" + 152 - " --with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" + 153 - (if crossMingw && crossStageStatic then 154 - " --with-headers=${libcCross}/include" + 155 - " --with-gcc" + 156 - " --with-gnu-as" + 157 - " --with-gnu-ld" + 158 - " --with-gnu-ld" + 159 - " --disable-shared" + 160 - " --disable-nls" + 161 - " --disable-debug" + 162 - " --enable-sjlj-exceptions" + 163 - " --enable-threads=win32" + 164 - " --disable-win32-registry" 165 - else if crossStageStatic then 166 - " --disable-libssp --disable-nls" + 167 - " --without-headers" + 168 - " --disable-threads " + 169 - " --disable-libgomp " + 170 - " --disable-libquadmath" + 171 - " --disable-shared" + 172 - " --disable-libatomic " + # libatomic requires libc 173 - " --disable-decimal-float" # libdecnumber requires libc 174 - else 175 - (if crossDarwin then " --with-sysroot=${getLib libcCross}/share/sysroot" 176 - else " --with-headers=${getDev libcCross}/include") + 177 - " --enable-__cxa_atexit" + 178 - " --enable-long-long" + 179 - (if crossMingw then 180 - " --enable-threads=win32" + 181 - " --enable-sjlj-exceptions" + 182 - " --enable-hash-synchronization" + 183 - " --disable-libssp" + 184 - " --disable-nls" + 185 - " --with-dwarf2" + 186 - # I think noone uses shared gcc libs in mingw, so we better do the same. 187 - # In any case, mingw32 g++ linking is broken by default with shared libs, 188 - # unless adding "-lsupc++" to any linking command. I don't know why. 189 - " --disable-shared" + 190 - # To keep ABI compatibility with upstream mingw-w64 191 - " --enable-fully-dynamic-string" 192 - else (if targetPlatform.libc == "uclibc" then 193 - # libsanitizer requires netrom/netrom.h which is not 194 - # available in uclibc. 195 - " --disable-libsanitizer" + 196 - # In uclibc cases, libgomp needs an additional '-ldl' 197 - # and as I don't know how to pass it, I disable libgomp. 198 - " --disable-libgomp" else "") + 199 - " --enable-threads=posix" + 200 - " --enable-nls" + 201 - " --disable-decimal-float") # No final libdecnumber (it may work only in 386) 202 - ); 124 + crossConfigureFlags = 125 + mkPlatformFlags targetPlatform ++ 126 + 127 + # Ensure that -print-prog-name is able to find the correct programs. 128 + [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" 129 + "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ 130 + (if crossMingw && crossStageStatic then [ 131 + "--with-headers=${libcCross}/include" 132 + "--with-gcc" 133 + "--with-gnu-as" 134 + "--with-gnu-ld" 135 + "--with-gnu-ld" 136 + "--disable-shared" 137 + "--disable-nls" 138 + "--disable-debug" 139 + "--enable-sjlj-exceptions" 140 + "--enable-threads=win32" 141 + "--disable-win32-registry" 142 + ] else if crossStageStatic then [ 143 + "--disable-libssp" 144 + "--disable-nls" 145 + "--without-headers" 146 + "--disable-threads" 147 + "--disable-libgomp" 148 + "--disable-libquadmath" 149 + "--disable-shared" 150 + "--disable-libatomic" # libatomic requires libc 151 + "--disable-decimal-float" # libdecnumber requires libc 152 + ] else [ 153 + (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" 154 + else "--with-headers=${getDev libcCross}/include") 155 + "--enable-__cxa_atexit" 156 + "--enable-long-long" 157 + ] ++ 158 + (if crossMingw then [ 159 + "--enable-threads=win32" 160 + "--enable-sjlj-exceptions" 161 + "--enable-hash-synchronization" 162 + "--disable-libssp" 163 + "--disable-nls" 164 + "--with-dwarf2" 165 + # I think noone uses shared gcc libs in mingw, so we better do the same. 166 + # In any case, mingw32 g++ linking is broken by default with shared libs, 167 + # unless adding "-lsupc++" to any linking command. I don't know why. 168 + "--disable-shared" 169 + # To keep ABI compatibility with upstream mingw-w64 170 + "--enable-fully-dynamic-string" 171 + ] else 172 + optionals (targetPlatform.libc == "uclibc") [ 173 + # libsanitizer requires netrom/netrom.h which is not 174 + # available in uclibc. 175 + "--disable-libsanitizer" 176 + # In uclibc cases, libgomp needs an additional '-ldl' 177 + # and as I don't know how to pass it, I disable libgomp. 178 + "--disable-libgomp" 179 + ] ++ [ 180 + "--enable-threads=posix" 181 + "--enable-nls" 182 + "--disable-decimal-float" # No final libdecnumber (it may work only in 386) 183 + ])); 203 184 stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; 204 185 crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; 205 186 206 - bootstrap = targetPlatform == hostPlatform; 187 + bootstrap = targetPlatform == hostPlatform; 207 188 208 189 in 209 190 ··· 340 321 then [] 341 322 else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; 342 323 343 - configureFlags = " 344 - ${if hostPlatform.isSunOS then 345 - " --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " + 346 - # On Illumos/Solaris GNU as is preferred 347 - " --with-gnu-as --without-gnu-ld " 348 - else ""} 349 - --enable-lto 350 - ${if enableMultilib then "--enable-multilib --disable-libquadmath" else "--disable-multilib"} 351 - ${if enableShared then "" else "--disable-shared"} 352 - ${if enablePlugin then "--enable-plugin" else "--disable-plugin"} 353 - ${optionalString (isl != null) "--with-isl=${isl}"} 354 - ${if langJava then 355 - "--with-ecj-jar=${javaEcj} " + 324 + configureFlags = 325 + # Basic dependencies 326 + [ 327 + "--with-gmp-include=${gmp.dev}/include" 328 + "--with-gmp-lib=${gmp.out}/lib" 329 + "--with-mpfr-include=${mpfr.dev}/include" 330 + "--with-mpfr-lib=${mpfr.out}/lib" 331 + "--with-mpc=${libmpc}" 332 + ] ++ 333 + optional (libelf != null) "--with-libelf=${libelf}" ++ 334 + 335 + # Basic configuration 336 + [ 337 + "--enable-lto" 338 + "--disable-libstdcxx-pch" 339 + "--without-included-gettext" 340 + "--with-system-zlib" 341 + "--enable-static" 342 + "--enable-languages=${ 343 + concatStrings (intersperse "," 344 + ( optional langC "c" 345 + ++ optional langCC "c++" 346 + ++ optional langFortran "fortran" 347 + ++ optional langJava "java" 348 + ++ optional langAda "ada" 349 + ++ optional langVhdl "vhdl" 350 + ++ optional langGo "go" 351 + ++ optional langObjC "objc" 352 + ++ optional langObjCpp "obj-c++" 353 + ++ optionals crossDarwin [ "objc" "obj-c++" ] 354 + ) 355 + ) 356 + }" 357 + ] ++ 358 + 359 + # Optional features 360 + optional (isl != null) "--with-isl=${isl}" ++ 361 + 362 + (if enableMultilib 363 + then ["--enable-multilib" "--disable-libquadmath"] 364 + else ["--disable-multilib"]) ++ 365 + optional (!enableShared) "--disable-shared" ++ 366 + (if enablePlugin 367 + then ["--enable-plugin"] 368 + else ["--disable-plugin"]) ++ 369 + 370 + # Java options 371 + optionals langJava [ 372 + "--with-ecj-jar=${javaEcj}" 356 373 357 374 # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See 358 375 # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>. 359 - "--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre " 360 - else ""} 361 - ${if javaAwtGtk then "--enable-java-awt=gtk" else ""} 362 - ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""} 363 - --with-gmp-include=${gmp.dev}/include 364 - --with-gmp-lib=${gmp.out}/lib 365 - --with-mpfr-include=${mpfr.dev}/include 366 - --with-mpfr-lib=${mpfr.out}/lib 367 - --with-mpc=${libmpc} 368 - ${if libelf != null then "--with-libelf=${libelf}" else ""} 369 - --disable-libstdcxx-pch 370 - --without-included-gettext 371 - --with-system-zlib 372 - --enable-static 373 - --enable-languages=${ 374 - concatStrings (intersperse "," 375 - ( optional langC "c" 376 - ++ optional langCC "c++" 377 - ++ optional langFortran "fortran" 378 - ++ optional langJava "java" 379 - ++ optional langAda "ada" 380 - ++ optional langVhdl "vhdl" 381 - ++ optional langGo "go" 382 - ++ optional langObjC "objc" 383 - ++ optional langObjCpp "obj-c++" 384 - ++ optionals crossDarwin [ "objc" "obj-c++" ] 385 - ) 386 - ) 387 - } 388 - ${if targetPlatform == hostPlatform 389 - then if hostPlatform.isDarwin 390 - then " --with-native-system-header-dir=${darwin.usr-include}" 391 - else " --with-native-system-header-dir=${getDev stdenv.cc.libc}/include" 392 - else ""} 393 - ${if langAda then " --enable-libada" else ""} 394 - ${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""} 395 - ${if targetPlatform != hostPlatform then crossConfigureFlags else ""} 396 - ${if !bootstrap then "--disable-bootstrap" else ""} 397 - ${if targetPlatform == hostPlatform then platformFlags else ""} 398 - "; 376 + "--enable-java-home" 377 + "--with-java-home=\${prefix}/lib/jvm/jre" 378 + ] ++ 379 + optional javaAwtGtk "--enable-java-awt=gtk" ++ 380 + optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++ 381 + 382 + # Ada 383 + optional langAda "--enable-libada" ++ 384 + 385 + # Cross-compilation 386 + optional (targetPlatform == hostPlatform) ( 387 + let incDir = if hostPlatform.isDarwin 388 + then "${darwin.usr-include}" 389 + else "${getDev stdenv.cc.libc}/include"; 390 + in "--with-native-system-header-dir=${incDir}" 391 + ) ++ 392 + 393 + optional (targetPlatform == hostPlatform) (mkPlatformFlags stdenv.platform) ++ 394 + optional (targetPlatform != hostPlatform) crossConfigureFlags ++ 395 + optional (!bootstrap) "--disable-bootstrap" ++ 396 + 397 + # Platform-specific flags 398 + optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++ 399 + optionals hostPlatform.isSunOS [ 400 + "--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit" 401 + # On Illumos/Solaris GNU as is preferred 402 + "--with-gnu-as" "--without-gnu-ld" 403 + ] 404 + ; 399 405 400 406 targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; 401 407 ··· 408 414 then "install-strip" 409 415 else "install"; 410 416 417 + /* For cross-built gcc (build != host == target) */ 411 418 crossAttrs = let 412 419 xgccArch = targetPlatform.gcc.arch or null; 413 420 xgccCpu = targetPlatform.gcc.cpu or null; 414 421 xgccAbi = targetPlatform.gcc.abi or null; 415 422 xgccFpu = targetPlatform.gcc.fpu or null; 416 423 xgccFloat = targetPlatform.gcc.float or null; 417 - xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else ""; 418 - xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else ""; 419 - xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else ""; 420 - xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else ""; 421 - xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else ""; 422 424 in { 423 425 AR = "${targetPlatform.config}-ar"; 424 426 LD = "${targetPlatform.config}-ld"; ··· 432 434 # If we are making a cross compiler, cross != null 433 435 NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; 434 436 dontStrip = true; 435 - configureFlags = '' 436 - ${if enableMultilib then "" else "--disable-multilib"} 437 - ${if enableShared then "" else "--disable-shared"} 438 - ${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""} 439 - ${if javaAwtGtk then "--enable-java-awt=gtk" else ""} 440 - ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""} 441 - --with-gmp=${gmp.crossDrv} 442 - --with-mpfr=${mpfr.crossDrv} 443 - --with-mpc=${libmpc.crossDrv} 444 - --disable-libstdcxx-pch 445 - --without-included-gettext 446 - --with-system-zlib 447 - --enable-languages=${ 448 - concatStrings (intersperse "," 449 - ( optional langC "c" 450 - ++ optional langCC "c++" 451 - ++ optional langFortran "fortran" 452 - ++ optional langJava "java" 453 - ++ optional langAda "ada" 454 - ++ optional langVhdl "vhdl" 455 - ++ optional langGo "go" 437 + configureFlags = 438 + optional (!enableMultilib) "--disable-multilib" ++ 439 + optional (!enableShared) "--disable-shared" ++ 440 + optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++ 441 + optional javaAwtGtk "--enable-java-awt=gtk" ++ 442 + optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++ 443 + [ 444 + "--with-gmp=${gmp.crossDrv}" 445 + "--with-mpfr=${mpfr.crossDrv}" 446 + "--with-mpc=${libmpc.crossDrv}" 447 + "--disable-libstdcxx-pch" 448 + "--without-included-gettext" 449 + "--with-system-zlib" 450 + "--enable-languages=${ 451 + concatStrings (intersperse "," 452 + ( optional langC "c" 453 + ++ optional langCC "c++" 454 + ++ optional langFortran "fortran" 455 + ++ optional langJava "java" 456 + ++ optional langAda "ada" 457 + ++ optional langVhdl "vhdl" 458 + ++ optional langGo "go" 459 + ) 456 460 ) 457 - ) 458 - } 459 - ${if langAda then " --enable-libada" else ""} 460 - ${xwithArch} 461 - ${xwithCpu} 462 - ${xwithAbi} 463 - ${xwithFpu} 464 - ${xwithFloat} 465 - ''; 461 + }" 462 + ] ++ 463 + optional langAda "--enable-libada" ++ 464 + optional (xgccArch != null) "--with-arch=${xgccArch}" ++ 465 + optional (xgccCpu != null) "--with-cpu=${xgccCpu}" ++ 466 + optional (xgccAbi != null) "--with-abi=${xgccAbi}" ++ 467 + optional (xgccFpu != null) "--with-fpu=${xgccFpu}" ++ 468 + optional (xgccFloat != null) "--with-float=${xgccFloat}" 469 + ; 466 470 buildFlags = ""; 467 471 }; 468 472
+186 -184
pkgs/development/compilers/gcc/6/default.nix
··· 100 100 javaAwtGtk = langJava && x11Support; 101 101 102 102 /* Platform flags */ 103 - platformFlags = let 104 - gccArch = stdenv.platform.gcc.arch or null; 105 - gccCpu = stdenv.platform.gcc.cpu or null; 106 - gccAbi = stdenv.platform.gcc.abi or null; 107 - gccFpu = stdenv.platform.gcc.fpu or null; 108 - gccFloat = stdenv.platform.gcc.float or null; 109 - gccMode = stdenv.platform.gcc.mode or null; 110 - withArch = if gccArch != null then " --with-arch=${gccArch}" else ""; 111 - withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else ""; 112 - withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else ""; 113 - withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else ""; 114 - withFloat = if gccFloat != null then " --with-float=${gccFloat}" else ""; 115 - withMode = if gccMode != null then " --with-mode=${gccMode}" else ""; 103 + mkPlatformFlags = platform: let 104 + gccArch = platform.gcc.arch or null; 105 + gccCpu = platform.gcc.cpu or null; 106 + gccAbi = platform.gcc.abi or null; 107 + gccFpu = platform.gcc.fpu or null; 108 + gccFloat = platform.gcc.float or null; 109 + gccMode = platform.gcc.mode or null; 116 110 in 117 - withArch + 118 - withCpu + 119 - withAbi + 120 - withFpu + 121 - withFloat + 122 - withMode; 111 + optional (gccArch != null) "--with-arch=${gccArch}" ++ 112 + optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ 113 + optional (gccAbi != null) "--with-abi=${gccAbi}" ++ 114 + optional (gccFpu != null) "--with-fpu=${gccFpu}" ++ 115 + optional (gccFloat != null) "--with-float=${gccFloat}" ++ 116 + optional (gccMode != null) "--with-mode=${gccMode}"; 123 117 124 - /* Cross-gcc settings */ 118 + /* Cross-gcc settings (build == host != target) */ 125 119 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 126 120 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; 127 - crossConfigureFlags = let 128 - gccArch = targetPlatform.gcc.arch or null; 129 - gccCpu = targetPlatform.gcc.cpu or null; 130 - gccAbi = targetPlatform.gcc.abi or null; 131 - gccFpu = targetPlatform.gcc.fpu or null; 132 - gccFloat = targetPlatform.gcc.float or null; 133 - gccMode = targetPlatform.gcc.mode or null; 134 - withArch = if gccArch != null then " --with-arch=${gccArch}" else ""; 135 - withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else ""; 136 - withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else ""; 137 - withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else ""; 138 - withFloat = if gccFloat != null then " --with-float=${gccFloat}" else ""; 139 - withMode = if gccMode != null then " --with-mode=${gccMode}" else ""; 140 - in 141 - withArch + 142 - withCpu + 143 - withAbi + 144 - withFpu + 145 - withFloat + 146 - withMode + 147 - # Ensure that -print-prog-name is able to find the correct programs. 148 - " --with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" + 149 - " --with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" + 150 - (if crossMingw && crossStageStatic then 151 - " --with-headers=${libcCross}/include" + 152 - " --with-gcc" + 153 - " --with-gnu-as" + 154 - " --with-gnu-ld" + 155 - " --with-gnu-ld" + 156 - " --disable-shared" + 157 - " --disable-nls" + 158 - " --disable-debug" + 159 - " --enable-sjlj-exceptions" + 160 - " --enable-threads=win32" + 161 - " --disable-win32-registry" 162 - else if crossStageStatic then 163 - " --disable-libssp --disable-nls" + 164 - " --without-headers" + 165 - " --disable-threads " + 166 - " --disable-libgomp " + 167 - " --disable-libquadmath" + 168 - " --disable-shared" + 169 - " --disable-libatomic " + # libatomic requires libc 170 - " --disable-decimal-float" # libdecnumber requires libc 171 - else 172 - (if crossDarwin then " --with-sysroot=${getLib libcCross}/share/sysroot" 173 - else " --with-headers=${getDev libcCross}/include") + 174 - " --enable-__cxa_atexit" + 175 - " --enable-long-long" + 176 - (if crossMingw then 177 - " --enable-threads=win32" + 178 - " --enable-sjlj-exceptions" + 179 - " --enable-hash-synchronization" + 180 - " --disable-libssp" + 181 - " --disable-nls" + 182 - " --with-dwarf2" + 183 - # I think noone uses shared gcc libs in mingw, so we better do the same. 184 - # In any case, mingw32 g++ linking is broken by default with shared libs, 185 - # unless adding "-lsupc++" to any linking command. I don't know why. 186 - " --disable-shared" + 187 - # To keep ABI compatibility with upstream mingw-w64 188 - " --enable-fully-dynamic-string" 189 - else (if targetPlatform.libc == "uclibc" then 190 - # libsanitizer requires netrom/netrom.h which is not 191 - # available in uclibc. 192 - " --disable-libsanitizer" + 193 - # In uclibc cases, libgomp needs an additional '-ldl' 194 - # and as I don't know how to pass it, I disable libgomp. 195 - " --disable-libgomp" else "") + 196 - " --enable-threads=posix" + 197 - " --enable-nls" + 198 - " --disable-decimal-float") # No final libdecnumber (it may work only in 386) 199 - ); 121 + crossConfigureFlags = 122 + mkPlatformFlags targetPlatform ++ 123 + 124 + # Ensure that -print-prog-name is able to find the correct programs. 125 + [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" 126 + "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ 127 + (if crossMingw && crossStageStatic then [ 128 + "--with-headers=${libcCross}/include" 129 + "--with-gcc" 130 + "--with-gnu-as" 131 + "--with-gnu-ld" 132 + "--with-gnu-ld" 133 + "--disable-shared" 134 + "--disable-nls" 135 + "--disable-debug" 136 + "--enable-sjlj-exceptions" 137 + "--enable-threads=win32" 138 + "--disable-win32-registry" 139 + ] else if crossStageStatic then [ 140 + "--disable-libssp" 141 + "--disable-nls" 142 + "--without-headers" 143 + "--disable-threads" 144 + "--disable-libgomp" 145 + "--disable-libquadmath" 146 + "--disable-shared" 147 + "--disable-libatomic" # libatomic requires libc 148 + "--disable-decimal-float" # libdecnumber requires libc 149 + ] else [ 150 + (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" 151 + else "--with-headers=${getDev libcCross}/include") 152 + "--enable-__cxa_atexit" 153 + "--enable-long-long" 154 + ] ++ 155 + (if crossMingw then [ 156 + "--enable-threads=win32" 157 + "--enable-sjlj-exceptions" 158 + "--enable-hash-synchronization" 159 + "--disable-libssp" 160 + "--disable-nls" 161 + "--with-dwarf2" 162 + # I think noone uses shared gcc libs in mingw, so we better do the same. 163 + # In any case, mingw32 g++ linking is broken by default with shared libs, 164 + # unless adding "-lsupc++" to any linking command. I don't know why. 165 + "--disable-shared" 166 + # To keep ABI compatibility with upstream mingw-w64 167 + "--enable-fully-dynamic-string" 168 + ] else 169 + optionals (targetPlatform.libc == "uclibc") [ 170 + # libsanitizer requires netrom/netrom.h which is not 171 + # available in uclibc. 172 + "--disable-libsanitizer" 173 + # In uclibc cases, libgomp needs an additional '-ldl' 174 + # and as I don't know how to pass it, I disable libgomp. 175 + "--disable-libgomp" 176 + ] ++ [ 177 + "--enable-threads=posix" 178 + "--enable-nls" 179 + "--disable-decimal-float" # No final libdecnumber (it may work only in 386) 180 + ])); 200 181 stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; 201 182 crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; 202 183 ··· 341 322 then [] 342 323 else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; 343 324 344 - configureFlags = " 345 - ${if hostPlatform.isSunOS then 346 - " --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " + 347 - # On Illumos/Solaris GNU as is preferred 348 - " --with-gnu-as --without-gnu-ld " 349 - else ""} 350 - --enable-lto 351 - ${if enableMultilib then "--enable-multilib --disable-libquadmath" else "--disable-multilib"} 352 - ${if enableShared then "" else "--disable-shared"} 353 - ${if enablePlugin then "--enable-plugin" else "--disable-plugin"} 354 - ${optionalString (isl != null) "--with-isl=${isl}"} 355 - ${if langJava then 356 - "--with-ecj-jar=${javaEcj} " + 325 + configureFlags = 326 + # Basic dependencies 327 + [ 328 + "--with-gmp-include=${gmp.dev}/include" 329 + "--with-gmp-lib=${gmp.out}/lib" 330 + "--with-mpfr-include=${mpfr.dev}/include" 331 + "--with-mpfr-lib=${mpfr.out}/lib" 332 + "--with-mpc=${libmpc}" 333 + ] ++ 334 + optional (libelf != null) "--with-libelf=${libelf}" ++ 335 + 336 + # Basic configuration 337 + [ 338 + "--enable-lto" 339 + "--disable-libstdcxx-pch" 340 + "--without-included-gettext" 341 + "--with-system-zlib" 342 + "--enable-static" 343 + "--enable-languages=${ 344 + concatStrings (intersperse "," 345 + ( optional langC "c" 346 + ++ optional langCC "c++" 347 + ++ optional langFortran "fortran" 348 + ++ optional langJava "java" 349 + ++ optional langAda "ada" 350 + ++ optional langVhdl "vhdl" 351 + ++ optional langGo "go" 352 + ++ optional langObjC "objc" 353 + ++ optional langObjCpp "obj-c++" 354 + ++ optionals crossDarwin [ "objc" "obj-c++" ] 355 + ) 356 + ) 357 + }" 358 + ] ++ 359 + 360 + (if enableMultilib 361 + then ["--enable-multilib" "--disable-libquadmath"] 362 + else ["--disable-multilib"]) ++ 363 + optional (!enableShared) "--disable-shared" ++ 364 + (if enablePlugin 365 + then ["--enable-plugin"] 366 + else ["--disable-plugin"]) ++ 367 + 368 + # Optional features 369 + optional (isl != null) "--with-isl=${isl}" ++ 370 + 371 + # Java options 372 + optionals langJava [ 373 + "--with-ecj-jar=${javaEcj}" 357 374 358 375 # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See 359 376 # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>. 360 - "--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre " 361 - else ""} 362 - ${if javaAwtGtk then "--enable-java-awt=gtk" else ""} 363 - ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""} 364 - --with-gmp-include=${gmp.dev}/include 365 - --with-gmp-lib=${gmp.out}/lib 366 - --with-mpfr-include=${mpfr.dev}/include 367 - --with-mpfr-lib=${mpfr.out}/lib 368 - --with-mpc=${libmpc} 369 - ${if libelf != null then "--with-libelf=${libelf}" else ""} 370 - --disable-libstdcxx-pch 371 - --without-included-gettext 372 - --with-system-zlib 373 - --enable-static 374 - --enable-languages=${ 375 - concatStrings (intersperse "," 376 - ( optional langC "c" 377 - ++ optional langCC "c++" 378 - ++ optional langFortran "fortran" 379 - ++ optional langJava "java" 380 - ++ optional langAda "ada" 381 - ++ optional langVhdl "vhdl" 382 - ++ optional langGo "go" 383 - ++ optional langObjC "objc" 384 - ++ optional langObjCpp "obj-c++" 385 - ++ optionals crossDarwin [ "objc" "obj-c++" ] 386 - ) 387 - ) 388 - } 389 - ${if targetPlatform == hostPlatform 390 - then if hostPlatform.isDarwin 391 - then " --with-native-system-header-dir=${darwin.usr-include}" 392 - else " --with-native-system-header-dir=${getDev stdenv.cc.libc}/include" 393 - else ""} 394 - ${if langAda then " --enable-libada" else ""} 395 - ${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""} 396 - ${if targetPlatform != hostPlatform then crossConfigureFlags else ""} 397 - ${if !bootstrap then "--disable-bootstrap" else ""} 398 - ${if targetPlatform == hostPlatform then platformFlags else ""} 399 - "; 377 + "--enable-java-home" 378 + "--with-java-home=\${prefix}/lib/jvm/jre" 379 + ] ++ 380 + optional javaAwtGtk "--enable-java-awt=gtk" ++ 381 + optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++ 382 + 383 + # Ada 384 + optional langAda "--enable-libada" ++ 385 + 386 + # Cross compilation 387 + optional (targetPlatform == hostPlatform) ( 388 + let incDir = if hostPlatform.isDarwin 389 + then "${darwin.usr-include}" 390 + else "${getDev stdenv.cc.libc}/include"; 391 + in "--with-native-system-header-dir=${incDir}" 392 + ) ++ 393 + 394 + optional (targetPlatform != hostPlatform) crossConfigureFlags ++ 395 + optional (!bootstrap) "--disable-bootstrap" ++ 396 + 397 + # Platform-specific flags 398 + optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++ 399 + optionals (hostPlatform.isSunOS) [ 400 + "--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit" 401 + # On Illumos/Solaris GNU as is preferred 402 + "--with-gnu-as" "--without-gnu-ld" 403 + ] 404 + ; 400 405 401 406 targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; 402 407 403 - buildFlags = if bootstrap then 404 - (if profiledCompiler then "profiledbootstrap" else "bootstrap") 405 - else ""; 408 + buildFlags = 409 + optional bootstrap (if profiledCompiler then "profiledbootstrap" else "bootstrap"); 406 410 407 411 installTargets = 408 412 if stripped 409 413 then "install-strip" 410 414 else "install"; 411 415 416 + /* For cross-built gcc (build != host == target) */ 412 417 crossAttrs = let 413 418 xgccArch = targetPlatform.gcc.arch or null; 414 419 xgccCpu = targetPlatform.gcc.cpu or null; 415 420 xgccAbi = targetPlatform.gcc.abi or null; 416 421 xgccFpu = targetPlatform.gcc.fpu or null; 417 422 xgccFloat = targetPlatform.gcc.float or null; 418 - xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else ""; 419 - xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else ""; 420 - xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else ""; 421 - xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else ""; 422 - xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else ""; 423 423 in { 424 424 AR = "${targetPlatform.config}-ar"; 425 425 LD = "${targetPlatform.config}-ld"; ··· 433 433 # If we are making a cross compiler, cross != null 434 434 NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; 435 435 dontStrip = true; 436 - configureFlags = '' 437 - ${if enableMultilib then "" else "--disable-multilib"} 438 - ${if enableShared then "" else "--disable-shared"} 439 - ${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""} 440 - ${if javaAwtGtk then "--enable-java-awt=gtk" else ""} 441 - ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""} 442 - --with-gmp=${gmp.crossDrv} 443 - --with-mpfr=${mpfr.crossDrv} 444 - --with-mpc=${libmpc.crossDrv} 445 - --disable-libstdcxx-pch 446 - --without-included-gettext 447 - --with-system-zlib 448 - --enable-languages=${ 449 - concatStrings (intersperse "," 450 - ( optional langC "c" 451 - ++ optional langCC "c++" 452 - ++ optional langFortran "fortran" 453 - ++ optional langJava "java" 454 - ++ optional langAda "ada" 455 - ++ optional langVhdl "vhdl" 456 - ++ optional langGo "go" 436 + configureFlags = 437 + optional (!enableMultilib) "--disable-multilib" ++ 438 + optional (!enableShared) "--disable-shared" ++ 439 + optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++ 440 + optional javaAwtGtk "--enable-java-awt=gtk" ++ 441 + optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++ 442 + [ 443 + "--with-gmp=${gmp.crossDrv}" 444 + "--with-mpfr=${mpfr.crossDrv}" 445 + "--with-mpc=${libmpc.crossDrv}" 446 + "--disable-libstdcxx-pch" 447 + "--without-included-gettext" 448 + "--with-system-zlib" 449 + "--enable-languages=${ 450 + concatStrings (intersperse "," 451 + ( optional langC "c" 452 + ++ optional langCC "c++" 453 + ++ optional langFortran "fortran" 454 + ++ optional langJava "java" 455 + ++ optional langAda "ada" 456 + ++ optional langVhdl "vhdl" 457 + ++ optional langGo "go" 458 + ) 457 459 ) 458 - ) 459 - } 460 - ${if langAda then " --enable-libada" else ""} 461 - ${xwithArch} 462 - ${xwithCpu} 463 - ${xwithAbi} 464 - ${xwithFpu} 465 - ${xwithFloat} 466 - ''; 460 + }" 461 + ] ++ 462 + optional langAda "--enable-libada" ++ 463 + optional (xgccArch != null) "--with-arch=${xgccArch}" ++ 464 + optional (xgccCpu != null) "--with-cpu=${xgccCpu}" ++ 465 + optional (xgccAbi != null) "--with-abi=${xgccAbi}" ++ 466 + optional (xgccFpu != null) "--with-fpu=${xgccFpu}" ++ 467 + optional (xgccFloat != null) "--with-float=${xgccFloat}" 468 + ; 467 469 buildFlags = ""; 468 470 }; 469 471
+187 -184
pkgs/development/compilers/gcc/7/default.nix
··· 98 98 javaAwtGtk = langJava && x11Support; 99 99 100 100 /* Platform flags */ 101 - platformFlags = let 102 - gccArch = stdenv.platform.gcc.arch or null; 103 - gccCpu = stdenv.platform.gcc.cpu or null; 104 - gccAbi = stdenv.platform.gcc.abi or null; 105 - gccFpu = stdenv.platform.gcc.fpu or null; 106 - gccFloat = stdenv.platform.gcc.float or null; 107 - gccMode = stdenv.platform.gcc.mode or null; 108 - withArch = if gccArch != null then " --with-arch=${gccArch}" else ""; 109 - withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else ""; 110 - withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else ""; 111 - withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else ""; 112 - withFloat = if gccFloat != null then " --with-float=${gccFloat}" else ""; 113 - withMode = if gccMode != null then " --with-mode=${gccMode}" else ""; 114 - in 115 - withArch + 116 - withCpu + 117 - withAbi + 118 - withFpu + 119 - withFloat + 120 - withMode; 101 + mkPlatformFlags = platform: let 102 + gccArch = platform.gcc.arch or null; 103 + gccCpu = platform.gcc.cpu or null; 104 + gccAbi = platform.gcc.abi or null; 105 + gccFpu = platform.gcc.fpu or null; 106 + gccFloat = platform.gcc.float or null; 107 + gccMode = platform.gcc.mode or null; 108 + in 109 + optional (gccArch != null) "--with-arch=${gccArch}" ++ 110 + optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ 111 + optional (gccAbi != null) "--with-abi=${gccAbi}" ++ 112 + optional (gccFpu != null) "--with-fpu=${gccFpu}" ++ 113 + optional (gccFloat != null) "--with-float=${gccFloat}" ++ 114 + optional (gccMode != null) "--with-mode=${gccMode}"; 121 115 122 - /* Cross-gcc settings */ 116 + /* Cross-gcc settings (build == host != target) */ 123 117 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 124 118 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; 125 - crossConfigureFlags = let 126 - gccArch = targetPlatform.gcc.arch or null; 127 - gccCpu = targetPlatform.gcc.cpu or null; 128 - gccAbi = targetPlatform.gcc.abi or null; 129 - gccFpu = targetPlatform.gcc.fpu or null; 130 - gccFloat = targetPlatform.gcc.float or null; 131 - gccMode = targetPlatform.gcc.mode or null; 132 - withArch = if gccArch != null then " --with-arch=${gccArch}" else ""; 133 - withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else ""; 134 - withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else ""; 135 - withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else ""; 136 - withFloat = if gccFloat != null then " --with-float=${gccFloat}" else ""; 137 - withMode = if gccMode != null then " --with-mode=${gccMode}" else ""; 138 - in 139 - withArch + 140 - withCpu + 141 - withAbi + 142 - withFpu + 143 - withFloat + 144 - withMode + 145 - # Ensure that -print-prog-name is able to find the correct programs. 146 - " --with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" + 147 - " --with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" + 148 - (if crossMingw && crossStageStatic then 149 - " --with-headers=${libcCross}/include" + 150 - " --with-gcc" + 151 - " --with-gnu-as" + 152 - " --with-gnu-ld" + 153 - " --with-gnu-ld" + 154 - " --disable-shared" + 155 - " --disable-nls" + 156 - " --disable-debug" + 157 - " --enable-sjlj-exceptions" + 158 - " --enable-threads=win32" + 159 - " --disable-win32-registry" 160 - else if crossStageStatic then 161 - " --disable-libssp --disable-nls" + 162 - " --without-headers" + 163 - " --disable-threads " + 164 - " --disable-libgomp " + 165 - " --disable-libquadmath" + 166 - " --disable-shared" + 167 - " --disable-libatomic " + # libatomic requires libc 168 - " --disable-decimal-float" # libdecnumber requires libc 169 - else 170 - (if crossDarwin then " --with-sysroot=${getLib libcCross}/share/sysroot" 171 - else " --with-headers=${getDev libcCross}/include") + 172 - # Ensure that -print-prog-name is able to find the correct programs. 173 - " --enable-__cxa_atexit" + 174 - " --enable-long-long" + 175 - (if crossMingw then 176 - " --enable-threads=win32" + 177 - " --enable-sjlj-exceptions" + 178 - " --enable-hash-synchronization" + 179 - " --disable-libssp" + 180 - " --disable-nls" + 181 - " --with-dwarf2" + 182 - # I think noone uses shared gcc libs in mingw, so we better do the same. 183 - # In any case, mingw32 g++ linking is broken by default with shared libs, 184 - # unless adding "-lsupc++" to any linking command. I don't know why. 185 - " --disable-shared" + 186 - # To keep ABI compatibility with upstream mingw-w64 187 - " --enable-fully-dynamic-string" 188 - else (if targetPlatform.libc == "uclibc" then 189 - # libsanitizer requires netrom/netrom.h which is not 190 - # available in uclibc. 191 - " --disable-libsanitizer" + 192 - # In uclibc cases, libgomp needs an additional '-ldl' 193 - # and as I don't know how to pass it, I disable libgomp. 194 - " --disable-libgomp" else "") + 195 - " --enable-threads=posix" + 196 - " --enable-nls" + 197 - " --disable-decimal-float") # No final libdecnumber (it may work only in 386) 198 - ); 119 + crossConfigureFlags = 120 + mkPlatformFlags targetPlatform ++ 121 + 122 + # Ensure that -print-prog-name is able to find the correct programs. 123 + [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" 124 + "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ 125 + (if crossMingw && crossStageStatic then [ 126 + "--with-headers=${libcCross}/include" 127 + "--with-gcc" 128 + "--with-gnu-as" 129 + "--with-gnu-ld" 130 + "--with-gnu-ld" 131 + "--disable-shared" 132 + "--disable-nls" 133 + "--disable-debug" 134 + "--enable-sjlj-exceptions" 135 + "--enable-threads=win32" 136 + "--disable-win32-registry" 137 + ] else if crossStageStatic then [ 138 + "--disable-libssp" 139 + "--disable-nls" 140 + "--without-headers" 141 + "--disable-threads" 142 + "--disable-libgomp" 143 + "--disable-libquadmath" 144 + "--disable-shared" 145 + "--disable-libatomic" # libatomic requires libc 146 + "--disable-decimal-float" # libdecnumber requires libc 147 + ] else [ 148 + (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" 149 + else "--with-headers=${getDev libcCross}/include") 150 + "--enable-__cxa_atexit" 151 + "--enable-long-long" 152 + ] ++ 153 + (if crossMingw then [ 154 + "--enable-threads=win32" 155 + "--enable-sjlj-exceptions" 156 + "--enable-hash-synchronization" 157 + "--disable-libssp" 158 + "--disable-nls" 159 + "--with-dwarf2" 160 + # I think noone uses shared gcc libs in mingw, so we better do the same. 161 + # In any case, mingw32 g++ linking is broken by default with shared libs, 162 + # unless adding "-lsupc++" to any linking command. I don't know why. 163 + "--disable-shared" 164 + # To keep ABI compatibility with upstream mingw-w64 165 + "--enable-fully-dynamic-string" 166 + ] else 167 + optionals (targetPlatform.libc == "uclibc") [ 168 + # libsanitizer requires netrom/netrom.h which is not 169 + # available in uclibc. 170 + "--disable-libsanitizer" 171 + # In uclibc cases, libgomp needs an additional '-ldl' 172 + # and as I don't know how to pass it, I disable libgomp. 173 + "--disable-libgomp" 174 + ] ++ [ 175 + "--enable-threads=posix" 176 + "--enable-nls" 177 + "--disable-decimal-float" # No final libdecnumber (it may work only in 386) 178 + ])); 199 179 stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; 200 180 crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; 201 181 202 - bootstrap = targetPlatform == hostPlatform; 182 + bootstrap = targetPlatform == hostPlatform; 203 183 204 184 in 205 185 ··· 335 315 then [] 336 316 else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; 337 317 338 - configureFlags = " 339 - ${if hostPlatform.isSunOS then 340 - " --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " + 341 - # On Illumos/Solaris GNU as is preferred 342 - " --with-gnu-as --without-gnu-ld " 343 - else ""} 344 - --enable-lto 345 - ${if enableMultilib then "--enable-multilib --disable-libquadmath" else "--disable-multilib"} 346 - ${if enableShared then "" else "--disable-shared"} 347 - ${if enablePlugin then "--enable-plugin" else "--disable-plugin"} 348 - ${optionalString (isl != null) "--with-isl=${isl}"} 349 - ${if langJava then 350 - "--with-ecj-jar=${javaEcj} " + 318 + configureFlags = 319 + # Basic dependencies 320 + [ 321 + "--with-gmp-include=${gmp.dev}/include" 322 + "--with-gmp-lib=${gmp.out}/lib" 323 + "--with-mpfr-include=${mpfr.dev}/include" 324 + "--with-mpfr-lib=${mpfr.out}/lib" 325 + "--with-mpc=${libmpc}" 326 + ] ++ 327 + optional (libelf != null) "--with-libelf=${libelf}" ++ 328 + 329 + # Basic configuration 330 + [ 331 + "--enable-lto" 332 + "--disable-libstdcxx-pch" 333 + "--without-included-gettext" 334 + "--with-system-zlib" 335 + "--enable-static" 336 + "--enable-languages=${ 337 + concatStrings (intersperse "," 338 + ( optional langC "c" 339 + ++ optional langCC "c++" 340 + ++ optional langFortran "fortran" 341 + ++ optional langJava "java" 342 + ++ optional langAda "ada" 343 + ++ optional langVhdl "vhdl" 344 + ++ optional langGo "go" 345 + ++ optional langObjC "objc" 346 + ++ optional langObjCpp "obj-c++" 347 + ++ optionals crossDarwin [ "objc" "obj-c++" ] 348 + ) 349 + ) 350 + }" 351 + ] ++ 352 + 353 + (if enableMultilib 354 + then ["--enable-multilib" "--disable-libquadmath"] 355 + else ["--disable-multilib"]) ++ 356 + optional (!enableShared) "--disable-shared" ++ 357 + (if enablePlugin 358 + then ["--enable-plugin"] 359 + else ["--disable-plugin"]) ++ 360 + 361 + # Optional features 362 + optional (isl != null) "--with-isl=${isl}" ++ 363 + 364 + # Java options 365 + optionals langJava [ 366 + "--with-ecj-jar=${javaEcj}" 351 367 352 368 # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See 353 369 # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>. 354 - "--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre " 355 - else ""} 356 - ${if javaAwtGtk then "--enable-java-awt=gtk" else ""} 357 - ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""} 358 - --with-gmp-include=${gmp.dev}/include 359 - --with-gmp-lib=${gmp.out}/lib 360 - --with-mpfr-include=${mpfr.dev}/include 361 - --with-mpfr-lib=${mpfr.out}/lib 362 - --with-mpc=${libmpc} 363 - ${if libelf != null then "--with-libelf=${libelf}" else ""} 364 - --disable-libstdcxx-pch 365 - --without-included-gettext 366 - --with-system-zlib 367 - --enable-static 368 - --enable-languages=${ 369 - concatStrings (intersperse "," 370 - ( optional langC "c" 371 - ++ optional langCC "c++" 372 - ++ optional langFortran "fortran" 373 - ++ optional langJava "java" 374 - ++ optional langAda "ada" 375 - ++ optional langVhdl "vhdl" 376 - ++ optional langGo "go" 377 - ++ optional langObjC "objc" 378 - ++ optional langObjCpp "obj-c++" 379 - ++ optionals crossDarwin [ "objc" "obj-c++" ] 380 - ) 381 - ) 382 - } 383 - ${if targetPlatform == hostPlatform 384 - then if hostPlatform.isDarwin 385 - then " --with-native-system-header-dir=${darwin.usr-include}" 386 - else " --with-native-system-header-dir=${getDev stdenv.cc.libc}/include" 387 - else ""} 388 - ${if langAda then " --enable-libada" else ""} 389 - ${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""} 390 - ${if targetPlatform != hostPlatform then crossConfigureFlags else ""} 391 - ${if !bootstrap then "--disable-bootstrap" else ""} 392 - ${if targetPlatform == hostPlatform then platformFlags else ""} 393 - "; 370 + "--enable-java-home" 371 + "--with-java-home=\${prefix}/lib/jvm/jre" 372 + ] ++ 373 + optional javaAwtGtk "--enable-java-awt=gtk" ++ 374 + optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++ 375 + 376 + # Ada 377 + optional langAda "--enable-libada" ++ 378 + 379 + # Cross-compilation 380 + optional (targetPlatform == hostPlatform) ( 381 + let incDir = if hostPlatform.isDarwin 382 + then "${darwin.usr-include}" 383 + else "${getDev stdenv.cc.libc}/include"; 384 + in "--with-native-system-header-dir=${incDir}" 385 + ) ++ 386 + 387 + optional (targetPlatform == hostPlatform) (mkPlatformFlags stdenv.platform) ++ 388 + optional (targetPlatform != hostPlatform) crossConfigureFlags ++ 389 + optional (!bootstrap) "--disable-bootstrap" ++ 390 + 391 + # Platform-specific flags 392 + optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++ 393 + optionals hostPlatform.isSunOS [ 394 + "--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit" 395 + # On Illumos/Solaris GNU as is preferred 396 + "--with-gnu-as" "--without-gnu-ld" 397 + ] 398 + ; 394 399 395 400 targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; 396 401 ··· 403 408 then "install-strip" 404 409 else "install"; 405 410 411 + /* For cross-built gcc (build != host == target) */ 406 412 crossAttrs = let 407 413 xgccArch = targetPlatform.gcc.arch or null; 408 414 xgccCpu = targetPlatform.gcc.cpu or null; 409 415 xgccAbi = targetPlatform.gcc.abi or null; 410 416 xgccFpu = targetPlatform.gcc.fpu or null; 411 417 xgccFloat = targetPlatform.gcc.float or null; 412 - xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else ""; 413 - xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else ""; 414 - xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else ""; 415 - xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else ""; 416 - xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else ""; 417 418 in { 418 419 AR = "${targetPlatform.config}-ar"; 419 420 LD = "${targetPlatform.config}-ld"; ··· 427 428 # If we are making a cross compiler, targetPlatform != hostPlatform 428 429 NIX_CC_CROSS = if targetPlatform == hostPlatform then "${stdenv.ccCross}" else ""; 429 430 dontStrip = true; 430 - configureFlags = '' 431 - ${if enableMultilib then "" else "--disable-multilib"} 432 - ${if enableShared then "" else "--disable-shared"} 433 - ${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""} 434 - ${if javaAwtGtk then "--enable-java-awt=gtk" else ""} 435 - ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""} 436 - --with-gmp=${gmp.crossDrv} 437 - --with-mpfr=${mpfr.crossDrv} 438 - --with-mpc=${libmpc.crossDrv} 439 - --disable-libstdcxx-pch 440 - --without-included-gettext 441 - --with-system-zlib 442 - --enable-languages=${ 443 - concatStrings (intersperse "," 444 - ( optional langC "c" 445 - ++ optional langCC "c++" 446 - ++ optional langFortran "fortran" 447 - ++ optional langJava "java" 448 - ++ optional langAda "ada" 449 - ++ optional langVhdl "vhdl" 450 - ++ optional langGo "go" 431 + configureFlags = 432 + optional (!enableMultilib) "--disable-multilib" ++ 433 + optional (!enableShared) "--disable-shared" ++ 434 + optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++ 435 + optional javaAwtGtk "--enable-java-awt=gtk" ++ 436 + optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++ 437 + [ 438 + "--with-gmp=${gmp.crossDrv}" 439 + "--with-mpfr=${mpfr.crossDrv}" 440 + "--with-mpc=${libmpc.crossDrv}" 441 + "--disable-libstdcxx-pch" 442 + "--without-included-gettext" 443 + "--with-system-zlib" 444 + "--enable-languages=${ 445 + concatStrings (intersperse "," 446 + ( optional langC "c" 447 + ++ optional langCC "c++" 448 + ++ optional langFortran "fortran" 449 + ++ optional langJava "java" 450 + ++ optional langAda "ada" 451 + ++ optional langVhdl "vhdl" 452 + ++ optional langGo "go" 453 + ) 451 454 ) 452 - ) 453 - } 454 - ${if langAda then " --enable-libada" else ""} 455 - ${xwithArch} 456 - ${xwithCpu} 457 - ${xwithAbi} 458 - ${xwithFpu} 459 - ${xwithFloat} 460 - ''; 455 + }" 456 + ] ++ 457 + optional langAda "--enable-libada" ++ 458 + optional (xgccArch != null) "--with-arch=${xgccArch}" ++ 459 + optional (xgccCpu != null) "--with-cpu=${xgccCpu}" ++ 460 + optional (xgccAbi != null) "--with-abi=${xgccAbi}" ++ 461 + optional (xgccFpu != null) "--with-fpu=${xgccFpu}" ++ 462 + optional (xgccFloat != null) "--with-float=${xgccFloat}" 463 + ; 461 464 buildFlags = ""; 462 465 }; 463 466
+187 -184
pkgs/development/compilers/gcc/snapshot/default.nix
··· 98 98 javaAwtGtk = langJava && x11Support; 99 99 100 100 /* Platform flags */ 101 - platformFlags = let 102 - gccArch = stdenv.platform.gcc.arch or null; 103 - gccCpu = stdenv.platform.gcc.cpu or null; 104 - gccAbi = stdenv.platform.gcc.abi or null; 105 - gccFpu = stdenv.platform.gcc.fpu or null; 106 - gccFloat = stdenv.platform.gcc.float or null; 107 - gccMode = stdenv.platform.gcc.mode or null; 108 - withArch = if gccArch != null then " --with-arch=${gccArch}" else ""; 109 - withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else ""; 110 - withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else ""; 111 - withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else ""; 112 - withFloat = if gccFloat != null then " --with-float=${gccFloat}" else ""; 113 - withMode = if gccMode != null then " --with-mode=${gccMode}" else ""; 114 - in 115 - withArch + 116 - withCpu + 117 - withAbi + 118 - withFpu + 119 - withFloat + 120 - withMode; 101 + mkPlatformFlags = platform: let 102 + gccArch = platform.gcc.arch or null; 103 + gccCpu = platform.gcc.cpu or null; 104 + gccAbi = platform.gcc.abi or null; 105 + gccFpu = platform.gcc.fpu or null; 106 + gccFloat = platform.gcc.float or null; 107 + gccMode = platform.gcc.mode or null; 108 + in 109 + optional (gccArch != null) "--with-arch=${gccArch}" ++ 110 + optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ 111 + optional (gccAbi != null) "--with-abi=${gccAbi}" ++ 112 + optional (gccFpu != null) "--with-fpu=${gccFpu}" ++ 113 + optional (gccFloat != null) "--with-float=${gccFloat}" ++ 114 + optional (gccMode != null) "--with-mode=${gccMode}"; 121 115 122 - /* Cross-gcc settings */ 116 + /* Cross-gcc settings (build == host != target) */ 123 117 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 124 118 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; 125 - crossConfigureFlags = let 126 - gccArch = targetPlatform.gcc.arch or null; 127 - gccCpu = targetPlatform.gcc.cpu or null; 128 - gccAbi = targetPlatform.gcc.abi or null; 129 - gccFpu = targetPlatform.gcc.fpu or null; 130 - gccFloat = targetPlatform.gcc.float or null; 131 - gccMode = targetPlatform.gcc.mode or null; 132 - withArch = if gccArch != null then " --with-arch=${gccArch}" else ""; 133 - withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else ""; 134 - withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else ""; 135 - withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else ""; 136 - withFloat = if gccFloat != null then " --with-float=${gccFloat}" else ""; 137 - withMode = if gccMode != null then " --with-mode=${gccMode}" else ""; 138 - in 139 - withArch + 140 - withCpu + 141 - withAbi + 142 - withFpu + 143 - withFloat + 144 - withMode + 145 - # Ensure that -print-prog-name is able to find the correct programs. 146 - " --with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" + 147 - " --with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" + 148 - (if crossMingw && crossStageStatic then 149 - " --with-headers=${libcCross}/include" + 150 - " --with-gcc" + 151 - " --with-gnu-as" + 152 - " --with-gnu-ld" + 153 - " --with-gnu-ld" + 154 - " --disable-shared" + 155 - " --disable-nls" + 156 - " --disable-debug" + 157 - " --enable-sjlj-exceptions" + 158 - " --enable-threads=win32" + 159 - " --disable-win32-registry" 160 - else if crossStageStatic then 161 - " --disable-libssp --disable-nls" + 162 - " --without-headers" + 163 - " --disable-threads " + 164 - " --disable-libgomp " + 165 - " --disable-libquadmath" + 166 - " --disable-shared" + 167 - " --disable-libatomic " + # libatomic requires libc 168 - " --disable-decimal-float" # libdecnumber requires libc 169 - else 170 - (if crossDarwin then " --with-sysroot=${getLib libcCross}/share/sysroot" 171 - else " --with-headers=${getDev libcCross}/include") + 172 - # Ensure that -print-prog-name is able to find the correct programs. 173 - " --enable-__cxa_atexit" + 174 - " --enable-long-long" + 175 - (if crossMingw then 176 - " --enable-threads=win32" + 177 - " --enable-sjlj-exceptions" + 178 - " --enable-hash-synchronization" + 179 - " --disable-libssp" + 180 - " --disable-nls" + 181 - " --with-dwarf2" + 182 - # I think noone uses shared gcc libs in mingw, so we better do the same. 183 - # In any case, mingw32 g++ linking is broken by default with shared libs, 184 - # unless adding "-lsupc++" to any linking command. I don't know why. 185 - " --disable-shared" + 186 - # To keep ABI compatibility with upstream mingw-w64 187 - " --enable-fully-dynamic-string" 188 - else (if targetPlatform.libc == "uclibc" then 189 - # libsanitizer requires netrom/netrom.h which is not 190 - # available in uclibc. 191 - " --disable-libsanitizer" + 192 - # In uclibc cases, libgomp needs an additional '-ldl' 193 - # and as I don't know how to pass it, I disable libgomp. 194 - " --disable-libgomp" else "") + 195 - " --enable-threads=posix" + 196 - " --enable-nls" + 197 - " --disable-decimal-float") # No final libdecnumber (it may work only in 386) 198 - ); 119 + crossConfigureFlags = 120 + mkPlatformFlags targetPlatform ++ 121 + 122 + # Ensure that -print-prog-name is able to find the correct programs. 123 + [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" 124 + "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ 125 + (if crossMingw && crossStageStatic then [ 126 + "--with-headers=${libcCross}/include" 127 + "--with-gcc" 128 + "--with-gnu-as" 129 + "--with-gnu-ld" 130 + "--with-gnu-ld" 131 + "--disable-shared" 132 + "--disable-nls" 133 + "--disable-debug" 134 + "--enable-sjlj-exceptions" 135 + "--enable-threads=win32" 136 + "--disable-win32-registry" 137 + ] else if crossStageStatic then [ 138 + "--disable-libssp" 139 + "--disable-nls" 140 + "--without-headers" 141 + "--disable-threads" 142 + "--disable-libgomp" 143 + "--disable-libquadmath" 144 + "--disable-shared" 145 + "--disable-libatomic" # libatomic requires libc 146 + "--disable-decimal-float" # libdecnumber requires libc 147 + ] else [ 148 + (if crossDarwin then "--with-sysroot=${getLib libcCross}/share/sysroot" 149 + else "--with-headers=${getDev libcCross}/include") 150 + "--enable-__cxa_atexit" 151 + "--enable-long-long" 152 + ] ++ 153 + (if crossMingw then [ 154 + "--enable-threads=win32" 155 + "--enable-sjlj-exceptions" 156 + "--enable-hash-synchronization" 157 + "--disable-libssp" 158 + "--disable-nls" 159 + "--with-dwarf2" 160 + # I think noone uses shared gcc libs in mingw, so we better do the same. 161 + # In any case, mingw32 g++ linking is broken by default with shared libs, 162 + # unless adding "-lsupc++" to any linking command. I don't know why. 163 + "--disable-shared" 164 + # To keep ABI compatibility with upstream mingw-w64 165 + "--enable-fully-dynamic-string" 166 + ] else 167 + optionals (targetPlatform.libc == "uclibc") [ 168 + # libsanitizer requires netrom/netrom.h which is not 169 + # available in uclibc. 170 + "--disable-libsanitizer" 171 + # In uclibc cases, libgomp needs an additional '-ldl' 172 + # and as I don't know how to pass it, I disable libgomp. 173 + "--disable-libgomp" 174 + ] ++ [ 175 + "--enable-threads=posix" 176 + "--enable-nls" 177 + "--disable-decimal-float" # No final libdecnumber (it may work only in 386) 178 + ])); 199 179 stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; 200 180 crossNameAddon = if targetPlatform != hostPlatform then "-${targetPlatform.config}" + stageNameAddon else ""; 201 181 202 - bootstrap = targetPlatform == hostPlatform; 182 + bootstrap = targetPlatform == hostPlatform; 203 183 204 184 in 205 185 ··· 322 302 then [] 323 303 else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; 324 304 325 - configureFlags = " 326 - ${if hostPlatform.isSunOS then 327 - " --enable-long-long --enable-libssp --enable-threads=posix --disable-nls --enable-__cxa_atexit " + 328 - # On Illumos/Solaris GNU as is preferred 329 - " --with-gnu-as --without-gnu-ld " 330 - else ""} 331 - --enable-lto 332 - ${if enableMultilib then "--enable-multilib --disable-libquadmath" else "--disable-multilib"} 333 - ${if enableShared then "" else "--disable-shared"} 334 - ${if enablePlugin then "--enable-plugin" else "--disable-plugin"} 335 - ${optionalString (isl != null) "--with-isl=${isl}"} 336 - ${if langJava then 337 - "--with-ecj-jar=${javaEcj} " + 305 + configureFlags = 306 + # Basic dependencies 307 + [ 308 + "--with-gmp-include=${gmp.dev}/include" 309 + "--with-gmp-lib=${gmp.out}/lib" 310 + "--with-mpfr-include=${mpfr.dev}/include" 311 + "--with-mpfr-lib=${mpfr.out}/lib" 312 + "--with-mpc=${libmpc}" 313 + ] ++ 314 + optional (libelf != null) "--with-libelf=${libelf}" ++ 315 + 316 + # Basic configuration 317 + [ 318 + "--enable-lto" 319 + "--disable-libstdcxx-pch" 320 + "--without-included-gettext" 321 + "--with-system-zlib" 322 + "--enable-static" 323 + "--enable-languages=${ 324 + concatStrings (intersperse "," 325 + ( optional langC "c" 326 + ++ optional langCC "c++" 327 + ++ optional langFortran "fortran" 328 + ++ optional langJava "java" 329 + ++ optional langAda "ada" 330 + ++ optional langVhdl "vhdl" 331 + ++ optional langGo "go" 332 + ++ optional langObjC "objc" 333 + ++ optional langObjCpp "obj-c++" 334 + ++ optionals crossDarwin [ "objc" "obj-c++" ] 335 + ) 336 + ) 337 + }" 338 + ] ++ 339 + 340 + (if enableMultilib 341 + then ["--enable-multilib" "--disable-libquadmath"] 342 + else ["--disable-multilib"]) ++ 343 + optional (!enableShared) "--disable-shared" ++ 344 + (if enablePlugin 345 + then ["--enable-plugin"] 346 + else ["--disable-plugin"]) ++ 347 + 348 + # Optional features 349 + optional (isl != null) "--with-isl=${isl}" ++ 350 + 351 + # Java options 352 + optionals langJava [ 353 + "--with-ecj-jar=${javaEcj}" 338 354 339 355 # Follow Sun's layout for the convenience of IcedTea/OpenJDK. See 340 356 # <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-April/008888.html>. 341 - "--enable-java-home --with-java-home=\${prefix}/lib/jvm/jre " 342 - else ""} 343 - ${if javaAwtGtk then "--enable-java-awt=gtk" else ""} 344 - ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""} 345 - --with-gmp-include=${gmp.dev}/include 346 - --with-gmp-lib=${gmp.out}/lib 347 - --with-mpfr-include=${mpfr.dev}/include 348 - --with-mpfr-lib=${mpfr.out}/lib 349 - --with-mpc=${libmpc} 350 - ${if libelf != null then "--with-libelf=${libelf}" else ""} 351 - --disable-libstdcxx-pch 352 - --without-included-gettext 353 - --with-system-zlib 354 - --enable-static 355 - --enable-languages=${ 356 - concatStrings (intersperse "," 357 - ( optional langC "c" 358 - ++ optional langCC "c++" 359 - ++ optional langFortran "fortran" 360 - ++ optional langJava "java" 361 - ++ optional langAda "ada" 362 - ++ optional langVhdl "vhdl" 363 - ++ optional langGo "go" 364 - ++ optional langObjC "objc" 365 - ++ optional langObjCpp "obj-c++" 366 - ++ optionals crossDarwin [ "objc" "obj-c++" ] 367 - ) 368 - ) 369 - } 370 - ${if targetPlatform == hostPlatform 371 - then if hostPlatform.isDarwin 372 - then " --with-native-system-header-dir=${darwin.usr-include}" 373 - else " --with-native-system-header-dir=${getDev stdenv.cc.libc}/include" 374 - else ""} 375 - ${if langAda then " --enable-libada" else ""} 376 - ${if targetPlatform == hostPlatform && targetPlatform.isi686 then "--with-arch=i686" else ""} 377 - ${if targetPlatform != hostPlatform then crossConfigureFlags else ""} 378 - ${if !bootstrap then "--disable-bootstrap" else ""} 379 - ${if targetPlatform == hostPlatform then platformFlags else ""} 380 - "; 357 + "--enable-java-home" 358 + "--with-java-home=\${prefix}/lib/jvm/jre" 359 + ] ++ 360 + optional javaAwtGtk "--enable-java-awt=gtk" ++ 361 + optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr}" ++ 362 + 363 + # Ada 364 + optional langAda "--enable-libada" ++ 365 + 366 + # Cross-compilation 367 + optional (targetPlatform == hostPlatform) ( 368 + let incDir = if hostPlatform.isDarwin 369 + then "${darwin.usr-include}" 370 + else "${getDev stdenv.cc.libc}/include"; 371 + in "--with-native-system-header-dir=${incDir}" 372 + ) ++ 373 + 374 + optional (targetPlatform == hostPlatform) (mkPlatformFlags stdenv.platform) ++ 375 + optional (targetPlatform != hostPlatform) crossConfigureFlags ++ 376 + optional (!bootstrap) "--disable-bootstrap" ++ 377 + 378 + # Platform-specific flags 379 + optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++ 380 + optionals hostPlatform.isSunOS [ 381 + "--enable-long-long" "--enable-libssp" "--enable-threads=posix" "--disable-nls" "--enable-__cxa_atexit" 382 + # On Illumos/Solaris GNU as is preferred 383 + "--with-gnu-as" "--without-gnu-ld" 384 + ] 385 + ; 381 386 382 387 targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; 383 388 ··· 390 395 then "install-strip" 391 396 else "install"; 392 397 398 + /* For cross-built gcc (build != host == target) */ 393 399 crossAttrs = let 394 400 xgccArch = targetPlatform.gcc.arch or null; 395 401 xgccCpu = targetPlatform.gcc.cpu or null; 396 402 xgccAbi = targetPlatform.gcc.abi or null; 397 403 xgccFpu = targetPlatform.gcc.fpu or null; 398 404 xgccFloat = targetPlatform.gcc.float or null; 399 - xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else ""; 400 - xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else ""; 401 - xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else ""; 402 - xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else ""; 403 - xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else ""; 404 405 in { 405 406 AR = "${targetPlatform.config}-ar"; 406 407 LD = "${targetPlatform.config}-ld"; ··· 414 415 # If we are making a cross compiler, cross != null 415 416 NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; 416 417 dontStrip = true; 417 - configureFlags = '' 418 - ${if enableMultilib then "" else "--disable-multilib"} 419 - ${if enableShared then "" else "--disable-shared"} 420 - ${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""} 421 - ${if javaAwtGtk then "--enable-java-awt=gtk" else ""} 422 - ${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""} 423 - --with-gmp=${gmp.crossDrv} 424 - --with-mpfr=${mpfr.crossDrv} 425 - --with-mpc=${libmpc.crossDrv} 426 - --disable-libstdcxx-pch 427 - --without-included-gettext 428 - --with-system-zlib 429 - --enable-languages=${ 430 - concatStrings (intersperse "," 431 - ( optional langC "c" 432 - ++ optional langCC "c++" 433 - ++ optional langFortran "fortran" 434 - ++ optional langJava "java" 435 - ++ optional langAda "ada" 436 - ++ optional langVhdl "vhdl" 437 - ++ optional langGo "go" 418 + configureFlags = 419 + optional (!enableMultilib) "--disable-multilib" ++ 420 + optional (!enableShared) "--disable-shared" ++ 421 + optional langJava "--with-ecj-jar=${javaEcj.crossDrv}" ++ 422 + optional javaAwtGtk "--enable-java-awt=gtk" ++ 423 + optional (langJava && javaAntlr != null) "--with-antlr-jar=${javaAntlr.crossDrv}" ++ 424 + [ 425 + "--with-gmp=${gmp.crossDrv}" 426 + "--with-mpfr=${mpfr.crossDrv}" 427 + "--with-mpc=${libmpc.crossDrv}" 428 + "--disable-libstdcxx-pch" 429 + "--without-included-gettext" 430 + "--with-system-zlib" 431 + "--enable-languages=${ 432 + concatStrings (intersperse "," 433 + ( optional langC "c" 434 + ++ optional langCC "c++" 435 + ++ optional langFortran "fortran" 436 + ++ optional langJava "java" 437 + ++ optional langAda "ada" 438 + ++ optional langVhdl "vhdl" 439 + ++ optional langGo "go" 440 + ) 438 441 ) 439 - ) 440 - } 441 - ${if langAda then " --enable-libada" else ""} 442 - ${xwithArch} 443 - ${xwithCpu} 444 - ${xwithAbi} 445 - ${xwithFpu} 446 - ${xwithFloat} 447 - ''; 442 + }" 443 + ] ++ 444 + optional langAda "--enable-libada" ++ 445 + optional (xgccArch != null) "--with-arch=${xgccArch}" ++ 446 + optional (xgccCpu != null) "--with-cpu=${xgccCpu}" ++ 447 + optional (xgccAbi != null) "--with-abi=${xgccAbi}" ++ 448 + optional (xgccFpu != null) "--with-fpu=${xgccFpu}" ++ 449 + optional (xgccFloat != null) "--with-float=${xgccFloat}" 450 + ; 448 451 buildFlags = ""; 449 452 }; 450 453
+3
pkgs/development/compilers/go/1.4.nix
··· 23 23 24 24 hardeningDisable = [ "all" ]; 25 25 26 + # The tests try to do stuff with 127.0.0.1 and localhost 27 + __darwinAllowLocalNetworking = true; 28 + 26 29 # I'm not sure what go wants from its 'src', but the go installation manual 27 30 # describes an installation keeping the src. 28 31 preUnpack = ''
+2 -2
pkgs/development/compilers/llvm/3.4/llvm.nix
··· 6 6 , cmake 7 7 , python2 8 8 , libffi 9 - , binutils 9 + , libbfd 10 10 , libxml2 11 11 , valgrind 12 12 , ncurses ··· 67 67 "-DLLVM_BUILD_TESTS=ON" 68 68 "-DLLVM_ENABLE_FFI=ON" 69 69 "-DLLVM_REQUIRES_RTTI=1" 70 - "-DLLVM_BINUTILS_INCDIR=${stdenv.lib.getDev binutils}/include" 70 + "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" 71 71 "-DCMAKE_CXX_FLAGS=-std=c++11" 72 72 ] ++ stdenv.lib.optional (!stdenv.isDarwin) "-DBUILD_SHARED_LIBS=ON"; 73 73
+2 -2
pkgs/development/compilers/llvm/3.5/llvm.nix
··· 6 6 , cmake 7 7 , python 8 8 , libffi 9 - , binutils 9 + , libbfd 10 10 , libxml2 11 11 , valgrind 12 12 , ncurses ··· 70 70 ] ++ stdenv.lib.optional enableSharedLibraries 71 71 "-DBUILD_SHARED_LIBS=ON" 72 72 ++ stdenv.lib.optional (!isDarwin) 73 - "-DLLVM_BINUTILS_INCDIR=${stdenv.lib.getDev binutils}/include" 73 + "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" 74 74 ++ stdenv.lib.optionals ( isDarwin) [ 75 75 "-DCMAKE_CXX_FLAGS=-stdlib=libc++" 76 76 "-DCAN_TARGET_i386=false"
+2 -2
pkgs/development/compilers/llvm/3.7/llvm.nix
··· 6 6 , cmake 7 7 , python2 8 8 , libffi 9 - , binutils 9 + , libbfd 10 10 , libxml2 11 11 , valgrind 12 12 , ncurses ··· 80 80 ] ++ stdenv.lib.optional enableSharedLibraries 81 81 "-DBUILD_SHARED_LIBS=ON" 82 82 ++ stdenv.lib.optional (!isDarwin) 83 - "-DLLVM_BINUTILS_INCDIR=${stdenv.lib.getDev binutils}/include" 83 + "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" 84 84 ++ stdenv.lib.optionals ( isDarwin) [ 85 85 "-DLLVM_ENABLE_LIBCXX=ON" 86 86 "-DCAN_TARGET_i386=false"
+2 -2
pkgs/development/compilers/llvm/3.8/llvm.nix
··· 6 6 , cmake 7 7 , python 8 8 , libffi 9 - , binutils 9 + , libbfd 10 10 , libxml2 11 11 , valgrind 12 12 , ncurses ··· 79 79 ] ++ stdenv.lib.optional enableSharedLibraries [ 80 80 "-DLLVM_LINK_LLVM_DYLIB=ON" 81 81 ] ++ stdenv.lib.optional (!isDarwin) 82 - "-DLLVM_BINUTILS_INCDIR=${stdenv.lib.getDev binutils}/include" 82 + "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" 83 83 ++ stdenv.lib.optionals ( isDarwin) [ 84 84 "-DLLVM_ENABLE_LIBCXX=ON" 85 85 "-DCAN_TARGET_i386=false"
+2 -2
pkgs/development/compilers/llvm/3.9/llvm.nix
··· 6 6 , cmake 7 7 , python 8 8 , libffi 9 - , binutils 9 + , libbfd 10 10 , libxml2 11 11 , valgrind 12 12 , ncurses ··· 123 123 ] ++ stdenv.lib.optional enableSharedLibraries [ 124 124 "-DLLVM_LINK_LLVM_DYLIB=ON" 125 125 ] ++ stdenv.lib.optional (!isDarwin) 126 - "-DLLVM_BINUTILS_INCDIR=${stdenv.lib.getDev binutils}/include" 126 + "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" 127 127 ++ stdenv.lib.optionals (isDarwin) [ 128 128 "-DLLVM_ENABLE_LIBCXX=ON" 129 129 "-DCAN_TARGET_i386=false"
+2 -2
pkgs/development/compilers/llvm/4/llvm.nix
··· 6 6 , cmake 7 7 , python 8 8 , libffi 9 - , binutils 9 + , libbfd 10 10 , libxml2 11 11 , valgrind 12 12 , ncurses ··· 107 107 "-DSPHINX_WARNINGS_AS_ERRORS=OFF" 108 108 ] 109 109 ++ stdenv.lib.optional (!isDarwin) 110 - "-DLLVM_BINUTILS_INCDIR=${stdenv.lib.getDev binutils}/include" 110 + "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" 111 111 ++ stdenv.lib.optionals (isDarwin) [ 112 112 "-DLLVM_ENABLE_LIBCXX=ON" 113 113 "-DCAN_TARGET_i386=false"
+2 -2
pkgs/development/compilers/llvm/5/llvm.nix
··· 6 6 , cmake 7 7 , python 8 8 , libffi 9 - , binutils 9 + , libbfd 10 10 , libxml2 11 11 , valgrind 12 12 , ncurses ··· 101 101 "-DSPHINX_WARNINGS_AS_ERRORS=OFF" 102 102 ] 103 103 ++ stdenv.lib.optional (!isDarwin) 104 - "-DLLVM_BINUTILS_INCDIR=${stdenv.lib.getDev binutils}/include" 104 + "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" 105 105 ++ stdenv.lib.optionals (isDarwin) [ 106 106 "-DLLVM_ENABLE_LIBCXX=ON" 107 107 "-DCAN_TARGET_i386=false"
+2 -2
pkgs/development/compilers/mono/llvm.nix
··· 5 5 , cmake 6 6 , python 7 7 , libffi 8 - , binutils 8 + , libbfd 9 9 , libxml2 10 10 , valgrind 11 11 , ncurses ··· 42 42 43 43 cmakeFlags = with stdenv; [ 44 44 "-DLLVM_ENABLE_FFI=ON" 45 - "-DLLVM_BINUTILS_INCDIR=${stdenv.lib.getDev binutils}/include" 45 + "-DLLVM_BINUTILS_INCDIR=${libbfd.dev}/include" 46 46 "-DCMAKE_CXX_FLAGS=-std=c++11" 47 47 ] ++ stdenv.lib.optional (!isDarwin) "-DBUILD_SHARED_LIBS=ON"; 48 48
+5
pkgs/development/compilers/rust/binaryBuild.nix
··· 70 70 --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \ 71 71 "$out/bin/rustdoc" 72 72 ''} 73 + ${optionalString (stdenv.isDarwin && bootstrapping) '' 74 + install_name_tool -change /usr/lib/libiconv.2.dylib '${darwin.libiconv}/lib/libiconv.2.dylib' "$out/bin/cargo" 75 + install_name_tool -change /usr/lib/libcurl.4.dylib '${stdenv.lib.getLib curl}/lib/libcurl.4.dylib' "$out/bin/cargo" 76 + install_name_tool -change /usr/lib/libz.1.dylib '${stdenv.lib.getLib zlib}/lib/libz.1.dylib' "$out/bin/cargo" 77 + ''} 73 78 74 79 ${patchBootstrapCargo} 75 80
+9 -1
pkgs/development/compilers/rust/rustc.nix
··· 32 32 33 33 inherit src; 34 34 35 - __impureHostDeps = [ "/usr/lib/libedit.3.dylib" ]; 35 + __darwinAllowLocalNetworking = true; 36 36 37 37 NIX_LDFLAGS = optionalString stdenv.isDarwin "-rpath ${llvmShared}/lib"; 38 38 ··· 109 109 # Disable all lldb tests. 110 110 # error: Can't run LLDB test because LLDB's python path is not set 111 111 rm -vr src/test/debuginfo/* 112 + 113 + # Disable tests that fail when sandboxing is enabled. 114 + substituteInPlace src/libstd/sys/unix/ext/net.rs \ 115 + --replace '#[test]' '#[test] #[ignore]' 116 + substituteInPlace src/test/run-pass/env-home-dir.rs \ 117 + --replace 'home_dir().is_some()' true 118 + rm -v src/test/run-pass/fds-are-cloexec.rs # FIXME: pipes? 119 + rm -v src/test/run-pass/sync-send-in-std.rs # FIXME: ??? 112 120 ''; 113 121 114 122 preConfigure = ''
+2 -2
pkgs/development/interpreters/lush/default.nix
··· 1 1 {stdenv, fetchurl, libX11, xproto, indent, readline, gsl, freeglut, mesa, SDL 2 - , blas, binutils, intltool, gettext, zlib, libSM}: 2 + , blas, libbfd, intltool, gettext, zlib, libSM}: 3 3 4 4 stdenv.mkDerivation rec { 5 5 baseName = "lush"; ··· 12 12 }; 13 13 14 14 buildInputs = [ 15 - libX11 libSM xproto indent readline gsl freeglut mesa SDL blas binutils 15 + libX11 libSM xproto indent readline gsl freeglut mesa SDL blas libbfd 16 16 intltool gettext zlib 17 17 ]; 18 18
-1
pkgs/development/interpreters/perl/default.nix
··· 44 44 substituteInPlace dist/PathTools/Cwd.pm \ 45 45 --replace "/bin/pwd" "$pwd" 46 46 ''; 47 - sandboxProfile = sandbox.allow "ipc-sysv-sem"; 48 47 49 48 # Build a thread-safe Perl with a dynamic libperls.o. We need the 50 49 # "installstyle" option to ensure that modules are put under
+3 -2
pkgs/development/libraries/SDL2/default.nix
··· 54 54 # https://bugzilla.libsdl.org/show_bug.cgi?id=1431 55 55 dontDisableStatic = true; 56 56 57 - # Flaky: fatal error: pointer-constraints-....h: No such file or directory 58 - #enableParallelBuilding = true; 57 + # /build/SDL2-2.0.7/src/video/wayland/SDL_waylandevents.c:41:10: fatal error: 58 + # pointer-constraints-unstable-v1-client-protocol.h: No such file or directory 59 + enableParallelBuilding = false; 59 60 60 61 # XXX: By default, SDL wants to dlopen() PulseAudio, in which case 61 62 # we must arrange to add it to its RPATH; however, `patchelf' seems
+2
pkgs/development/libraries/boehm-gc/default.nix
··· 31 31 mv $out/share/gc $out/share/doc/gc 32 32 ''; 33 33 34 + enableParallelBuilding = true; 35 + 34 36 meta = { 35 37 description = "The Boehm-Demers-Weiser conservative garbage collector for C and C++"; 36 38
+2
pkgs/development/libraries/czmq/3.x.nix
··· 9 9 sha256 = "16k9awrhdsymx7dnmvqcnkaq8lz8x8zppy6sh7ls8prpd6mkkjlb"; 10 10 }; 11 11 12 + patches = [ ./czmq3-gcc7.patch ]; 13 + 12 14 # Fix build on Glibc 2.24. 13 15 NIX_CFLAGS_COMPILE = "-Wno-error=deprecated-declarations"; 14 16
+8 -1
pkgs/development/libraries/czmq/4.x.nix
··· 1 - { stdenv, fetchurl, zeromq }: 1 + { stdenv, fetchurl, fetchpatch, zeromq }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 version = "4.0.2"; ··· 8 8 url = "https://github.com/zeromq/czmq/releases/download/v${version}/${name}.tar.gz"; 9 9 sha256 = "12gbh57xnz2v82x1g80gv4bwapmyzl00lbin5ix3swyac8i7m340"; 10 10 }; 11 + 12 + patches = [ 13 + (fetchpatch { 14 + url = https://patch-diff.githubusercontent.com/raw/zeromq/czmq/pull/1618.patch; 15 + sha256 = "1dssy7k0fni6djail8rz0lk8p777158jvrqhgn500i636gkxaxhp"; 16 + }) 17 + ]; 11 18 12 19 # Needs to be propagated for the .pc file to work 13 20 propagatedBuildInputs = [ zeromq ];
+26
pkgs/development/libraries/czmq/czmq3-gcc7.patch
··· 1 + diff --git a/src/zgossip_engine.inc b/src/zgossip_engine.inc 2 + index 37dbb4eb..727aaa9b 100644 3 + --- a/src/zgossip_engine.inc 4 + +++ b/src/zgossip_engine.inc 5 + @@ -258,7 +258,7 @@ engine_set_log_prefix (client_t *client, const char *string) 6 + { 7 + if (client) { 8 + s_client_t *self = (s_client_t *) client; 9 + - snprintf (self->log_prefix, sizeof (self->log_prefix) - 1, 10 + + snprintf (self->log_prefix, sizeof (self->log_prefix), 11 + "%6d:%-33s", self->unique_id, string); 12 + } 13 + } 14 + diff --git a/src/zsys.c b/src/zsys.c 15 + index 4d0bb8a1..f07db9c8 100644 16 + --- a/src/zsys.c 17 + +++ b/src/zsys.c 18 + @@ -1071,7 +1071,7 @@ zsys_run_as (const char *lockfile, const char *group, const char *user) 19 + } 20 + } 21 + // We record the current process id in the lock file 22 + - char pid_buffer [10]; 23 + + char pid_buffer [32]; 24 + snprintf (pid_buffer, sizeof (pid_buffer), "%6d\n", getpid ()); 25 + if (write (handle, pid_buffer, strlen (pid_buffer)) != strlen (pid_buffer)) { 26 + zsys_error ("cannot write to lockfile: %s", strerror (errno));
+1
pkgs/development/libraries/glibc/common.nix
··· 91 91 configureFlags = 92 92 [ "-C" 93 93 "--enable-add-ons" 94 + "--enable-obsolete-nsl" 94 95 "--enable-obsolete-rpc" 95 96 "--sysconfdir=/etc" 96 97 "--enable-stackguard-randomization"
+11 -4
pkgs/development/libraries/gtk+/3.x.nix
··· 1 - { stdenv, fetchurl, pkgconfig, gettext, perl 1 + { stdenv, fetchurl, fetchpatch, pkgconfig, gettext, perl 2 2 , expat, glib, cairo, pango, gdk_pixbuf, atk, at_spi2_atk, gobjectIntrospection 3 3 , xorg, epoxy, json_glib, libxkbcommon, gmp 4 4 , waylandSupport ? stdenv.isLinux, wayland, wayland-protocols ··· 13 13 14 14 let 15 15 ver_maj = "3.22"; 16 - ver_min = "24"; 16 + ver_min = "26"; 17 17 version = "${ver_maj}.${ver_min}"; 18 18 in 19 19 stdenv.mkDerivation rec { ··· 21 21 22 22 src = fetchurl { 23 23 url = "mirror://gnome/sources/gtk+/${ver_maj}/gtk+-${version}.tar.xz"; 24 - sha256 = "cbb16e4cfc928ab8f5f22f7290616f95f6ebc8c97cc724a2007b07ced833592b"; 24 + sha256 = "61eef0d320e541976e2dfe445729f12b5ade53050ee9de6184235cb60cd4b967"; 25 25 }; 26 26 27 27 outputs = [ "out" "dev" ]; ··· 29 29 30 30 nativeBuildInputs = [ pkgconfig gettext gobjectIntrospection perl ]; 31 31 32 - patches = [ ./3.0-immodules.cache.patch ]; 32 + patches = [ 33 + ./3.0-immodules.cache.patch 34 + (fetchpatch { 35 + name = "Xft-setting-fallback-compute-DPI-properly.patch"; 36 + url = "https://bug757142.bugzilla-attachments.gnome.org/attachment.cgi?id=344123"; 37 + sha256 = "0g6fhqcv8spfy3mfmxpyji93k8d4p4q4fz1v9a1c1cgcwkz41d7p"; 38 + }) 39 + ]; 33 40 34 41 buildInputs = [ libxkbcommon epoxy json_glib ]; 35 42 propagatedBuildInputs = with xorg; with stdenv.lib;
+47
pkgs/development/libraries/libbfd/default.nix
··· 1 + { stdenv 2 + , fetchurl, autoreconfHook264, bison, binutils-raw 3 + , libiberty, zlib 4 + }: 5 + 6 + stdenv.mkDerivation rec { 7 + name = "libbfd-${version}"; 8 + inherit (binutils-raw) version src; 9 + 10 + outputs = [ "out" "dev" ]; 11 + 12 + patches = binutils-raw.patches ++ [ 13 + ../../tools/misc/binutils/build-components-separately.patch 14 + ]; 15 + 16 + # We just want to build libbfd 17 + postPatch = '' 18 + cd bfd 19 + ''; 20 + 21 + nativeBuildInputs = [ autoreconfHook264 bison ]; 22 + buildInputs = [ libiberty zlib ]; 23 + 24 + configurePlatforms = [ "build" "host" ]; 25 + configureFlags = [ 26 + "--enable-targets=all" "--enable-64-bit-bfd" 27 + "--enable-install-libbfd" 28 + "--enable-shared" 29 + "--with-system-zlib" 30 + ]; 31 + 32 + enableParallelBuilding = true; 33 + 34 + meta = with stdenv.lib; { 35 + description = "A library for manipulating containers of machine code"; 36 + longDescription = '' 37 + BFD is a library which provides a single interface to read and write 38 + object files, executables, archive files, and core files in any format. 39 + It is associated with GNU Binutils, and elsewhere often distributed with 40 + it. 41 + ''; 42 + homepage = http://www.gnu.org/software/binutils/; 43 + license = licenses.gpl3Plus; 44 + maintainers = with maintainers; [ ericson2314 ]; 45 + platforms = platforms.unix; 46 + }; 47 + }
+7 -4
pkgs/development/libraries/libiberty/default.nix
··· 1 - { stdenv, lib, fetchurl, gcc, staticBuild ? false }: 1 + { stdenv, fetchurl, gcc, staticBuild ? false }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "libiberty-${gcc.cc.version}"; 5 5 6 6 inherit (gcc.cc) src; 7 7 8 + outputs = [ "out" "dev" ]; 9 + 8 10 postUnpack = "sourceRoot=\${sourceRoot}/libiberty"; 9 11 10 - configureFlags = [ "--enable-install-libiberty" ] ++ lib.optional (!staticBuild) "--enable-shared"; 12 + configureFlags = [ "--enable-install-libiberty" ] 13 + ++ stdenv.lib.optional (!staticBuild) "--enable-shared"; 11 14 12 - postInstall = lib.optionalString (!staticBuild) '' 15 + postInstall = stdenv.lib.optionalString (!staticBuild) '' 13 16 cp pic/libiberty.a $out/lib*/libiberty.a 14 17 ''; 15 18 ··· 17 20 homepage = http://gcc.gnu.org/; 18 21 license = licenses.lgpl2; 19 22 description = "Collection of subroutines used by various GNU programs"; 20 - maintainers = with maintainers; [ abbradar ]; 23 + maintainers = with maintainers; [ abbradar ericson2314 ]; 21 24 platforms = platforms.unix; 22 25 }; 23 26 }
+43
pkgs/development/libraries/libopcodes/default.nix
··· 1 + { stdenv, buildPackages 2 + , fetchurl, autoreconfHook264, bison, binutils-raw 3 + , libiberty, libbfd 4 + }: 5 + 6 + stdenv.mkDerivation rec { 7 + name = "libopcodes-${version}"; 8 + inherit (binutils-raw) version src; 9 + 10 + outputs = [ "out" "dev" ]; 11 + 12 + patches = binutils-raw.patches ++ [ 13 + ../../tools/misc/binutils/build-components-separately.patch 14 + ]; 15 + 16 + # We just want to build libopcodes 17 + postPatch = '' 18 + cd opcodes 19 + find . ../include/opcode -type f -exec sed {} -i -e 's/"bfd.h"/<bfd.h>/' \; 20 + ''; 21 + 22 + nativeBuildInputs = [ autoreconfHook264 bison buildPackages.stdenv.cc ]; 23 + buildInputs = [ libiberty ]; 24 + # dis-asm.h includes bfd.h 25 + propagatedBuildInputs = [ libbfd ]; 26 + 27 + configurePlatforms = [ "build" "host" ]; 28 + configureFlags = [ 29 + "--enable-targets=all" "--enable-64-bit-bfd" 30 + "--enable-install-libbfd" 31 + "--enable-shared" 32 + ]; 33 + 34 + enableParallelBuilding = true; 35 + 36 + meta = with stdenv.lib; { 37 + description = "A library from binutils for manipulating machine code"; 38 + homepage = http://www.gnu.org/software/binutils/; 39 + license = licenses.gpl3Plus; 40 + maintainers = with maintainers; [ ericson2314 ]; 41 + platforms = platforms.unix; 42 + }; 43 + }
+2 -2
pkgs/development/libraries/libusb1/default.nix
··· 1 1 { stdenv, fetchurl, pkgconfig, systemd ? null, libobjc, IOKit }: 2 2 3 3 stdenv.mkDerivation rec { 4 - name = "libusb-1.0.20"; 4 + name = "libusb-1.0.21"; 5 5 6 6 src = fetchurl { 7 7 url = "mirror://sourceforge/libusb/${name}.tar.bz2"; 8 - sha256 = "1zzp6hc7r7m3gl6zjbmzn92zkih4664cckaf49l1g5hapa8721fb"; 8 + sha256 = "0jw2n5kdnrqvp7zh792fd6mypzzfap6jp4gfcmq4n6c1kb79rkkx"; 9 9 }; 10 10 11 11 outputs = [ "out" "dev" ]; # get rid of propagating systemd closure
+2 -2
pkgs/development/libraries/libuv/default.nix
··· 2 2 , ApplicationServices, CoreServices }: 3 3 4 4 stdenv.mkDerivation rec { 5 - version = "1.15.0"; 5 + version = "1.16.1"; 6 6 name = "libuv-${version}"; 7 7 8 8 src = fetchFromGitHub { 9 9 owner = "libuv"; 10 10 repo = "libuv"; 11 11 rev = "v${version}"; 12 - sha256 = "092hxqjvbb6d03h3msc38359w2kixba1ansyrsbyqq8iqiqwnkw0"; 12 + sha256 = "06p3xy276spqbr9xzbs7qlpdk34qsn87s2qmp6xn4j7v3bnqja7z"; 13 13 }; 14 14 15 15 postPatch = let
+2 -3
pkgs/development/libraries/lightning/default.nix
··· 1 - { stdenv, fetchurl, binutils }: 1 + { stdenv, fetchurl, libopcodes }: 2 2 3 3 with stdenv.lib; 4 4 stdenv.mkDerivation rec { ··· 11 11 sha256 = "19j9nwl88k660045s40cbz5zrl1wpd2mcxnnc8qqnnaj311a58qz"; 12 12 }; 13 13 14 - # Needs libopcodes.so from binutils for 'make check' 15 - buildInputs = [ binutils ]; 14 + buildInputs = stdenv.lib.optional doCheck libopcodes; 16 15 17 16 doCheck = true; 18 17
+1 -1
pkgs/development/libraries/qt-4.x/4.8/default.nix
··· 164 164 165 165 nativeBuildInputs = [ perl pkgconfig which ]; 166 166 167 - enableParallelBuilding = false; 167 + enableParallelBuilding = true; 168 168 169 169 NIX_CFLAGS_COMPILE = 170 170 optionalString stdenv.isLinux "-std=gnu++98" # gnu++ in (Obj)C flags is no good on Darwin
+4
pkgs/development/libraries/science/math/atlas/default.nix
··· 100 100 fi 101 101 ''; 102 102 103 + # 1. /buildATLAS/build/bin/ATLrun.sh: multiple segfaults. 104 + # 2. "atlas does its own parallel builds" 105 + enableParallelBuilding = false; 106 + 103 107 meta = { 104 108 homepage = http://math-atlas.sourceforge.net/; 105 109 description = "Automatically Tuned Linear Algebra Software (ATLAS)";
+2 -2
pkgs/development/libraries/wayland/default.nix
··· 8 8 9 9 stdenv.mkDerivation rec { 10 10 name = "wayland-${version}"; 11 - version = "1.12.0"; 11 + version = "1.14.0"; 12 12 13 13 src = fetchurl { 14 14 url = "http://wayland.freedesktop.org/releases/${name}.tar.xz"; 15 - sha256 = "d6b4135cba0188abcb7275513c72dede751d6194f6edc5b82183a3ba8b821ab1"; 15 + sha256 = "1f3sla6h0bw15fz8pjc67jhwj7pwmfdc7qlj42j5k9v116ycm07d"; 16 16 }; 17 17 18 18 configureFlags = [ "--with-scanner" "--disable-documentation" ];
+2 -2
pkgs/development/libraries/wayland/protocols.nix
··· 4 4 5 5 stdenv.mkDerivation rec { 6 6 name = "wayland-protocols-${version}"; 7 - version = "1.10"; 7 + version = "1.11"; 8 8 9 9 src = fetchurl { 10 10 url = "http://wayland.freedesktop.org/releases/${name}.tar.xz"; 11 - sha256 = "5719c51d7354864983171c5083e93a72ac99229e2b460c4bb10513de08839c0a"; 11 + sha256 = "0138psvx6fv8z5x2p6xi4iij6m5k62c0qyfsb45xgcf5a4fyxz1s"; 12 12 }; 13 13 14 14 nativeBuildInputs = [ pkgconfig ];
+14
pkgs/development/python-modules/cffi/default.nix
··· 17 17 propagatedBuildInputs = [ libffi pycparser ]; 18 18 buildInputs = [ pytest ]; 19 19 20 + # On Darwin, the cffi tests want to hit libm a lot, and look for it in a global 21 + # impure search path. It's obnoxious how much repetition there is, and how difficult 22 + # it is to get it to search somewhere else (since we do actually have a libm symlink in libSystem) 23 + prePatch = stdenv.lib.optionalString stdenv.isDarwin '' 24 + substituteInPlace testing/cffi0/test_parsing.py \ 25 + --replace 'lib_m = "m"' 'lib_m = "System"' \ 26 + --replace '"libm" in name' '"libSystem" in name' 27 + substituteInPlace testing/cffi0/test_unicode_literals.py --replace 'lib_m = "m"' 'lib_m = "System"' 28 + substituteInPlace testing/cffi0/test_zdistutils.py --replace 'self.lib_m = "m"' 'self.lib_m = "System"' 29 + substituteInPlace testing/cffi1/test_recompiler.py --replace 'lib_m = "m"' 'lib_m = "System"' 30 + substituteInPlace testing/cffi0/test_function.py --replace "lib_m = 'm'" "lib_m = 'System'" 31 + substituteInPlace testing/cffi0/test_verify.py --replace "lib_m = ['m']" "lib_m = ['System']" 32 + ''; 33 + 20 34 # The tests use -Werror but with python3.6 clang detects some unreachable code. 21 35 NIX_CFLAGS_COMPILE = stdenv.lib.optionals stdenv.cc.isClang [ "-Wno-unused-command-line-argument" "-Wno-unreachable-code" ]; 22 36
+11 -9
pkgs/development/python-modules/pybfd/default.nix
··· 1 - { lib, buildPythonPackage, isPyPy, isPy3k, fetchurl, gdb, binutils }: 1 + { lib, fetchFromGitHub, buildPythonPackage, isPyPy, isPy3k, libbfd, libopcodes }: 2 2 3 3 buildPythonPackage rec { 4 4 name = "pybfd-0.1.1"; 5 5 6 6 disabled = isPyPy || isPy3k; 7 7 8 - src = fetchurl { 9 - url = "mirror://pypi/p/pybfd/${name}.tar.gz"; 10 - sha256 = "d99b32ad077e704ddddc0b488c83cae851c14919e5cbc51715d00464a1932df4"; 8 + src = fetchFromGitHub { 9 + owner = "orivej"; 10 + repo = "pybfd"; 11 + rev = "a2c3a7b94a3c9f7a353b863f69a79174c6a41ebe"; 12 + sha256 = "0wrz234dz25hs0ajzcz5w8lzc1yzf64wqa8fj01hhr4yy23vjkcr"; 11 13 }; 12 14 13 - preConfigure = '' 14 - substituteInPlace setup.py \ 15 - --replace '"/usr/include"' '"${gdb}/include"' \ 16 - --replace '"/usr/lib"' '"${binutils.lib}/lib"' 17 - ''; 15 + LIBBFD_INCLUDE_DIR = "${libbfd.dev}/include"; 16 + LIBBFD_LIBRARY = "${libbfd}/lib/libbfd.so"; 17 + LIBOPCODES_INCLUDE_DIR = "${libopcodes.dev}/include"; 18 + LIBOPCODES_LIBRARY = "${libopcodes}/lib/libopcodes.so"; 18 19 19 20 meta = { 20 21 homepage = https://github.com/Groundworkstech/pybfd; 21 22 description = "A Python interface to the GNU Binary File Descriptor (BFD) library"; 22 23 license = lib.licenses.gpl2; 23 24 platforms = lib.platforms.linux; 25 + maintainers = with lib.maintainers; [ orivej ]; 24 26 }; 25 27 }
+2 -2
pkgs/development/python-modules/pytest/default.nix
··· 2 2 , setuptools_scm 3 3 }: 4 4 buildPythonPackage rec { 5 - version = "3.2.3"; 5 + version = "3.2.5"; 6 6 pname = "pytest"; 7 7 name = "${pname}-${version}"; 8 8 ··· 13 13 14 14 src = fetchPypi { 15 15 inherit pname version; 16 - sha256 = "27fa6617efc2869d3e969a3e75ec060375bfb28831ade8b5cdd68da3a741dc3c"; 16 + sha256 = "6d5bd4f7113b444c55a3bbb5c738a3dd80d43563d063fc42dcb0aaefbdd78b81"; 17 17 }; 18 18 19 19 buildInputs = [ hypothesis setuptools_scm ];
+4 -3
pkgs/development/tools/analysis/kcov/default.nix
··· 1 - {stdenv, fetchFromGitHub, cmake, pkgconfig, zlib, curl, elfutils, python, libiberty, binutils}: 1 + {stdenv, fetchFromGitHub, cmake, pkgconfig, zlib, curl, elfutils, python, libiberty, libopcodes}: 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "kcov-${version}"; ··· 12 12 }; 13 13 14 14 preConfigure = "patchShebangs src/bin-to-c-source.py"; 15 - nativeBuildInputs = [ pkgconfig ]; 16 - buildInputs = [ cmake zlib curl elfutils python libiberty binutils ]; 15 + nativeBuildInputs = [ cmake pkgconfig ]; 16 + 17 + buildInputs = [ zlib curl elfutils python libiberty libopcodes ]; 17 18 18 19 enableParallelBuilding = true; 19 20
+15 -16
pkgs/development/tools/build-managers/ninja/default.nix
··· 1 - { stdenv, fetchurl, python, asciidoc, re2c }: 1 + { stdenv, fetchFromGitHub, python, asciidoc, re2c }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "ninja-${version}"; 5 - version = "1.7.2"; 5 + version = "1.8.2"; 6 6 7 - src = fetchurl { 8 - name = "${name}.tar.gz"; 9 - url = "https://github.com/ninja-build/ninja/archive/v${version}.tar.gz"; 10 - sha256 = "1n8n3g26ppwh7zwrc37n3alkbpbj0wki34ih53s3rkhs8ajs1p9f"; 7 + src = fetchFromGitHub { 8 + owner = "ninja-build"; 9 + repo = "ninja"; 10 + rev = "v${version}"; 11 + sha256 = "16scq9hcq6c5ap6sy8j4qi75qps1zvrf3p79j1vbrvnqzp928i5f"; 11 12 }; 12 13 13 - buildInputs = [ python asciidoc re2c ]; 14 + nativeBuildInputs = [ python asciidoc re2c ]; 14 15 15 16 buildPhase = '' 16 - python bootstrap.py 17 + python configure.py --bootstrap 17 18 asciidoc doc/manual.asciidoc 18 19 ''; 19 20 20 21 installPhase = '' 21 - mkdir -p $out/bin 22 - cp ninja $out/bin/ 23 - 24 - mkdir -p $out/share/doc/ninja 25 - cp doc/manual.asciidoc $out/share/doc/ninja/ 26 - cp doc/manual.html $out/share/doc/ninja/ 22 + install -Dm555 -t $out/bin ninja 23 + install -Dm444 -t $out/share/doc/ninja doc/manual.asciidoc doc/manual.html 24 + install -Dm444 misc/bash-completion $out/share/bash-completion/completions/ninja 25 + install -Dm444 misc/zsh-completion $out/share/zsh/site-functions/_ninja 27 26 ''; 28 27 29 28 setupHook = ./setup-hook.sh; ··· 36 35 input files generated by a higher-level build system, and it is designed 37 36 to run builds as fast as possible. 38 37 ''; 39 - homepage = http://martine.github.io/ninja/; 38 + homepage = https://ninja-build.org/; 40 39 license = licenses.asl20; 41 40 platforms = platforms.unix; 42 - maintainers = [ maintainers.thoughtpolice maintainers.bjornfor ]; 41 + maintainers = with maintainers; [ thoughtpolice bjornfor orivej ]; 43 42 }; 44 43 }
+1 -1
pkgs/development/tools/build-managers/redo-sh/default.nix
··· 17 17 mv man "$out/share" 18 18 mv bin "$out" 19 19 for p in $out/bin/*; do 20 - wrapProgram "$p" --set PATH '$PATH:'"$out/bin" 20 + wrapProgram "$p" --suffix PATH : "$out/bin" 21 21 done 22 22 ''; 23 23
+178
pkgs/development/tools/misc/binutils/build-components-separately.patch
··· 1 + From bc09a9236f67e710d545ac11bcdac7b55dbcc1a0 Mon Sep 17 00:00:00 2001 2 + From: John Ericson <John.Ericson@Obsidian.Systems> 3 + Date: Thu, 12 Oct 2017 11:16:57 -0400 4 + Subject: [PATCH] Build components separately 5 + 6 + --- 7 + bfd/configure.ac | 18 +++--------------- 8 + opcodes/Makefile.am | 17 +++++++++++++---- 9 + opcodes/configure.ac | 45 ++++++--------------------------------------- 10 + 3 files changed, 22 insertions(+), 58 deletions(-) 11 + 12 + diff --git a/bfd/configure.ac b/bfd/configure.ac 13 + index 9a183c1628..8728837384 100644 14 + --- a/bfd/configure.ac 15 + +++ b/bfd/configure.ac 16 + @@ -241,31 +241,19 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed, 17 + 18 + LT_LIB_M 19 + 20 + -# When building a shared libbfd, link against the pic version of libiberty 21 + -# so that apps that use libbfd won't need libiberty just to satisfy any 22 + -# libbfd references. 23 + -# We can't do that if a pic libiberty is unavailable since including non-pic 24 + -# code would insert text relocations into libbfd. 25 + SHARED_LIBADD= 26 + -SHARED_LDFLAGS= 27 + +SHARED_LDFLAGS=-liberty 28 + if test "$enable_shared" = "yes"; then 29 + -changequote(,)dnl 30 + - x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` 31 + -changequote([,])dnl 32 + - if test -n "$x"; then 33 + - SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" 34 + - fi 35 + - 36 + # More hacks to build DLLs on Windows. 37 + case "${host}" in 38 + *-*-cygwin*) 39 + SHARED_LDFLAGS="-no-undefined" 40 + - SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32" 41 + + SHARED_LIBADD="-liberty -lintl -lcygwin -lkernel32" 42 + ;; 43 + 44 + # Hack to build or1k-src on OSX 45 + or1k*-*-darwin*) 46 + - SHARED_LIBADD="-L`pwd`/../libiberty/pic -L`pwd`/../intl -liberty -lintl" 47 + + SHARED_LIBADD="-liberty -lintl" 48 + ;; 49 + esac 50 + 51 + diff --git a/opcodes/Makefile.am b/opcodes/Makefile.am 52 + index 925e7ff651..47b395c195 100644 53 + --- a/opcodes/Makefile.am 54 + +++ b/opcodes/Makefile.am 55 + @@ -52,7 +52,7 @@ libopcodes_la_LDFLAGS += -rpath $(rpath_bfdlibdir) 56 + endif 57 + 58 + # This is where bfd.h lives. 59 + -BFD_H = ../bfd/bfd.h 60 + +BFD_H = $(BFDDIR)/bfd.h 61 + 62 + BUILD_LIBS = @BUILD_LIBS@ 63 + BUILD_LIB_DEPS = @BUILD_LIB_DEPS@ 64 + @@ -303,7 +303,7 @@ OFILES = @BFD_MACHINES@ 65 + # development.sh is used to determine -Werror default. 66 + CONFIG_STATUS_DEPENDENCIES = $(BFDDIR)/development.sh 67 + 68 + -AM_CPPFLAGS = -I. -I$(srcdir) -I../bfd -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ @INCINTL@ 69 + +AM_CPPFLAGS = -I. -I$(srcdir) -I$(INCDIR) -I$(BFDDIR) @HDEFINES@ @INCINTL@ 70 + 71 + disassemble.lo: disassemble.c 72 + if am__fastdepCC 73 + @@ -324,12 +324,21 @@ libopcodes_la_SOURCES = dis-buf.c disassemble.c dis-init.c 74 + # old version of libbfd, or to pick up libbfd for the wrong architecture 75 + # if host != build. So for building with shared libraries we use a 76 + # hardcoded path to libbfd.so instead of relying on the entries in libbfd.la. 77 + -libopcodes_la_DEPENDENCIES = $(OFILES) @SHARED_DEPENDENCIES@ 78 + +libopcodes_la_DEPENDENCIES = $(OFILES) @SHARED_DEPENDENCIES@ libtool-soversion 79 + libopcodes_la_LIBADD = $(OFILES) @SHARED_LIBADD@ 80 + -libopcodes_la_LDFLAGS += -release `cat ../bfd/libtool-soversion` @SHARED_LDFLAGS@ 81 + +libopcodes_la_LDFLAGS += -release `cat libtool-soversion` @SHARED_LDFLAGS@ 82 + # Allow dependency tracking to work on all the source files. 83 + EXTRA_libopcodes_la_SOURCES = $(LIBOPCODES_CFILES) 84 + 85 + +libtool-soversion: 86 + + @echo "creating $@" 87 + + bfd_soversion="$(VERSION)" ;\ 88 + + . $(BFDDIR)/development.sh ;\ 89 + + if test "$$development" = true ; then \ 90 + + bfd_soversion="$(VERSION).$${bfd_version_date}" ;\ 91 + + fi ;\ 92 + + echo "$${bfd_soversion}" > $@ 93 + + 94 + # libtool will build .libs/libopcodes.a. We create libopcodes.a in 95 + # the build directory so that we don't have to convert all the 96 + # programs that use libopcodes.a simultaneously. This is a hack which 97 + diff --git a/opcodes/configure.ac b/opcodes/configure.ac 98 + index b9f5eb8a4f..ef2c2152b7 100644 99 + --- a/opcodes/configure.ac 100 + +++ b/opcodes/configure.ac 101 + @@ -89,6 +89,7 @@ AC_PROG_INSTALL 102 + 103 + AC_CHECK_HEADERS(string.h strings.h stdlib.h limits.h) 104 + ACX_HEADER_STRING 105 + +GCC_HEADER_STDINT(bfd_stdint.h) 106 + 107 + AC_CHECK_DECLS([basename, stpcpy]) 108 + 109 + @@ -134,61 +135,27 @@ AC_CACHE_CHECK(linker --as-needed support, bfd_cv_ld_as_needed, 110 + 111 + LT_LIB_M 112 + 113 + -#Libs for generator progs 114 + -if test "x$cross_compiling" = "xno"; then 115 + - BUILD_LIBS=../libiberty/libiberty.a 116 + - BUILD_LIB_DEPS=$BUILD_LIBS 117 + -else 118 + - # if cross-compiling, assume that the system provides -liberty 119 + - # and that the version is compatible with new headers. 120 + - BUILD_LIBS=-liberty 121 + - BUILD_LIB_DEPS= 122 + -fi 123 + -BUILD_LIBS="$BUILD_LIBS $LIBINTL" 124 + -BUILD_LIB_DEPS="$BUILD_LIB_DEPS $LIBINTL_DEP" 125 + +BUILD_LIBS="-liberty $LIBINTL" 126 + +BUILD_LIB_DEPS="$LIBINTL_DEP" 127 + 128 + AC_SUBST(BUILD_LIBS) 129 + AC_SUBST(BUILD_LIB_DEPS) 130 + 131 + # Horrible hacks to build DLLs on Windows and a shared library elsewhere. 132 + SHARED_LDFLAGS= 133 + -SHARED_LIBADD= 134 + +SHARED_LIBADD=-liberty 135 + SHARED_DEPENDENCIES= 136 + if test "$enable_shared" = "yes"; then 137 + -# When building a shared libopcodes, link against the pic version of libiberty 138 + -# so that apps that use libopcodes won't need libiberty just to satisfy any 139 + -# libopcodes references. 140 + -# We can't do that if a pic libiberty is unavailable since including non-pic 141 + -# code would insert text relocations into libopcodes. 142 + # Note that linking against libbfd as we do here, which is itself linked 143 + # against libiberty, may not satisfy all the libopcodes libiberty references 144 + # since libbfd may not pull in the entirety of libiberty. 145 + -changequote(,)dnl 146 + - x=`sed -n -e 's/^[ ]*PICFLAG[ ]*=[ ]*//p' < ../libiberty/Makefile | sed -n '$p'` 147 + -changequote([,])dnl 148 + - if test -n "$x"; then 149 + - SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty" 150 + - fi 151 + - 152 + case "${host}" in 153 + *-*-cygwin*) 154 + SHARED_LDFLAGS="-no-undefined" 155 + - SHARED_LIBADD="-L`pwd`/../bfd -lbfd -L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin" 156 + + SHARED_LIBADD="-lbfd -liberty -lintl -lcygwin" 157 + ;; 158 + - *-*-darwin*) 159 + - SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.dylib ${SHARED_LIBADD}" 160 + - SHARED_DEPENDENCIES="../bfd/libbfd.la" 161 + - ;; 162 + *) 163 + - case "$host_vendor" in 164 + - hp) 165 + - SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.sl ${SHARED_LIBADD}" 166 + - ;; 167 + - *) 168 + - SHARED_LIBADD="-Wl,`pwd`/../bfd/.libs/libbfd.so ${SHARED_LIBADD}" 169 + - ;; 170 + - esac 171 + - SHARED_DEPENDENCIES="../bfd/libbfd.la" 172 + + SHARED_LIBADD="-lbfd ${SHARED_LIBADD}" 173 + ;; 174 + esac 175 + 176 + -- 177 + 2.14.2 178 +
+19 -12
pkgs/development/tools/misc/binutils/default.nix
··· 48 48 # there) and causes a cycle between the lib and bin outputs, so 49 49 # get rid of it. 50 50 ./no-plugins.patch 51 + 52 + # Help bfd choose between elf32-littlearm, elf32-littlearm-symbian, and 53 + # elf32-littlearm-vxworks in favor of the first. 54 + # https://github.com/NixOS/nixpkgs/pull/30484#issuecomment-345472766 55 + ./disambiguate-arm-targets.patch 51 56 ]; 52 57 53 - outputs = [ "out" ] 54 - ++ optional (targetPlatform == hostPlatform && !hostPlatform.isDarwin) "lib" # problems in Darwin stdenv 55 - ++ [ "info" ] 56 - ++ optional (targetPlatform == hostPlatform) "dev"; 58 + outputs = [ "out" "info" ]; 57 59 58 - nativeBuildInputs = [ bison ] 59 - ++ optional (hostPlatform != buildPlatform) buildPackages.stdenv.cc; 60 + nativeBuildInputs = [ bison buildPackages.stdenv.cc ]; 60 61 buildInputs = [ zlib ]; 61 62 62 63 inherit noSysDirs; ··· 87 88 then [] 88 89 else [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; 89 90 90 - configureFlags = 91 - [ "--enable-shared" "--enable-deterministic-archives" "--disable-werror" ] 92 - ++ optional (stdenv.system == "mips64el-linux") "--enable-fix-loongson2f-nop" 93 - ++ optionals gold [ "--enable-gold" "--enable-plugins" ] 94 - ++ optional (stdenv.system == "i686-linux") "--enable-targets=x86_64-linux-gnu"; 91 + configureFlags = [ 92 + "--enable-targets=all" "--enable-64-bit-bfd" 93 + "--disable-install-libbfd" 94 + "--disable-shared" "--enable-static" 95 + "--with-system-zlib" 96 + 97 + "--enable-deterministic-archives" 98 + "--disable-werror" 99 + "--enable-fix-loongson2f-nop" 100 + ] ++ optionals gold [ "--enable-gold" "--enable-plugins" ]; 95 101 96 102 enableParallelBuilding = true; 97 103 98 104 passthru = { 99 - inherit prefix; 105 + inherit prefix version; 100 106 }; 101 107 102 108 meta = with stdenv.lib; { ··· 109 115 ''; 110 116 homepage = http://www.gnu.org/software/binutils/; 111 117 license = licenses.gpl3Plus; 118 + maintainers = with maintainers; [ ericson2314 ]; 112 119 platforms = platforms.unix; 113 120 114 121 /* Give binutils a lower priority than gcc-wrapper to prevent a
+23
pkgs/development/tools/misc/binutils/disambiguate-arm-targets.patch
··· 1 + diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c 2 + index 9f956d3..f5b61f1 100644 3 + --- a/bfd/elf32-arm.c 4 + +++ b/bfd/elf32-arm.c 5 + @@ -19585,7 +19585,10 @@ elf32_arm_vxworks_final_write_processing (bfd *abfd, bfd_boolean linker) 6 + #undef ELF_MAXPAGESIZE 7 + #define ELF_MAXPAGESIZE 0x1000 8 + 9 + +/* Prioritize elf32-*arm (priority 1) over elf32-*arm-vxworks (priority 2) */ 10 + +#define elf_match_priority 2 11 + #include "elf32-target.h" 12 + +#undef elf_match_priority 13 + 14 + 15 + /* Merge backend specific data from an object file to the output 16 + @@ -19974,4 +19977,7 @@ elf32_arm_symbian_plt_sym_val (bfd_vma i, const asection *plt, 17 + #undef ELF_MAXPAGESIZE 18 + #define ELF_MAXPAGESIZE 0x8000 19 + 20 + +/* Prioritize elf32-*arm (priority 1) over elf32-*arm-symbian (priority 2) */ 21 + +#define elf_match_priority 2 22 + #include "elf32-target.h" 23 + +#undef elf_match_priority
+17 -10
pkgs/development/tools/misc/gdb/default.nix
··· 1 - { fetchurl, stdenv, ncurses, readline, gmp, mpfr, expat, texinfo, zlib 2 - , dejagnu, perl, pkgconfig 1 + { stdenv 2 + 3 + # Build time 4 + , fetchurl, pkgconfig, perl, texinfo, setupDebugInfoDirs 5 + 6 + # Run time 7 + , ncurses, readline, gmp, mpfr, expat, zlib, dejagnu 3 8 4 9 , buildPlatform, hostPlatform, targetPlatform 5 10 6 11 , pythonSupport ? hostPlatform == buildPlatform && !hostPlatform.isCygwin, python ? null 7 12 , guile ? null 8 13 9 - # Support all known targets in one gdb binary. 10 - , multitarget ? false 11 - 12 14 # Additional dependencies for GNU/Hurd. 13 15 , mig ? null, hurd ? null 14 16 15 - , setupDebugInfoDirs 16 17 }: 17 18 18 19 let ··· 58 59 configurePlatforms = [ "build" "host" ] ++ stdenv.lib.optional (targetPlatform != hostPlatform) "target"; 59 60 60 61 configureFlags = with stdenv.lib; [ 61 - "--with-gmp=${gmp.dev}" "--with-mpfr=${mpfr.dev}" "--with-system-readline" 62 - "--with-system-zlib" "--with-expat" "--with-libexpat-prefix=${expat.dev}" 63 - ] ++ stdenv.lib.optional (!pythonSupport) "--without-python" 64 - ++ stdenv.lib.optional multitarget "--enable-targets=all"; 62 + "--enable-targets=all" "--enable-64-bit-bfd" 63 + "--disable-install-libbfd" 64 + "--disable-shared" "--enable-static" 65 + "--with-system-zlib" 66 + "--with-system-readline" 67 + 68 + "--with-gmp=${gmp.dev}" 69 + "--with-mpfr=${mpfr.dev}" 70 + "--with-expat" "--with-libexpat-prefix=${expat.dev}" 71 + ] ++ stdenv.lib.optional (!pythonSupport) "--without-python"; 65 72 66 73 postInstall = 67 74 '' # Remove Info files already provided by Binutils and other packages.
+10 -3
pkgs/development/tools/profiling/EZTrace/default.nix
··· 1 - { stdenv, fetchurl, autoconf, libelf, libiberty, gfortran, zlib, binutils }: 1 + { stdenv 2 + , fetchurl, autoconf, gfortran 3 + , libelf, libiberty, zlib, libbfd, libopcodes 4 + , buildPackages 5 + }: 2 6 3 7 stdenv.mkDerivation rec { 4 8 version = "1.0.6"; ··· 9 13 sha256 = "06q5y9qmdn1h0wjmy28z6gwswskmph49j7simfqcqwv05gvd9svr"; 10 14 }; 11 15 12 - # Goes past the rpl_malloc linking failure 16 + # Goes past the rpl_malloc linking failure; fixes silent file breakage 13 17 preConfigure = '' 14 18 export ac_cv_func_malloc_0_nonnull=yes 19 + substituteInPlace ./configure \ 20 + --replace "/usr/bin/file" "${buildPackages.file}/bin/file" 15 21 ''; 16 22 17 - buildInputs = [ autoconf libelf libiberty gfortran zlib binutils ]; 23 + nativeBuildInputs = [ autoconf gfortran ]; 24 + buildInputs = [ libelf libiberty zlib libbfd libopcodes ]; 18 25 19 26 meta = { 20 27 description = "Tool that aims at generating automatically execution trace from HPC programs";
+8 -5
pkgs/development/tools/profiling/oprofile/default.nix
··· 1 - { stdenv, fetchurl, binutils, popt, zlib, pkgconfig, linuxHeaders, coreutils 2 - , libiberty_static, withGUI ? false , qt4 ? null}: 1 + { stdenv, buildPackages 2 + , fetchurl, pkgconfig 3 + , libbfd, popt, zlib, linuxHeaders, libiberty_static 4 + , withGUI ? false, qt4 ? null 5 + }: 3 6 4 7 # libX11 is needed because the Qt build stuff automatically adds `-lX11'. 5 8 assert withGUI -> qt4 != null; ··· 14 17 15 18 postPatch = '' 16 19 substituteInPlace opjitconv/opjitconv.c \ 17 - --replace "/bin/rm" "${coreutils}/bin/rm" \ 18 - --replace "/bin/cp" "${coreutils}/bin/cp" 20 + --replace "/bin/rm" "${buildPackages.coreutils}/bin/rm" \ 21 + --replace "/bin/cp" "${buildPackages.coreutils}/bin/cp" 19 22 ''; 20 23 21 24 nativeBuildInputs = [ pkgconfig ]; 22 - buildInputs = [ binutils zlib popt linuxHeaders libiberty_static ] 25 + buildInputs = [ libbfd zlib popt linuxHeaders libiberty_static ] 23 26 ++ stdenv.lib.optionals withGUI [ qt4 ]; 24 27 25 28 configureFlags = [
+5 -3
pkgs/development/tools/profiling/sysprof/default.nix
··· 1 - { fetchurl, stdenv, binutils 2 - , pkgconfig, gtk2, glib, pango, libglade }: 1 + { stdenv 2 + , fetchurl, pkgconfig 3 + , gtk2, glib, pango, libglade 4 + }: 3 5 4 6 stdenv.mkDerivation rec { 5 7 name = "sysprof-1.2.0"; ··· 10 12 }; 11 13 12 14 nativeBuildInputs = [ pkgconfig ]; 13 - buildInputs = [ binutils gtk2 glib pango libglade ]; 15 + buildInputs = [ gtk2 glib pango libglade ]; 14 16 15 17 meta = { 16 18 homepage = http://sysprof.com/;
+2 -2
pkgs/development/web/nodejs/v9.nix
··· 5 5 in 6 6 buildNodejs { 7 7 inherit enableNpm; 8 - version = "9.0.0"; 9 - sha256 = "19az7mxcb3d1aj0f7gvhriyyghn1rwn0425924pa84d6j1mbsljv"; 8 + version = "9.2.0"; 9 + sha256 = "1hmvwfbavk2axqz9kin8b5zsld25gznhvlz55h3yl6nwx9iz5jk4"; 10 10 patches = lib.optionals stdenv.isDarwin [ ./no-xcode-v7.patch ]; 11 11 }
+7
pkgs/games/freedink/default.nix
··· 28 28 pkgconfig intltool fontconfig libzip zip zlib 29 29 ]; 30 30 31 + preConfigure = '' 32 + # Build fails on Linux with windres. 33 + export ac_cv_prog_ac_ct_WINDRES= 34 + ''; 35 + 31 36 postInstall = '' 32 37 mkdir -p "$out/share/" 33 38 ln -s ${freedink_data}/share/dink "$out/share/" 34 39 ''; 40 + 41 + enableParallelBuilding = true; 35 42 36 43 meta = { 37 44 description = "A free, portable and enhanced version of the Dink Smallwood game engine";
+7
pkgs/games/macopix/default.nix
··· 11 11 nativeBuildInputs = [ pkgconfig ]; 12 12 buildInputs = [ gtk openssl ]; 13 13 14 + preConfigure = '' 15 + # Build fails on Linux with windres. 16 + export ac_cv_prog_WINDRES= 17 + ''; 18 + 19 + enableParallelBuilding = true; 20 + 14 21 meta = { 15 22 description = "Mascot Constructive Pilot for X"; 16 23 homepage = http://rosegray.sakura.ne.jp/macopix/index-e.html;
+1 -1
pkgs/games/mudlet/default.nix
··· 29 29 cp -r mudlet-lua $out 30 30 31 31 makeWrapper $out/mudlet $out/bin/mudlet \ 32 - --set LUA_CPATH "\"${luaFileSystemPath};${luaZipPath};${lrexlibPath};${luasqlitePath}\"" \ 32 + --set LUA_CPATH "${luaFileSystemPath};${luaZipPath};${lrexlibPath};${luasqlitePath}" \ 33 33 --run "cd $out"; 34 34 ''; 35 35
+2
pkgs/misc/emulators/retroarch/cores.nix
··· 26 26 --add-flags "-L $COREDIR/${d2u core}_libretro.so $@" 27 27 ''; 28 28 29 + enableParallelBuilding = true; 30 + 29 31 passthru = { 30 32 core = core; 31 33 libretroCore = "/lib/retroarch/cores";
+1 -1
pkgs/misc/emulators/retrofe/default.nix
··· 65 65 postInstall = '' 66 66 wrapProgram "$out/bin/retrofe" \ 67 67 --prefix GST_PLUGIN_PATH : "$GST_PLUGIN_SYSTEM_PATH_1_0" \ 68 - --set RETROFE_PATH "\''${RETROFE_PATH:-\$PWD}" 68 + --run 'export RETROFE_PATH=''${RETROFE_PATH:-$PWD}' 69 69 ''; 70 70 71 71 meta = with stdenv.lib; {
+16 -10
pkgs/os-specific/darwin/apple-sdk/default.nix
··· 198 198 }; 199 199 200 200 overrides = super: { 201 - QuartzCore = stdenv.lib.overrideDerivation super.QuartzCore (drv: { 202 - installPhase = drv.installPhase + '' 203 - f="$out/Library/Frameworks/QuartzCore.framework/Headers/CoreImage.h" 204 - substituteInPlace "$f" \ 205 - --replace "QuartzCore/../Frameworks/CoreImage.framework/Headers" "CoreImage" 206 - ''; 201 + AppKit = stdenv.lib.overrideDerivation super.AppKit (drv: { 202 + __propagatedImpureHostDeps = drv.__propagatedImpureHostDeps ++ [ 203 + "/System/Library/PrivateFrameworks/" 204 + ]; 207 205 }); 208 206 209 - CoreServices = stdenv.lib.overrideDerivation super.CoreServices (drv: { 210 - __propagatedSandboxProfile = drv.__propagatedSandboxProfile ++ ['' 211 - (allow mach-lookup (global-name "com.apple.CoreServices.coreservicesd")) 212 - '']; 207 + CoreMedia = stdenv.lib.overrideDerivation super.CoreMedia (drv: { 208 + __propagatedImpureHostDeps = drv.__propagatedImpureHostDeps ++ [ 209 + "/System/Library/Frameworks/CoreImage.framework" 210 + ]; 213 211 }); 214 212 215 213 Security = stdenv.lib.overrideDerivation super.Security (drv: { 216 214 setupHook = ./security-setup-hook.sh; 215 + }); 216 + 217 + QuartzCore = stdenv.lib.overrideDerivation super.QuartzCore (drv: { 218 + installPhase = drv.installPhase + '' 219 + f="$out/Library/Frameworks/QuartzCore.framework/Headers/CoreImage.h" 220 + substituteInPlace "$f" \ 221 + --replace "QuartzCore/../Frameworks/CoreImage.framework/Headers" "CoreImage" 222 + ''; 217 223 }); 218 224 }; 219 225
+13 -15
pkgs/os-specific/darwin/apple-source-releases/Csu/default.nix
··· 1 1 { stdenv, appleDerivation }: 2 2 3 3 appleDerivation { 4 - postUnpack = '' 5 - substituteInPlace $sourceRoot/Makefile \ 6 - --replace "/usr/lib" "/lib" \ 7 - --replace "/usr/local/lib" "/lib" \ 8 - --replace "/usr/bin" "" \ 9 - --replace "/bin/" "" \ 4 + prePatch = '' 5 + substituteInPlace Makefile \ 6 + --replace /usr/lib /lib \ 7 + --replace /usr/local/lib /lib \ 8 + --replace /usr/bin "" \ 9 + --replace /bin/ "" \ 10 10 --replace "CC = " "CC = cc #" \ 11 - --replace "SDK_DIR = " "SDK_DIR = . #" 12 - ''; 11 + --replace "SDK_DIR = " "SDK_DIR = . #" \ 13 12 14 - # Mac OS didn't support rpaths back before 10.5, and this package intentionally builds stubs targeting versions prior to that 15 - NIX_DONT_SET_RPATH = "1"; 16 - NIX_NO_SELF_RPATH = "1"; 17 - 18 - installPhase = '' 19 - export DSTROOT=$out 20 - make install 13 + # Mac OS didn't support rpaths back before 10.5, but we don't care about it. 14 + substituteInPlace Makefile \ 15 + --replace -mmacosx-version-min=10.4 -mmacosx-version-min=10.6 \ 16 + --replace -mmacosx-version-min=10.5 -mmacosx-version-min=10.6 21 17 ''; 18 + 19 + installFlags = [ "DSTROOT=$(out)" ]; 22 20 23 21 meta = with stdenv.lib; { 24 22 description = "Apple's common startup stubs for darwin";
+1 -1
pkgs/os-specific/darwin/apple-source-releases/Libsystem/default.nix
··· 23 23 (cd $dep/include && find . -name '*.h' | cpio -pdm $out/include) 24 24 done 25 25 26 - (cd ${cctools}/include/mach-o && find . -name '*.h' | cpio -pdm $out/include/mach-o) 26 + (cd ${cctools.dev}/include/mach-o && find . -name '*.h' | cpio -pdm $out/include/mach-o) 27 27 28 28 cat <<EOF > $out/include/TargetConditionals.h 29 29 #ifndef __TARGETCONDITIONALS__
-4
pkgs/os-specific/darwin/apple-source-releases/configd/default.nix
··· 8 8 9 9 propagatedBuildInputs = [ Security ]; 10 10 11 - propagatedSandboxProfile = '' 12 - (allow mach-lookup (global-name "com.apple.SystemConfiguration.configd")) 13 - ''; 14 - 15 11 patchPhase = '' 16 12 HACK=$PWD/hack 17 13 mkdir $HACK
+2 -2
pkgs/os-specific/darwin/apple-source-releases/xnu/default.nix
··· 1 - { stdenv, appleDerivation, fetchzip, bootstrap_cmds, bison, flex, gnum4, unifdef, perl }: 1 + { stdenv, appleDerivation, fetchzip, bootstrap_cmds, bison, flex, gnum4, unifdef, perl, python }: 2 2 3 3 appleDerivation { 4 4 phases = [ "unpackPhase" "patchPhase" "installPhase" ]; 5 5 6 - buildInputs = [ bootstrap_cmds bison flex gnum4 unifdef perl ]; 6 + buildInputs = [ bootstrap_cmds bison flex gnum4 unifdef perl python ]; 7 7 8 8 patchPhase = '' 9 9 substituteInPlace Makefile \
-9
pkgs/os-specific/darwin/binutils/default.nix
··· 37 37 ln -sf "${cctools}/bin/$i" "$out/bin/$i" 38 38 done 39 39 40 - for i in ${stdenv.lib.getDev binutils-raw}/include/*.h; do 41 - ln -s "$i" "$out/include/$(basename $i)" 42 - done 43 - 44 - for i in ${cctools}/include/*; do 45 - ln -s "$i" "$out/include/$(basename $i)" 46 - done 47 - 48 40 # FIXME: this will give us incorrect man pages for bits of cctools 49 41 ln -s ${binutils-raw.out}/share $out/share 50 - ln -s ${binutils-raw.out}/lib $out/lib 51 42 52 43 ln -s ${cctools}/libexec $out/libexec 53 44 '';
+8
pkgs/os-specific/darwin/cctools/port.nix
··· 29 29 sha256 = "0l45mvyags56jfi24rawms8j2ihbc45mq7v13pkrrwppghqrdn52"; 30 30 }; 31 31 32 + outputs = [ "out" "dev" ]; 33 + 32 34 nativeBuildInputs = [ autoconf automake libtool_2 ]; 33 35 buildInputs = [ libuuid ] ++ 34 36 # Only need llvm and clang if the stdenv isn't already clang-based (TODO: just make a stdenv.cc.isClang) ··· 37 39 38 40 patches = [ 39 41 ./ld-rpath-nonfinal.patch ./ld-ignore-rpath-link.patch 42 + ]; 43 + 44 + __propagatedImpureHostDeps = [ 45 + # As far as I can tell, otool from cctools is the only thing that depends on these two, and we should fix them 46 + "/usr/lib/libobjc.A.dylib" 47 + "/usr/lib/libobjc.dylib" 40 48 ]; 41 49 42 50 enableParallelBuilding = true;
+2 -2
pkgs/os-specific/linux/alsa-lib/default.nix
··· 1 1 { stdenv, fetchurl }: 2 2 3 3 stdenv.mkDerivation rec { 4 - name = "alsa-lib-1.1.4.1"; 4 + name = "alsa-lib-1.1.5"; 5 5 6 6 src = fetchurl { 7 7 urls = [ 8 8 "ftp://ftp.alsa-project.org/pub/lib/${name}.tar.bz2" 9 9 "http://alsa.cybermirror.org/lib/${name}.tar.bz2" 10 10 ]; 11 - sha256 = "0xjvi381105gldhv0z872a0x58sghznyx19j45lw5iyi2h68gfwi"; 11 + sha256 = "1rhacnlj0grvfagjx5qzsnbhw7m7lyccghqs4jsv0dnsqv9qmxpl"; 12 12 }; 13 13 14 14 patches = [
+2 -2
pkgs/os-specific/linux/alsa-plugins/default.nix
··· 1 1 { stdenv, fetchurl, lib, pkgconfig, alsaLib, libogg, libpulseaudio ? null, libjack2 ? null }: 2 2 3 3 stdenv.mkDerivation rec { 4 - name = "alsa-plugins-1.1.4"; 4 + name = "alsa-plugins-1.1.5"; 5 5 6 6 src = fetchurl { 7 7 urls = [ 8 8 "ftp://ftp.alsa-project.org/pub/plugins/${name}.tar.bz2" 9 9 "http://alsa.cybermirror.org/plugins/${name}.tar.bz2" 10 10 ]; 11 - sha256 = "12hsvm6rpinjkg06pa9hzndkdrbfw6wk6yk00cm8y1gbv8xiq3ak"; 11 + sha256 = "073zpgvj4pldmzqq97l40wngvbqnvrkc8yw153mgny9kypwaazbr"; 12 12 }; 13 13 14 14 # ToDo: a52, etc.?
+2 -2
pkgs/os-specific/linux/alsa-tools/default.nix
··· 4 4 5 5 stdenv.mkDerivation rec { 6 6 name = "alsa-tools-${version}"; 7 - version = "1.1.3"; 7 + version = "1.1.5"; 8 8 9 9 src = fetchurl { 10 10 urls = [ 11 11 "ftp://ftp.alsa-project.org/pub/tools/${name}.tar.bz2" 12 12 "http://alsa.cybermirror.org/tools/${name}.tar.bz2" 13 13 ]; 14 - sha256 = "02b75fyfmm9m2iz59d3xa97cas4f697a4pzdxn1i64kjd36iv3yq"; 14 + sha256 = "0d6m5dm5yskfr6q42cv1ihp5lfgv4a67nj39gpp26ll3vrknag5w"; 15 15 }; 16 16 17 17 nativeBuildInputs = [ pkgconfig ];
+2 -2
pkgs/os-specific/linux/alsa-utils/default.nix
··· 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "alsa-utils-${version}"; 5 - version = "1.1.4"; 5 + version = "1.1.5"; 6 6 7 7 src = fetchurl { 8 8 urls = [ 9 9 "ftp://ftp.alsa-project.org/pub/utils/${name}.tar.bz2" 10 10 "http://alsa.cybermirror.org/utils/${name}.tar.bz2" 11 11 ]; 12 - sha256 = "17cxih9ibjp1193dyd79j50pyfa9dvrs6r9kpwrvzicjvr2110x7"; 12 + sha256 = "1s727md6mb408y2cfwzjkx23abxhampyrjdkgpyygdhxx62x42rj"; 13 13 }; 14 14 15 15 patchPhase = ''
+2 -2
pkgs/os-specific/linux/iproute/default.nix
··· 2 2 3 3 stdenv.mkDerivation rec { 4 4 name = "iproute2-${version}"; 5 - version = "4.13.0"; 5 + version = "4.14.1"; 6 6 7 7 src = fetchurl { 8 8 url = "mirror://kernel/linux/utils/net/iproute2/${name}.tar.xz"; 9 - sha256 = "0l2w84cwr54gaw3cbxijf614l76hx8mgcz57v81rwl68z3nq3yww"; 9 + sha256 = "0rq0n7yxb0hmk0s6wx5awzjgf7ikjbibd0a5ix20ldfcmxlc0fnl"; 10 10 }; 11 11 12 12 preConfigure = ''
+2 -2
pkgs/os-specific/linux/lvm2/default.nix
··· 2 2 , thin-provisioning-tools, enable_dmeventd ? false }: 3 3 4 4 let 5 - version = "2.02.175"; 5 + version = "2.02.176"; 6 6 in 7 7 8 8 stdenv.mkDerivation { ··· 10 10 11 11 src = fetchurl { 12 12 url = "ftp://sources.redhat.com/pub/lvm2/releases/LVM2.${version}.tgz"; 13 - sha256 = "0n95cc2b0jb0fh2pd9jyg9ww7lyzpia9n9sryw9f4aq8dpna7dsd"; 13 + sha256 = "0wx4rvy4frdmb66znh2xms2j2n06sm361ki6l5ks4y1ciii87kny"; 14 14 }; 15 15 16 16 configureFlags = [
+1 -1
pkgs/servers/nosql/apache-jena/fuseki-binary.nix
··· 24 24 for i in "$out"/bin/*; do 25 25 wrapProgram "$i" \ 26 26 --prefix "PATH" : "${java}/bin/" \ 27 - --set "FUSEKI_HOME" '"''${FUSEKI_HOME:-'"$out"'}"' \ 27 + --set-default "FUSEKI_HOME" "$out" \ 28 28 ; 29 29 done 30 30 '';
+1 -1
pkgs/servers/sql/oracle-xe/default.nix
··· 70 70 makeWrapper "$i" "$out/bin/''${i##*/}" \ 71 71 --set ORACLE_HOME "$out/libexec/oracle" \ 72 72 --set ORACLE_SID XE \ 73 - --set NLS_LANG '$("'"$out"'/libexec/oracle/bin/nls_lang.sh")' \ 73 + --run "export NLS_LANG=\$($out/libexec/oracle/bin/nls_lang.sh)" \ 74 74 --prefix PATH : "$out/libexec/oracle/bin" 75 75 done 76 76 '';
+22 -21
pkgs/stdenv/darwin/default.nix
··· 4 4 # Allow passing in bootstrap files directly so we can test the stdenv bootstrap process when changing the bootstrap tools 5 5 , bootstrapFiles ? let 6 6 fetch = { file, sha256, executable ? true }: import <nix/fetchurl.nix> { 7 - url = "http://tarballs.nixos.org/stdenv-darwin/x86_64/10cbca5b30c6cb421ce15139f32ae3a4977292cf/${file}"; 7 + url = "http://tarballs.nixos.org/stdenv-darwin/x86_64/d5bdfcbfe6346761a332918a267e82799ec954d2/${file}"; 8 8 inherit (localSystem) system; 9 9 inherit sha256 executable; 10 10 }; in { 11 - sh = fetch { file = "sh"; sha256 = "0s8a9vpzj6vadq4jmf4r8cargwnsf327hdjydxgqsfxb8y1q39w3"; }; 12 - bzip2 = fetch { file = "bzip2"; sha256 = "1jqljpjr8mkiv7g5rl5impqx3all8vn1mxxdwa004pr3h48c1zgg"; }; 13 - mkdir = fetch { file = "mkdir"; sha256 = "17zsjiwnq07i5r85q1hg7f6cnkcgllwy2amz9klaqwjy4vzz4vwh"; }; 14 - cpio = fetch { file = "cpio"; sha256 = "04hrair58dgja6syh442pswiga5an9nl58ls57yknkn2pq51nx9m"; }; 15 - tarball = fetch { file = "bootstrap-tools.cpio.bz2"; sha256 = "103833hrci0vwi1gi978hkp69rncicvpdszn87ffpf1cq0jzpa14"; executable = false; }; 11 + sh = fetch { file = "sh"; sha256 = "07wm33f1yzfpcd3rh42f8g096k4cvv7g65p968j28agzmm2s7s8m"; }; 12 + bzip2 = fetch { file = "bzip2"; sha256 = "0y9ri2aprkrp2dkzm6229l0mw4rxr2jy7vvh3d8mxv2698v2kdbm"; }; 13 + mkdir = fetch { file = "mkdir"; sha256 = "0sb07xpy66ws6f2jfnpjibyimzb71al8n8c6y4nr8h50al3g90nr"; }; 14 + cpio = fetch { file = "cpio"; sha256 = "0r5c54hg678w7zydx27bzl9p3v9fs25y5ix6vdfi1ilqim7xh65n"; }; 15 + tarball = fetch { file = "bootstrap-tools.cpio.bz2"; sha256 = "18hp5w6klr8g307ap4368r255qpzg9r0vwg9vqvj8f2zy1xilcjf"; executable = false; }; 16 16 } 17 17 }: 18 18 ··· 21 21 let 22 22 inherit (localSystem) system platform; 23 23 24 - libSystemProfile = '' 25 - (import "${./standard-sandbox.sb}") 26 - ''; 24 + commonImpureHostDeps = [ 25 + "/bin/sh" 26 + "/usr/lib/libSystem.B.dylib" 27 + "/usr/lib/system/libunc.dylib" # This dependency is "hidden", so our scanning code doesn't pick it up 28 + ]; 27 29 in rec { 28 30 commonPreHook = '' 29 31 export NIX_ENFORCE_PURITY="''${NIX_ENFORCE_PURITY-1}" ··· 37 39 export gl_cv_func_getcwd_abort_bug=no 38 40 ''; 39 41 40 - # The one dependency of /bin/sh :( 41 - binShClosure = '' 42 - (allow file-read* (literal "/usr/lib/libncurses.5.4.dylib")) 43 - ''; 44 - 45 42 bootstrapTools = derivation rec { 46 43 inherit system; 47 44 ··· 53 50 reexportedLibrariesFile = 54 51 ../../os-specific/darwin/apple-source-releases/Libsystem/reexported_libraries; 55 52 56 - __sandboxProfile = binShClosure + libSystemProfile; 53 + __impureHostDeps = commonImpureHostDeps; 57 54 }; 58 55 59 56 stageFun = step: last: {shell ? "${bootstrapTools}/bin/bash", ··· 108 105 }; 109 106 110 107 # The stdenvs themselves don't use mkDerivation, so I need to specify this here 111 - stdenvSandboxProfile = binShClosure + libSystemProfile; 112 - extraSandboxProfile = binShClosure + libSystemProfile; 108 + __stdenvImpureHostDeps = commonImpureHostDeps; 109 + __extraImpureHostDeps = commonImpureHostDeps; 113 110 114 111 extraAttrs = { 115 112 inherit platform; ··· 167 164 }; 168 165 169 166 stage1 = prevStage: let 170 - persistent = _: _: {}; 167 + persistent = _: super: { python = super.python.override { configd = null; }; }; 171 168 in with prevStage; stageFun 1 prevStage { 172 169 extraPreHook = "export NIX_CFLAGS_COMPILE+=\" -F${bootstrapTools}/Library/Frameworks\""; 173 170 extraNativeBuildInputs = []; ··· 317 314 export PATH_LOCALE=${pkgs.darwin.locale}/share/locale 318 315 ''; 319 316 320 - stdenvSandboxProfile = binShClosure + libSystemProfile; 321 - extraSandboxProfile = binShClosure + libSystemProfile; 317 + __stdenvImpureHostDeps = commonImpureHostDeps; 318 + __extraImpureHostDeps = commonImpureHostDeps; 322 319 323 320 initialPath = import ../common-path.nix { inherit pkgs; }; 324 321 shell = "${pkgs.bash}/bin/bash"; ··· 353 350 bzip2.bin llvmPackages.llvm llvmPackages.llvm.lib zlib.out zlib.dev libffi.out coreutils ed diffutils gnutar 354 351 gzip ncurses.out ncurses.dev ncurses.man gnused bash gawk 355 352 gnugrep llvmPackages.clang-unwrapped patch pcre.out binutils-raw.out 356 - binutils-raw.dev binutils gettext 353 + binutils gettext 357 354 cc.expand-response-params 358 355 ]) ++ (with pkgs.darwin; [ 359 356 dyld Libsystem CF cctools ICU libiconv locale ··· 364 361 clang = cc; 365 362 llvmPackages = persistent'.llvmPackages // { clang = cc; }; 366 363 inherit cc; 364 + 365 + darwin = super.darwin // { 366 + xnu = super.darwin.xnu.override { python = super.python.override { configd = null; }; }; 367 + }; 367 368 }; 368 369 }; 369 370
-72
pkgs/stdenv/darwin/standard-sandbox.sb
··· 1 - (define TMPDIR (param "_GLOBAL_TMP_DIR")) 2 - 3 - ; obvious 4 - (allow process-fork) 5 - 6 - ; allow reading system information like #CPUs, etc. 7 - (allow sysctl-read) 8 - 9 - ; IPC 10 - (allow ipc-posix*) 11 - 12 - ; Unix sockets 13 - (allow system-socket) 14 - 15 - ; all runtime dependencies of libSystem.dylib 16 - (allow file-read* 17 - (literal "/usr/lib/libSystem.dylib") 18 - (literal "/usr/lib/libSystem.B.dylib") 19 - (literal "/usr/lib/libobjc.A.dylib") 20 - (literal "/usr/lib/libobjc.dylib") 21 - (literal "/usr/lib/libauto.dylib") 22 - (literal "/usr/lib/libc++abi.dylib") 23 - (literal "/usr/lib/libc++.1.dylib") 24 - (literal "/usr/lib/libDiagnosticMessagesClient.dylib") 25 - (subpath "/usr/lib/system")) 26 - 27 - ; tmp 28 - (allow file* process-exec (literal "/tmp") (subpath TMPDIR)) 29 - 30 - ; clang likes to read the system version 31 - (allow file-read* (literal "/System/Library/CoreServices/SystemVersion.plist")) 32 - 33 - ; used for bootstrap builders 34 - (allow process-exec* (literal "/bin/sh")) 35 - 36 - ; without this line clang cannot write to /dev/null, breaking some configure tests 37 - (allow file-read-metadata (literal "/dev")) 38 - 39 - ; standard devices 40 - (allow file* 41 - (literal "/dev/null") 42 - (literal "/dev/random") 43 - (literal "/dev/stdin") 44 - (literal "/dev/stdout") 45 - (literal "/dev/tty") 46 - (literal "/dev/urandom") 47 - (literal "/dev/zero") 48 - (subpath "/dev/fd")) 49 - 50 - ; does nothing, but reduces build noise 51 - (allow file* (literal "/dev/dtracehelper")) 52 - 53 - ; ICU data and zoneinfo data are hardcoded 54 - ; both are in libicucore and zoneinfo is in libsystem_c as well 55 - (allow file-read* (subpath "/usr/share/icu") (subpath "/usr/share/zoneinfo")) 56 - 57 - ; no idea what this is 58 - (allow file-read-data (literal "/dev/autofs_nowait")) 59 - 60 - ; lots of autoconf projects want to list this directory 61 - (allow file-read-metadata (literal "/var") (literal "/private/var/tmp")) 62 - 63 - ; send signals 64 - (allow signal (target same-sandbox)) 65 - 66 - ; allow getpwuid (for git and other packages) 67 - (allow mach-lookup 68 - (global-name "com.apple.system.notification_center") 69 - (global-name "com.apple.system.opendirectoryd.libinfo")) 70 - 71 - ; allow networking on localhost 72 - (allow network* (local ip) (remote unix-socket))
+20 -8
pkgs/stdenv/generic/setup.sh
··· 324 324 exit 1 325 325 fi 326 326 327 + if [ -f "$pkg/nix-support/$propagatedBuildInputsFile" ]; then 328 + local pkgNext 329 + for pkgNext in $(< "$pkg/nix-support/$propagatedBuildInputsFile"); do 330 + findInputs "$pkgNext" "$var" "$propagatedBuildInputsFile" 331 + done 332 + fi 333 + } 334 + 335 + # Add package to the future PATH and run setup hooks 336 + activatePackage() { 337 + local pkg="$1" 338 + 327 339 if [ -f "$pkg" ]; then 328 340 local oldOpts="$(shopt -po nounset)" 329 341 set +u ··· 341 353 source "$pkg/nix-support/setup-hook" 342 354 eval "$oldOpts" 343 355 fi 344 - 345 - if [ -f "$pkg/nix-support/$propagatedBuildInputsFile" ]; then 346 - local pkgNext 347 - for pkgNext in $(< "$pkg/nix-support/$propagatedBuildInputsFile"); do 348 - findInputs "$pkgNext" "$var" "$propagatedBuildInputsFile" 349 - done 350 - fi 351 356 } 352 357 353 358 declare -a nativePkgs crossPkgs ··· 359 364 ${propagatedNativeBuildInputs:-} ${propagatedBuildInputs:-}; do 360 365 findInputs "$i" nativePkgs propagated-native-build-inputs 361 366 done 367 + 368 + for i in "${nativePkgs[@]}"; do 369 + activatePackage "$i" 370 + done 362 371 else 363 372 for i in ${buildInputs:-} ${defaultBuildInputs:-} ${propagatedBuildInputs:-}; do 364 373 findInputs "$i" crossPkgs propagated-build-inputs 365 374 done 366 375 367 - declare -a nativePkgs 368 376 for i in ${nativeBuildInputs:-} ${defaultNativeBuildInputs:-} ${propagatedNativeBuildInputs:-}; do 369 377 findInputs "$i" nativePkgs propagated-native-build-inputs 378 + done 379 + 380 + for i in "${nativePkgs[@]}" "${crossPkgs[@]}"; do 381 + activatePackage "$i" 370 382 done 371 383 fi 372 384
-1
pkgs/stdenv/linux/make-bootstrap-tools-cross.nix
··· 179 179 for i in as ld ar ranlib nm strip readelf objdump; do 180 180 cp ${binutils.out}/bin/$i $out/bin 181 181 done 182 - cp -d ${binutils.lib}/lib/lib*.so* $out/lib 183 182 184 183 chmod -R u+w $out 185 184
-1
pkgs/stdenv/linux/make-bootstrap-tools.nix
··· 128 128 for i in as ld ar ranlib nm strip readelf objdump; do 129 129 cp ${binutils.out}/bin/$i $out/bin 130 130 done 131 - cp -d ${binutils.lib}/lib/lib*.so* $out/lib 132 131 133 132 chmod -R u+w $out 134 133
+4 -4
pkgs/tools/filesystems/grive/default.nix
··· 1 - { stdenv, fetchgit, cmake, libgcrypt, json_c, curl, expat, boost, binutils }: 1 + { stdenv, fetchgit, cmake, libgcrypt, json_c, curl, expat, boost, libiberty }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 version = "0.3.0"; ··· 10 10 sha256 = "11cqfcjl128nfg1rjvpvr9x1x2ch3kyliw4vi14n51zqp82f9ysb"; 11 11 }; 12 12 13 - buildInputs = [cmake libgcrypt json_c curl expat stdenv binutils boost]; 13 + buildInputs = [cmake libgcrypt json_c curl expat stdenv libiberty boost]; 14 14 15 - # work around new binutils headers, see 16 - # http://stackoverflow.com/questions/11748035/binutils-bfd-h-wants-config-h-now 15 + # work around new libiberty headers, see 16 + # http://stackoverflow.com/questions/11748035/libiberty-bfd-h-wants-config-h-now 17 17 prePatch = '' 18 18 sed -i '1i#define PACKAGE "grive"\n#define PACKAGE_VERSION "${version}"' \ 19 19 libgrive/src/bfd/SymbolInfo.cc
+2 -2
pkgs/tools/filesystems/grive2/default.nix
··· 1 - { stdenv, fetchFromGitHub, pkgconfig, fetchurl, yajl, cmake, libgcrypt, curl, expat, boost, binutils }: 1 + { stdenv, fetchFromGitHub, pkgconfig, fetchurl, yajl, cmake, libgcrypt, curl, expat, boost, libiberty }: 2 2 3 3 stdenv.mkDerivation rec { 4 4 version = "0.5.0"; ··· 13 13 14 14 nativeBuildInputs = [ cmake pkgconfig ]; 15 15 16 - buildInputs = [ libgcrypt yajl curl expat stdenv boost binutils ]; 16 + buildInputs = [ libgcrypt yajl curl expat stdenv boost libiberty ]; 17 17 18 18 meta = with stdenv.lib; { 19 19 description = "A console Google Drive client";
+2 -2
pkgs/tools/misc/diffoscope/default.nix
··· 1 1 { lib, stdenv, fetchgit, python3Packages, docutils 2 - , acl, apktool, binutils, bzip2, cbfstool, cdrkit, colord, colordiff, coreutils, cpio, diffutils, dtc 2 + , acl, apktool, libbfd, bzip2, cbfstool, cdrkit, colord, colordiff, coreutils, cpio, diffutils, dtc 3 3 , e2fsprogs, file, findutils, fontforge-fonttools, fpc, gettext, ghc, ghostscriptX, giflib, gnupg1, gnutar 4 4 , gzip, imagemagick, jdk, libarchive, libcaca, llvm, mono, openssh, pdftk, pgpdump, poppler_utils, sng, sqlite 5 5 , squashfsTools, tcpdump, unoconv, unzip, xxd, xz ··· 28 28 # Still missing these tools: docx2txt enjarify js-beautify oggDump Rscript 29 29 # Also these libraries: python3-guestfs 30 30 pythonPath = with python3Packages; [ debian libarchive-c python_magic tlsh rpm ] ++ [ 31 - acl binutils bzip2 cdrkit colordiff coreutils cpio diffutils dtc e2fsprogs file findutils 31 + acl libbfd bzip2 cdrkit colordiff coreutils cpio diffutils dtc e2fsprogs file findutils 32 32 fontforge-fonttools gettext gnutar gzip libarchive libcaca pgpdump sng sqlite 33 33 squashfsTools unzip xxd xz 34 34 ] ++ lib.optionals enableBloat [
+4
pkgs/tools/misc/man-db/default.nix
··· 28 28 "--with-systemdtmpfilesdir=\${out}/lib/tmpfiles.d" 29 29 ]; 30 30 31 + preConfigure = '' 32 + configureFlagsArray+=("--with-sections=1 n l 8 3 0 2 5 4 9 6 7") 33 + ''; 34 + 31 35 postInstall = '' 32 36 # apropos/whatis uses program name to decide whether to act like apropos or whatis 33 37 # (multi-call binary). `apropos` is actually just a symlink to whatis. So we need to
+5 -2
pkgs/tools/package-management/rpm/default.nix
··· 1 - { stdenv, fetchurl, cpio, zlib, bzip2, file, elfutils, libarchive, nspr, nss, popt, db, xz, python, lua, pkgconfig, binutils, autoreconfHook }: 1 + { stdenv 2 + , pkgconfig, autoreconfHook 3 + , fetchurl, cpio, zlib, bzip2, file, elfutils, libbfd, libarchive, nspr, nss, popt, db, xz, python, lua 4 + }: 2 5 3 6 stdenv.mkDerivation rec { 4 7 name = "rpm-${version}"; ··· 15 18 buildInputs = [ cpio zlib bzip2 file libarchive nspr nss db xz python lua ]; 16 19 17 20 # rpm/rpmlib.h includes popt.h, and then the pkg-config file mentions these as linkage requirements 18 - propagatedBuildInputs = [ popt elfutils nss db bzip2 libarchive binutils ]; 21 + propagatedBuildInputs = [ popt elfutils nss db bzip2 libarchive libbfd ]; 19 22 20 23 NIX_CFLAGS_COMPILE = "-I${nspr.dev}/include/nspr -I${nss.dev}/include/nss"; 21 24
+6 -4
pkgs/tools/security/sbsigntool/default.nix
··· 1 - { stdenv, fetchgit, autoconf, automake, utillinux, openssl, libuuid, gnu-efi 2 - , binutils, pkgconfig, help2man }: 1 + { stdenv 2 + , fetchgit, autoconf, automake, pkgconfig, help2man 3 + , utillinux, openssl, libuuid, gnu-efi, libbfd 4 + }: 3 5 4 6 stdenv.mkDerivation rec { 5 7 name = "sbsigntool-${version}"; ··· 15 17 16 18 prePatch = "patchShebangs ."; 17 19 18 - nativeBuildInputs = [ pkgconfig ]; 19 - buildInputs = [ autoconf automake utillinux openssl libuuid gnu-efi binutils help2man ]; 20 + nativeBuildInputs = [ autoconf automake pkgconfig help2man ]; 21 + buildInputs = [ utillinux openssl libuuid gnu-efi libbfd ]; 20 22 21 23 configurePhase = '' 22 24 substituteInPlace configure.ac --replace "@@NIX_GNUEFI@@" "${gnu-efi}"
+2 -2
pkgs/tools/system/pciutils/default.nix
··· 1 1 { stdenv, fetchurl, pkgconfig, zlib, kmod, which }: 2 2 3 3 stdenv.mkDerivation rec { 4 - name = "pciutils-3.5.5"; # with database from 2017-07 4 + name = "pciutils-3.5.6"; # with database from 2017-07 5 5 6 6 src = fetchurl { 7 7 url = "mirror://kernel/software/utils/pciutils/${name}.tar.xz"; 8 - sha256 = "1d62f8fa192f90e61c35a6fc15ff3cb9a7a792f782407acc42ef67817c5939f5"; 8 + sha256 = "08dvsk1b5m1r7qqzsm849h4glq67mngf8zw7bg0102ff1jwywipk"; 9 9 }; 10 10 11 11 nativeBuildInputs = [ pkgconfig ];
+41 -4
pkgs/tools/text/groff/default.nix
··· 5 5 }: 6 6 7 7 stdenv.mkDerivation rec { 8 - name = "groff-1.22.3"; 8 + name = "groff-${version}"; 9 + version = "1.22.3"; 9 10 10 11 src = fetchurl { 11 12 url = "mirror://gnu/groff/${name}.tar.gz"; 12 13 sha256 = "1998v2kcs288d3y7kfxpvl369nqi06zbbvjzafyvyl3pr7bajj1s"; 13 14 }; 14 15 15 - outputs = [ "out" "man" "doc" "info" ]; 16 + outputs = [ "out" "man" "doc" "info" "perl" ]; 16 17 17 18 enableParallelBuilding = false; 18 19 ··· 30 31 --replace "@PNMTOPS_NOSETPAGE@" "${netpbm}/bin/pnmtops -nosetpage" 31 32 ''; 32 33 33 - buildInputs = [ ghostscript psutils netpbm ]; 34 - nativeBuildInputs = [ perl ]; 34 + buildInputs = [ ghostscript psutils netpbm perl ]; 35 35 36 36 # Builds running without a chroot environment may detect the presence 37 37 # of /usr/X11 in the host system, leading to an impure build of the ··· 62 62 for f in 'man.local' 'mdoc.local'; do 63 63 cat '${./site.tmac}' >>"$out/share/groff/site-tmac/$f" 64 64 done 65 + 66 + moveToOutput bin/gropdf $perl 67 + moveToOutput bin/pdfmom $perl 68 + moveToOutput bin/roff2text $perl 69 + moveToOutput bin/roff2pdf $perl 70 + moveToOutput bin/roff2ps $perl 71 + moveToOutput bin/roff2dvi $perl 72 + moveToOutput bin/roff2ps $perl 73 + moveToOutput bin/roff2html $perl 74 + moveToOutput bin/glilypond $perl 75 + moveToOutput bin/mmroff $perl 76 + moveToOutput bin/roff2x $perl 77 + moveToOutput bin/afmtodit $perl 78 + moveToOutput bin/gperl $perl 79 + moveToOutput bin/chem $perl 80 + moveToOutput share/groff/${version}/font/devpdf $perl 81 + 82 + # idk if this is needed, but Fedora does it 83 + moveToOutput share/groff/${version}/tmac/pdf.tmac $perl 84 + 85 + moveToOutput bin/gpinyin $perl 86 + moveToOutput lib/groff/gpinyin $perl 87 + substituteInPlace $perl/bin/gpinyin \ 88 + --replace $out/lib/groff/gpinyin $perl/lib/groff/gpinyin 89 + 90 + moveToOutput bin/groffer $perl 91 + moveToOutput lib/groff/groffer $perl 92 + substituteInPlace $perl/bin/groffer \ 93 + --replace $out/lib/groff/groffer $perl/lib/groff/groffer 94 + 95 + moveToOutput bin/grog $perl 96 + moveToOutput lib/groff/grog $perl 97 + substituteInPlace $perl/bin/grog \ 98 + --replace $out/lib/groff/grog $perl/lib/groff/grog 99 + 65 100 ''; 66 101 67 102 meta = with stdenv.lib; { ··· 82 117 version gxditview of the X11 xditview previewer, and an 83 118 implementation of the -mm macros. 84 119 ''; 120 + 121 + outputsToInstall = [ "out" "perl" ]; 85 122 }; 86 123 }
+2 -2
pkgs/tools/text/popfile/default.nix
··· 44 44 wrapProgram "$path" \ 45 45 --prefix PERL5LIB : $PERL5LIB:$out/bin \ 46 46 --set POPFILE_ROOT $out/bin \ 47 - --set POPFILE_USER \$\{POPFILE_USER:-\$HOME/.popfile\} \ 48 - --run "test -d \$POPFILE_USER || mkdir -m 0700 -p \$POPFILE_USER" 47 + --run 'export POPFILE_USER=''${POPFILE_USER:-$HOME/.popfile}' \ 48 + --run 'test -d "$POPFILE_USER" || mkdir -m 0700 -p "$POPFILE_USER"' 49 49 done 50 50 ''; 51 51
+5
pkgs/tools/typesetting/pdf2djvu/default.nix
··· 15 15 16 16 preConfigure = '' 17 17 sed -i 's#\$djvulibre_bin_path#${djvulibre.bin}/bin#g' configure 18 + 19 + # Configure skips the failing check for usability of windres when it is nonempty. 20 + unset WINDRES 18 21 ''; 22 + 23 + enableParallelBuilding = true; 19 24 20 25 meta = with stdenv.lib; { 21 26 description = "Creates djvu files from PDF files";
+1
pkgs/top-level/aliases.nix
··· 58 58 foomatic_filters = foomatic-filters; # 2016-08 59 59 fuse_exfat = exfat; # 2015-09-11 60 60 gettextWithExpat = gettext; # 2016-02-19 61 + gdb-multitarget = gdb; # added 2017-11-13 61 62 git-hub = gitAndTools.git-hub; # added 2016-04-29 62 63 googleAuthenticator = google-authenticator; # added 2016-10-16 63 64 grantlee5 = libsForQt5.grantlee; # added 2015-12-19
+8 -2
pkgs/top-level/all-packages.nix
··· 77 77 { deps = [ autoconf automake gettext libtool ]; } 78 78 ../build-support/setup-hooks/autoreconf.sh; 79 79 80 + autoreconfHook264 = makeSetupHook 81 + { deps = [ autoconf264 automake111x gettext libtool ]; } 82 + ../build-support/setup-hooks/autoreconf.sh; 83 + 80 84 ensureNewerSourcesHook = { year }: makeSetupHook {} 81 85 (writeScript "ensure-newer-sources-hook.sh" '' 82 86 postUnpackHooks+=(_ensureNewerSources) ··· 7707 7711 inherit (gnu) mig; 7708 7712 }; 7709 7713 7710 - gdb-multitarget = lowPrio (gdb.override { multitarget = true; }); 7711 - 7712 7714 valgrind = callPackage ../development/tools/analysis/valgrind { 7713 7715 inherit (darwin) xnu bootstrap_cmds cctools; 7714 7716 llvm = llvm_39; ··· 7863 7865 }; 7864 7866 7865 7867 belle-sip = callPackage ../development/libraries/belle-sip { }; 7868 + 7869 + libbfd = callPackage ../development/libraries/libbfd { }; 7870 + 7871 + libopcodes = callPackage ../development/libraries/libopcodes { }; 7866 7872 7867 7873 bobcat = callPackage ../development/libraries/bobcat { }; 7868 7874
+1
pkgs/top-level/perl-packages.nix
··· 10282 10282 sha256 = "8565aff76b3d09084642f3a83c654fb4ced8220e8e19d35c78b661519b4c1be6"; 10283 10283 }; 10284 10284 propagatedBuildInputs = [ URI ]; 10285 + __darwinAllowLocalNetworking = true; 10285 10286 meta = { 10286 10287 homepage = https://github.com/libwww-perl/Net-HTTP; 10287 10288 description = "Low-level HTTP connection (client)";
+3
pkgs/top-level/python-packages.nix
··· 4988 4988 checkPhase = '' 4989 4989 py.test testing 4990 4990 ''; 4991 + __darwinAllowLocalNetworking = true; 4991 4992 meta = { 4992 4993 description = "Rapid multi-Python deployment"; 4993 4994 license = licenses.gpl2; ··· 14046 14047 }; 14047 14048 14048 14049 propagatedBuildInputs = with self; [ cryptography pyasn1 ]; 14050 + 14051 + __darwinAllowLocalNetworking = true; 14049 14052 14050 14053 # https://github.com/paramiko/paramiko/issues/449 14051 14054 doCheck = !(isPyPy || isPy33);