Merge branch 'master' into staging

Need base branch for GCC PR

+298 -371
+2 -9
lib/systems/examples.nix
··· 18 libc = "glibc"; 19 platform = platforms.sheevaplug; 20 openssl.system = "linux-generic32"; 21 - inherit (platform) gcc; 22 }; 23 24 raspberryPi = rec { ··· 31 libc = "glibc"; 32 platform = platforms.raspberrypi; 33 openssl.system = "linux-generic32"; 34 - inherit (platform) gcc; 35 }; 36 37 armv7l-hf-multiplatform = rec { ··· 44 libc = "glibc"; 45 platform = platforms.armv7l-hf-multiplatform; 46 openssl.system = "linux-generic32"; 47 - inherit (platform) gcc; 48 }; 49 50 aarch64-multiplatform = rec { ··· 54 withTLS = true; 55 libc = "glibc"; 56 platform = platforms.aarch64-multiplatform; 57 - inherit (platform) gcc; 58 }; 59 60 scaleway-c1 = armv7l-hf-multiplatform // rec { 61 platform = platforms.scaleway-c1; 62 - inherit (platform) gcc; 63 - inherit (gcc) fpu; 64 }; 65 66 pogoplug4 = rec { 67 arch = "armv5tel"; 68 - config = "armv5tel-softfloat-linux-gnueabi"; 69 float = "soft"; 70 71 platform = platforms.pogoplug4; 72 73 - inherit (platform) gcc; 74 libc = "glibc"; 75 76 withTLS = true; ··· 86 libc = "glibc"; 87 platform = platforms.fuloong2f_n32; 88 openssl.system = "linux-generic32"; 89 - inherit (platform) gcc; 90 }; 91 92 #
··· 18 libc = "glibc"; 19 platform = platforms.sheevaplug; 20 openssl.system = "linux-generic32"; 21 }; 22 23 raspberryPi = rec { ··· 30 libc = "glibc"; 31 platform = platforms.raspberrypi; 32 openssl.system = "linux-generic32"; 33 }; 34 35 armv7l-hf-multiplatform = rec { ··· 42 libc = "glibc"; 43 platform = platforms.armv7l-hf-multiplatform; 44 openssl.system = "linux-generic32"; 45 }; 46 47 aarch64-multiplatform = rec { ··· 51 withTLS = true; 52 libc = "glibc"; 53 platform = platforms.aarch64-multiplatform; 54 }; 55 56 scaleway-c1 = armv7l-hf-multiplatform // rec { 57 platform = platforms.scaleway-c1; 58 + inherit (platform.gcc) fpu; 59 }; 60 61 pogoplug4 = rec { 62 arch = "armv5tel"; 63 + config = "armv5tel-unknown-linux-gnueabi"; 64 float = "soft"; 65 66 platform = platforms.pogoplug4; 67 68 libc = "glibc"; 69 70 withTLS = true; ··· 80 libc = "glibc"; 81 platform = platforms.fuloong2f_n32; 82 openssl.system = "linux-generic32"; 83 }; 84 85 #
+49 -42
pkgs/development/compilers/gcc/4.5/default.nix
··· 63 64 javaAwtGtk = langJava && gtk2 != null; 65 66 /* Cross-gcc settings */ 67 - gccArch = stdenv.lib.attrByPath [ "gcc" "arch" ] null targetPlatform; 68 - gccCpu = stdenv.lib.attrByPath [ "gcc" "cpu" ] null targetPlatform; 69 - gccAbi = stdenv.lib.attrByPath [ "gcc" "abi" ] null targetPlatform; 70 crossMingw = (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"); 71 72 crossConfigureFlags = 73 - optional (gccArch != null) "--with-arch=${gccArch}" ++ 74 - optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ 75 - optional (gccAbi != null) "--with-abi=${gccAbi}" ++ 76 # Ensure that -print-prog-name is able to find the correct programs. 77 [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" 78 "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ ··· 288 # Ada 289 optional langAda "--enable-libada" ++ 290 291 - # Cross-compilation 292 optional (targetPlatform != hostPlatform) crossConfigureFlags ++ 293 294 # Platform-specific flags ··· 299 300 targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; 301 302 crossAttrs = { 303 AR = "${targetPlatform.config}-ar"; 304 LD = "${targetPlatform.config}-ld"; 305 CC = "${targetPlatform.config}-gcc"; 306 - CXX = "${targetPlatform.config}-gcc"; 307 AR_FOR_TARGET = "${targetPlatform.config}-ar"; 308 LD_FOR_TARGET = "${targetPlatform.config}-ld"; 309 CC_FOR_TARGET = "${targetPlatform.config}-gcc"; 310 - NM_FOR_TARGET = "${targetPlatform.config}-nm"; 311 CXX_FOR_TARGET = "${targetPlatform.config}-g++"; 312 # If we are making a cross compiler, cross != null 313 NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; 314 dontStrip = true; 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 - ) 341 - ) 342 - }" 343 - ] ++ 344 - optional langAda "--enable-libada" ++ 345 - optional (targetPlatform == hostPlatform && targetPlatform.isi686) "--with-arch=i686" ++ 346 - optional (targetPlatform != hostPlatform) crossConfigureFlags 347 - ; 348 }; 349 350
··· 63 64 javaAwtGtk = langJava && gtk2 != null; 65 66 + /* Platform flags */ 67 + platformFlags = let 68 + gccArch = targetPlatform.platform.gcc.arch or null; 69 + gccCpu = targetPlatform.platform.gcc.cpu or null; 70 + gccAbi = targetPlatform.platform.gcc.abi or null; 71 + gccFpu = targetPlatform.platform.gcc.fpu or null; 72 + gccFloat = targetPlatform.platform.gcc.float or null; 73 + gccMode = targetPlatform.platform.gcc.mode or null; 74 + in 75 + optional (gccArch != null) "--with-arch=${gccArch}" ++ 76 + optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ 77 + optional (gccAbi != null) "--with-abi=${gccAbi}" ++ 78 + optional (gccFpu != null) "--with-fpu=${gccFpu}" ++ 79 + optional (gccFloat != null) "--with-float=${gccFloat}" ++ 80 + optional (gccMode != null) "--with-mode=${gccMode}"; 81 + 82 /* Cross-gcc settings */ 83 crossMingw = (targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"); 84 85 crossConfigureFlags = 86 # Ensure that -print-prog-name is able to find the correct programs. 87 [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" 88 "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ ··· 298 # Ada 299 optional langAda "--enable-libada" ++ 300 301 + platformFlags ++ 302 optional (targetPlatform != hostPlatform) crossConfigureFlags ++ 303 304 # Platform-specific flags ··· 309 310 targetConfig = if targetPlatform != hostPlatform then targetPlatform.config else null; 311 312 + /* For cross-built gcc (build != host == target) */ 313 crossAttrs = { 314 + AR_FOR_BUILD = "ar"; 315 + AS_FOR_BUILD = "as"; 316 + LD_FOR_BUILD = "ld"; 317 + NM_FOR_BUILD = "nm"; 318 + OBJCOPY_FOR_BUILD = "objcopy"; 319 + OBJDUMP_FOR_BUILD = "objdump"; 320 + RANLIB_FOR_BUILD = "ranlib"; 321 + SIZE_FOR_BUILD = "size"; 322 + STRINGS_FOR_BUILD = "strings"; 323 + STRIP_FOR_BUILD = "strip"; 324 + CC_FOR_BUILD = "gcc"; 325 + CXX_FOR_BUILD = "g++"; 326 + 327 AR = "${targetPlatform.config}-ar"; 328 + AS = "${targetPlatform.config}-as"; 329 LD = "${targetPlatform.config}-ld"; 330 + NM = "${targetPlatform.config}-nm"; 331 + OBJCOPY = "${targetPlatform.config}-objcopy"; 332 + OBJDUMP = "${targetPlatform.config}-objdump"; 333 + RANLIB = "${targetPlatform.config}-ranlib"; 334 + SIZE = "${targetPlatform.config}-size"; 335 + STRINGS = "${targetPlatform.config}-strings"; 336 + STRIP = "${targetPlatform.config}-strip"; 337 CC = "${targetPlatform.config}-gcc"; 338 + CXX = "${targetPlatform.config}-g++"; 339 + 340 AR_FOR_TARGET = "${targetPlatform.config}-ar"; 341 + AS_FOR_TARGET = "${targetPlatform.config}-as"; 342 LD_FOR_TARGET = "${targetPlatform.config}-ld"; 343 + NM_FOR_TARGET = "${targetPlatform.config}-nm"; 344 + OBJCOPY_FOR_TARGET = "${targetPlatform.config}-objcopy"; 345 + OBJDUMP_FOR_TARGET = "${targetPlatform.config}-objdump"; 346 + RANLIB_FOR_TARGET = "${targetPlatform.config}-ranlib"; 347 + SIZE_FOR_TARGET = "${targetPlatform.config}-size"; 348 + STRINGS_FOR_TARGET = "${targetPlatform.config}-strings"; 349 + STRIP_FOR_TARGET = "${targetPlatform.config}-strip"; 350 CC_FOR_TARGET = "${targetPlatform.config}-gcc"; 351 CXX_FOR_TARGET = "${targetPlatform.config}-g++"; 352 # If we are making a cross compiler, cross != null 353 NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; 354 dontStrip = true; 355 }; 356 357
+42 -54
pkgs/development/compilers/gcc/4.8/default.nix
··· 23 , x11Support ? langJava 24 , gnatboot ? null 25 , enableMultilib ? false 26 - , enablePlugin ? true # whether to support user-supplied plug-ins 27 , name ? "gcc" 28 , libcCross ? null 29 , crossStageStatic ? false ··· 108 javaAwtGtk = langJava && x11Support; 109 110 /* Platform flags */ 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}" ++ ··· 127 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 128 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; 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" ] ++ ··· 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 ··· 406 then "install-strip" 407 else "install"; 408 409 - crossAttrs = let 410 - xgccArch = targetPlatform.gcc.arch or null; 411 - xgccCpu = targetPlatform.gcc.cpu or null; 412 - xgccAbi = targetPlatform.gcc.abi or null; 413 - xgccFpu = targetPlatform.gcc.fpu or null; 414 - xgccFloat = targetPlatform.gcc.float or null; 415 - in { 416 AR = "${targetPlatform.config}-ar"; 417 LD = "${targetPlatform.config}-ld"; 418 CC = "${targetPlatform.config}-gcc"; 419 - CXX = "${targetPlatform.config}-gcc"; 420 AR_FOR_TARGET = "${targetPlatform.config}-ar"; 421 LD_FOR_TARGET = "${targetPlatform.config}-ld"; 422 - CC_FOR_TARGET = "${targetPlatform.config}-gcc"; 423 NM_FOR_TARGET = "${targetPlatform.config}-nm"; 424 CXX_FOR_TARGET = "${targetPlatform.config}-g++"; 425 # If we are making a cross compiler, targetPlatform != hostPlatform 426 NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; 427 dontStrip = true; 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 - optionals (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 - ) 452 - ) 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 - ; 462 buildFlags = ""; 463 }; 464
··· 23 , x11Support ? langJava 24 , gnatboot ? null 25 , enableMultilib ? false 26 + , enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins 27 , name ? "gcc" 28 , libcCross ? null 29 , crossStageStatic ? false ··· 108 javaAwtGtk = langJava && x11Support; 109 110 /* Platform flags */ 111 + platformFlags = let 112 + gccArch = targetPlatform.platform.gcc.arch or null; 113 + gccCpu = targetPlatform.platform.gcc.cpu or null; 114 + gccAbi = targetPlatform.platform.gcc.abi or null; 115 + gccFpu = targetPlatform.platform.gcc.fpu or null; 116 + gccFloat = targetPlatform.platform.gcc.float or null; 117 + gccMode = targetPlatform.platform.gcc.mode or null; 118 in 119 optional (gccArch != null) "--with-arch=${gccArch}" ++ 120 optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ ··· 127 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 128 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; 129 crossConfigureFlags = 130 # Ensure that -print-prog-name is able to find the correct programs. 131 [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" 132 "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ ··· 380 in "--with-native-system-header-dir=${incDir}" 381 ) ++ 382 383 + platformFlags ++ 384 optional (targetPlatform != hostPlatform) crossConfigureFlags ++ 385 optional (!bootstrap) "--disable-bootstrap" ++ 386 ··· 404 then "install-strip" 405 else "install"; 406 407 + /* For cross-built gcc (build != host == target) */ 408 + crossAttrs = { 409 + AR_FOR_BUILD = "ar"; 410 + AS_FOR_BUILD = "as"; 411 + LD_FOR_BUILD = "ld"; 412 + NM_FOR_BUILD = "nm"; 413 + OBJCOPY_FOR_BUILD = "objcopy"; 414 + OBJDUMP_FOR_BUILD = "objdump"; 415 + RANLIB_FOR_BUILD = "ranlib"; 416 + SIZE_FOR_BUILD = "size"; 417 + STRINGS_FOR_BUILD = "strings"; 418 + STRIP_FOR_BUILD = "strip"; 419 + CC_FOR_BUILD = "gcc"; 420 + CXX_FOR_BUILD = "g++"; 421 + 422 AR = "${targetPlatform.config}-ar"; 423 + AS = "${targetPlatform.config}-as"; 424 LD = "${targetPlatform.config}-ld"; 425 + NM = "${targetPlatform.config}-nm"; 426 + OBJCOPY = "${targetPlatform.config}-objcopy"; 427 + OBJDUMP = "${targetPlatform.config}-objdump"; 428 + RANLIB = "${targetPlatform.config}-ranlib"; 429 + SIZE = "${targetPlatform.config}-size"; 430 + STRINGS = "${targetPlatform.config}-strings"; 431 + STRIP = "${targetPlatform.config}-strip"; 432 CC = "${targetPlatform.config}-gcc"; 433 + CXX = "${targetPlatform.config}-g++"; 434 + 435 AR_FOR_TARGET = "${targetPlatform.config}-ar"; 436 + AS_FOR_TARGET = "${targetPlatform.config}-as"; 437 LD_FOR_TARGET = "${targetPlatform.config}-ld"; 438 NM_FOR_TARGET = "${targetPlatform.config}-nm"; 439 + OBJCOPY_FOR_TARGET = "${targetPlatform.config}-objcopy"; 440 + OBJDUMP_FOR_TARGET = "${targetPlatform.config}-objdump"; 441 + RANLIB_FOR_TARGET = "${targetPlatform.config}-ranlib"; 442 + SIZE_FOR_TARGET = "${targetPlatform.config}-size"; 443 + STRINGS_FOR_TARGET = "${targetPlatform.config}-strings"; 444 + STRIP_FOR_TARGET = "${targetPlatform.config}-strip"; 445 + CC_FOR_TARGET = "${targetPlatform.config}-gcc"; 446 CXX_FOR_TARGET = "${targetPlatform.config}-g++"; 447 # If we are making a cross compiler, targetPlatform != hostPlatform 448 NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; 449 dontStrip = true; 450 buildFlags = ""; 451 }; 452
+41 -54
pkgs/development/compilers/gcc/4.9/default.nix
··· 23 , x11Support ? langJava 24 , gnatboot ? null 25 , enableMultilib ? false 26 - , enablePlugin ? true # whether to support user-supplied plug-ins 27 , name ? "gcc" 28 , libcCross ? null 29 , crossStageStatic ? false ··· 99 javaAwtGtk = langJava && x11Support; 100 101 /* Platform flags */ 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}" ++ ··· 118 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 119 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; 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" ] ++ ··· 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 ··· 405 else "install"; 406 407 /* For cross-built gcc (build != host == target) */ 408 - crossAttrs = let 409 - xgccArch = targetPlatform.gcc.arch or null; 410 - xgccCpu = targetPlatform.gcc.cpu or null; 411 - xgccAbi = targetPlatform.gcc.abi or null; 412 - xgccFpu = targetPlatform.gcc.fpu or null; 413 - xgccFloat = targetPlatform.gcc.float or null; 414 - in { 415 AR = "${targetPlatform.config}-ar"; 416 LD = "${targetPlatform.config}-ld"; 417 CC = "${targetPlatform.config}-gcc"; 418 - CXX = "${targetPlatform.config}-gcc"; 419 AR_FOR_TARGET = "${targetPlatform.config}-ar"; 420 LD_FOR_TARGET = "${targetPlatform.config}-ld"; 421 CC_FOR_TARGET = "${targetPlatform.config}-gcc"; 422 - NM_FOR_TARGET = "${targetPlatform.config}-nm"; 423 CXX_FOR_TARGET = "${targetPlatform.config}-g++"; 424 # If we are making a cross compiler, targetPlatform != hostPlatform 425 NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; 426 dontStrip = true; 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 - optionals (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 - ) 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 - ; 461 buildFlags = ""; 462 }; 463
··· 23 , x11Support ? langJava 24 , gnatboot ? null 25 , enableMultilib ? false 26 + , enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins 27 , name ? "gcc" 28 , libcCross ? null 29 , crossStageStatic ? false ··· 99 javaAwtGtk = langJava && x11Support; 100 101 /* Platform flags */ 102 + platformFlags = let 103 + gccArch = targetPlatform.platform.gcc.arch or null; 104 + gccCpu = targetPlatform.platform.gcc.cpu or null; 105 + gccAbi = targetPlatform.platform.gcc.abi or null; 106 + gccFpu = targetPlatform.platform.gcc.fpu or null; 107 + gccFloat = targetPlatform.platform.gcc.float or null; 108 + gccMode = targetPlatform.platform.gcc.mode or null; 109 in 110 optional (gccArch != null) "--with-arch=${gccArch}" ++ 111 optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ ··· 118 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 119 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; 120 crossConfigureFlags = 121 # Ensure that -print-prog-name is able to find the correct programs. 122 [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" 123 "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ ··· 378 in "--with-native-system-header-dir=${incDir}" 379 ) ++ 380 381 + platformFlags ++ 382 optional (targetPlatform != hostPlatform) crossConfigureFlags ++ 383 optional (!bootstrap) "--disable-bootstrap" ++ 384 ··· 403 else "install"; 404 405 /* For cross-built gcc (build != host == target) */ 406 + crossAttrs = { 407 + AR_FOR_BUILD = "ar"; 408 + AS_FOR_BUILD = "as"; 409 + LD_FOR_BUILD = "ld"; 410 + NM_FOR_BUILD = "nm"; 411 + OBJCOPY_FOR_BUILD = "objcopy"; 412 + OBJDUMP_FOR_BUILD = "objdump"; 413 + RANLIB_FOR_BUILD = "ranlib"; 414 + SIZE_FOR_BUILD = "size"; 415 + STRINGS_FOR_BUILD = "strings"; 416 + STRIP_FOR_BUILD = "strip"; 417 + CC_FOR_BUILD = "gcc"; 418 + CXX_FOR_BUILD = "g++"; 419 + 420 AR = "${targetPlatform.config}-ar"; 421 + AS = "${targetPlatform.config}-as"; 422 LD = "${targetPlatform.config}-ld"; 423 + NM = "${targetPlatform.config}-nm"; 424 + OBJCOPY = "${targetPlatform.config}-objcopy"; 425 + OBJDUMP = "${targetPlatform.config}-objdump"; 426 + RANLIB = "${targetPlatform.config}-ranlib"; 427 + SIZE = "${targetPlatform.config}-size"; 428 + STRINGS = "${targetPlatform.config}-strings"; 429 + STRIP = "${targetPlatform.config}-strip"; 430 CC = "${targetPlatform.config}-gcc"; 431 + CXX = "${targetPlatform.config}-g++"; 432 + 433 AR_FOR_TARGET = "${targetPlatform.config}-ar"; 434 + AS_FOR_TARGET = "${targetPlatform.config}-as"; 435 LD_FOR_TARGET = "${targetPlatform.config}-ld"; 436 + NM_FOR_TARGET = "${targetPlatform.config}-nm"; 437 + OBJCOPY_FOR_TARGET = "${targetPlatform.config}-objcopy"; 438 + OBJDUMP_FOR_TARGET = "${targetPlatform.config}-objdump"; 439 + RANLIB_FOR_TARGET = "${targetPlatform.config}-ranlib"; 440 + SIZE_FOR_TARGET = "${targetPlatform.config}-size"; 441 + STRINGS_FOR_TARGET = "${targetPlatform.config}-strings"; 442 + STRIP_FOR_TARGET = "${targetPlatform.config}-strip"; 443 CC_FOR_TARGET = "${targetPlatform.config}-gcc"; 444 CXX_FOR_TARGET = "${targetPlatform.config}-g++"; 445 # If we are making a cross compiler, targetPlatform != hostPlatform 446 NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; 447 dontStrip = true; 448 buildFlags = ""; 449 }; 450
+41 -53
pkgs/development/compilers/gcc/5/default.nix
··· 23 , x11Support ? langJava 24 , gnatboot ? null 25 , enableMultilib ? false 26 - , enablePlugin ? true # whether to support user-supplied plug-ins 27 , name ? "gcc" 28 , libcCross ? null 29 , crossStageStatic ? false ··· 103 javaAwtGtk = langJava && x11Support; 104 105 /* Platform flags */ 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}" ++ ··· 122 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 123 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; 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" ] ++ ··· 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 ··· 415 else "install"; 416 417 /* For cross-built gcc (build != host == target) */ 418 - crossAttrs = let 419 - xgccArch = targetPlatform.gcc.arch or null; 420 - xgccCpu = targetPlatform.gcc.cpu or null; 421 - xgccAbi = targetPlatform.gcc.abi or null; 422 - xgccFpu = targetPlatform.gcc.fpu or null; 423 - xgccFloat = targetPlatform.gcc.float or null; 424 - in { 425 AR = "${targetPlatform.config}-ar"; 426 LD = "${targetPlatform.config}-ld"; 427 CC = "${targetPlatform.config}-gcc"; 428 - CXX = "${targetPlatform.config}-gcc"; 429 AR_FOR_TARGET = "${targetPlatform.config}-ar"; 430 LD_FOR_TARGET = "${targetPlatform.config}-ld"; 431 - CC_FOR_TARGET = "${targetPlatform.config}-gcc"; 432 NM_FOR_TARGET = "${targetPlatform.config}-nm"; 433 CXX_FOR_TARGET = "${targetPlatform.config}-g++"; 434 # If we are making a cross compiler, targetPlatform != hostPlatform 435 NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; 436 dontStrip = true; 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 - ) 460 - ) 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 - ; 470 buildFlags = ""; 471 }; 472
··· 23 , x11Support ? langJava 24 , gnatboot ? null 25 , enableMultilib ? false 26 + , enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins 27 , name ? "gcc" 28 , libcCross ? null 29 , crossStageStatic ? false ··· 103 javaAwtGtk = langJava && x11Support; 104 105 /* Platform flags */ 106 + platformFlags = let 107 + gccArch = targetPlatform.platform.gcc.arch or null; 108 + gccCpu = targetPlatform.platform.gcc.cpu or null; 109 + gccAbi = targetPlatform.platform.gcc.abi or null; 110 + gccFpu = targetPlatform.platform.gcc.fpu or null; 111 + gccFloat = targetPlatform.platform.gcc.float or null; 112 + gccMode = targetPlatform.platform.gcc.mode or null; 113 in 114 optional (gccArch != null) "--with-arch=${gccArch}" ++ 115 optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ ··· 122 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 123 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; 124 crossConfigureFlags = 125 # Ensure that -print-prog-name is able to find the correct programs. 126 [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" 127 "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ ··· 388 in "--with-native-system-header-dir=${incDir}" 389 ) ++ 390 391 + platformFlags ++ 392 optional (targetPlatform != hostPlatform) crossConfigureFlags ++ 393 optional (!bootstrap) "--disable-bootstrap" ++ 394 ··· 413 else "install"; 414 415 /* For cross-built gcc (build != host == target) */ 416 + crossAttrs = { 417 + AR_FOR_BUILD = "ar"; 418 + AS_FOR_BUILD = "as"; 419 + LD_FOR_BUILD = "ld"; 420 + NM_FOR_BUILD = "nm"; 421 + OBJCOPY_FOR_BUILD = "objcopy"; 422 + OBJDUMP_FOR_BUILD = "objdump"; 423 + RANLIB_FOR_BUILD = "ranlib"; 424 + SIZE_FOR_BUILD = "size"; 425 + STRINGS_FOR_BUILD = "strings"; 426 + STRIP_FOR_BUILD = "strip"; 427 + CC_FOR_BUILD = "gcc"; 428 + CXX_FOR_BUILD = "g++"; 429 + 430 AR = "${targetPlatform.config}-ar"; 431 + AS = "${targetPlatform.config}-as"; 432 LD = "${targetPlatform.config}-ld"; 433 + NM = "${targetPlatform.config}-nm"; 434 + OBJCOPY = "${targetPlatform.config}-objcopy"; 435 + OBJDUMP = "${targetPlatform.config}-objdump"; 436 + RANLIB = "${targetPlatform.config}-ranlib"; 437 + SIZE = "${targetPlatform.config}-size"; 438 + STRINGS = "${targetPlatform.config}-strings"; 439 + STRIP = "${targetPlatform.config}-strip"; 440 CC = "${targetPlatform.config}-gcc"; 441 + CXX = "${targetPlatform.config}-g++"; 442 + 443 AR_FOR_TARGET = "${targetPlatform.config}-ar"; 444 + AS_FOR_TARGET = "${targetPlatform.config}-as"; 445 LD_FOR_TARGET = "${targetPlatform.config}-ld"; 446 NM_FOR_TARGET = "${targetPlatform.config}-nm"; 447 + OBJCOPY_FOR_TARGET = "${targetPlatform.config}-objcopy"; 448 + OBJDUMP_FOR_TARGET = "${targetPlatform.config}-objdump"; 449 + RANLIB_FOR_TARGET = "${targetPlatform.config}-ranlib"; 450 + SIZE_FOR_TARGET = "${targetPlatform.config}-size"; 451 + STRINGS_FOR_TARGET = "${targetPlatform.config}-strings"; 452 + STRIP_FOR_TARGET = "${targetPlatform.config}-strip"; 453 + CC_FOR_TARGET = "${targetPlatform.config}-gcc"; 454 CXX_FOR_TARGET = "${targetPlatform.config}-g++"; 455 # If we are making a cross compiler, targetPlatform != hostPlatform 456 NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; 457 dontStrip = true; 458 buildFlags = ""; 459 }; 460
+41 -53
pkgs/development/compilers/gcc/6/default.nix
··· 23 , x11Support ? langJava 24 , gnatboot ? null 25 , enableMultilib ? false 26 - , enablePlugin ? true # whether to support user-supplied plug-ins 27 , name ? "gcc" 28 , libcCross ? null 29 , crossStageStatic ? false ··· 100 javaAwtGtk = langJava && x11Support; 101 102 /* Platform flags */ 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; 110 in 111 optional (gccArch != null) "--with-arch=${gccArch}" ++ 112 optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ ··· 119 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 120 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; 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" ] ++ ··· 391 in "--with-native-system-header-dir=${incDir}" 392 ) ++ 393 394 - optional (targetPlatform == hostPlatform) (mkPlatformFlags stdenv.platform) ++ 395 optional (targetPlatform != hostPlatform) crossConfigureFlags ++ 396 optional (!bootstrap) "--disable-bootstrap" ++ 397 ··· 415 else "install"; 416 417 /* For cross-built gcc (build != host == target) */ 418 - crossAttrs = let 419 - xgccArch = targetPlatform.gcc.arch or null; 420 - xgccCpu = targetPlatform.gcc.cpu or null; 421 - xgccAbi = targetPlatform.gcc.abi or null; 422 - xgccFpu = targetPlatform.gcc.fpu or null; 423 - xgccFloat = targetPlatform.gcc.float or null; 424 - in { 425 AR = "${targetPlatform.config}-ar"; 426 LD = "${targetPlatform.config}-ld"; 427 CC = "${targetPlatform.config}-gcc"; 428 - CXX = "${targetPlatform.config}-gcc"; 429 AR_FOR_TARGET = "${targetPlatform.config}-ar"; 430 LD_FOR_TARGET = "${targetPlatform.config}-ld"; 431 - CC_FOR_TARGET = "${targetPlatform.config}-gcc"; 432 NM_FOR_TARGET = "${targetPlatform.config}-nm"; 433 CXX_FOR_TARGET = "${targetPlatform.config}-g++"; 434 # If we are making a cross compiler, targetPlatform != hostPlatform 435 NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; 436 dontStrip = true; 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 - ) 460 - ) 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 - ; 470 buildFlags = ""; 471 }; 472
··· 23 , x11Support ? langJava 24 , gnatboot ? null 25 , enableMultilib ? false 26 + , enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins 27 , name ? "gcc" 28 , libcCross ? null 29 , crossStageStatic ? false ··· 100 javaAwtGtk = langJava && x11Support; 101 102 /* Platform flags */ 103 + platformFlags = let 104 + gccArch = targetPlatform.platform.gcc.arch or null; 105 + gccCpu = targetPlatform.platform.gcc.cpu or null; 106 + gccAbi = targetPlatform.platform.gcc.abi or null; 107 + gccFpu = targetPlatform.platform.gcc.fpu or null; 108 + gccFloat = targetPlatform.platform.gcc.float or null; 109 + gccMode = targetPlatform.platform.gcc.mode or null; 110 in 111 optional (gccArch != null) "--with-arch=${gccArch}" ++ 112 optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ ··· 119 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 120 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; 121 crossConfigureFlags = 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" ] ++ ··· 389 in "--with-native-system-header-dir=${incDir}" 390 ) ++ 391 392 + platformFlags ++ 393 optional (targetPlatform != hostPlatform) crossConfigureFlags ++ 394 optional (!bootstrap) "--disable-bootstrap" ++ 395 ··· 413 else "install"; 414 415 /* For cross-built gcc (build != host == target) */ 416 + crossAttrs = { 417 + AR_FOR_BUILD = "ar"; 418 + AS_FOR_BUILD = "as"; 419 + LD_FOR_BUILD = "ld"; 420 + NM_FOR_BUILD = "nm"; 421 + OBJCOPY_FOR_BUILD = "objcopy"; 422 + OBJDUMP_FOR_BUILD = "objdump"; 423 + RANLIB_FOR_BUILD = "ranlib"; 424 + SIZE_FOR_BUILD = "size"; 425 + STRINGS_FOR_BUILD = "strings"; 426 + STRIP_FOR_BUILD = "strip"; 427 + CC_FOR_BUILD = "gcc"; 428 + CXX_FOR_BUILD = "g++"; 429 + 430 AR = "${targetPlatform.config}-ar"; 431 + AS = "${targetPlatform.config}-as"; 432 LD = "${targetPlatform.config}-ld"; 433 + NM = "${targetPlatform.config}-nm"; 434 + OBJCOPY = "${targetPlatform.config}-objcopy"; 435 + OBJDUMP = "${targetPlatform.config}-objdump"; 436 + RANLIB = "${targetPlatform.config}-ranlib"; 437 + SIZE = "${targetPlatform.config}-size"; 438 + STRINGS = "${targetPlatform.config}-strings"; 439 + STRIP = "${targetPlatform.config}-strip"; 440 CC = "${targetPlatform.config}-gcc"; 441 + CXX = "${targetPlatform.config}-g++"; 442 + 443 AR_FOR_TARGET = "${targetPlatform.config}-ar"; 444 + AS_FOR_TARGET = "${targetPlatform.config}-as"; 445 LD_FOR_TARGET = "${targetPlatform.config}-ld"; 446 NM_FOR_TARGET = "${targetPlatform.config}-nm"; 447 + OBJCOPY_FOR_TARGET = "${targetPlatform.config}-objcopy"; 448 + OBJDUMP_FOR_TARGET = "${targetPlatform.config}-objdump"; 449 + RANLIB_FOR_TARGET = "${targetPlatform.config}-ranlib"; 450 + SIZE_FOR_TARGET = "${targetPlatform.config}-size"; 451 + STRINGS_FOR_TARGET = "${targetPlatform.config}-strings"; 452 + STRIP_FOR_TARGET = "${targetPlatform.config}-strip"; 453 + CC_FOR_TARGET = "${targetPlatform.config}-gcc"; 454 CXX_FOR_TARGET = "${targetPlatform.config}-g++"; 455 # If we are making a cross compiler, targetPlatform != hostPlatform 456 NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; 457 dontStrip = true; 458 buildFlags = ""; 459 }; 460
+41 -53
pkgs/development/compilers/gcc/7/default.nix
··· 23 , x11Support ? langJava 24 , gnatboot ? null 25 , enableMultilib ? false 26 - , enablePlugin ? true # whether to support user-supplied plug-ins 27 , name ? "gcc" 28 , libcCross ? null 29 , crossStageStatic ? false ··· 98 javaAwtGtk = langJava && x11Support; 99 100 /* Platform flags */ 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}" ++ ··· 117 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 118 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; 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" ] ++ ··· 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 ··· 409 else "install"; 410 411 /* For cross-built gcc (build != host == target) */ 412 - crossAttrs = let 413 - xgccArch = targetPlatform.gcc.arch or null; 414 - xgccCpu = targetPlatform.gcc.cpu or null; 415 - xgccAbi = targetPlatform.gcc.abi or null; 416 - xgccFpu = targetPlatform.gcc.fpu or null; 417 - xgccFloat = targetPlatform.gcc.float or null; 418 - in { 419 AR = "${targetPlatform.config}-ar"; 420 LD = "${targetPlatform.config}-ld"; 421 CC = "${targetPlatform.config}-gcc"; 422 - CXX = "${targetPlatform.config}-gcc"; 423 AR_FOR_TARGET = "${targetPlatform.config}-ar"; 424 LD_FOR_TARGET = "${targetPlatform.config}-ld"; 425 - CC_FOR_TARGET = "${targetPlatform.config}-gcc"; 426 NM_FOR_TARGET = "${targetPlatform.config}-nm"; 427 CXX_FOR_TARGET = "${targetPlatform.config}-g++"; 428 # If we are making a cross compiler, targetPlatform != hostPlatform 429 NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; 430 dontStrip = true; 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 - ) 454 - ) 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 - ; 464 buildFlags = ""; 465 }; 466
··· 23 , x11Support ? langJava 24 , gnatboot ? null 25 , enableMultilib ? false 26 + , enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins 27 , name ? "gcc" 28 , libcCross ? null 29 , crossStageStatic ? false ··· 98 javaAwtGtk = langJava && x11Support; 99 100 /* Platform flags */ 101 + platformFlags = let 102 + gccArch = targetPlatform.platform.gcc.arch or null; 103 + gccCpu = targetPlatform.platform.gcc.cpu or null; 104 + gccAbi = targetPlatform.platform.gcc.abi or null; 105 + gccFpu = targetPlatform.platform.gcc.fpu or null; 106 + gccFloat = targetPlatform.platform.gcc.float or null; 107 + gccMode = targetPlatform.platform.gcc.mode or null; 108 in 109 optional (gccArch != null) "--with-arch=${gccArch}" ++ 110 optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ ··· 117 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 118 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; 119 crossConfigureFlags = 120 # Ensure that -print-prog-name is able to find the correct programs. 121 [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" 122 "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ ··· 382 in "--with-native-system-header-dir=${incDir}" 383 ) ++ 384 385 + platformFlags ++ 386 optional (targetPlatform != hostPlatform) crossConfigureFlags ++ 387 optional (!bootstrap) "--disable-bootstrap" ++ 388 ··· 407 else "install"; 408 409 /* For cross-built gcc (build != host == target) */ 410 + crossAttrs = { 411 + AR_FOR_BUILD = "ar"; 412 + AS_FOR_BUILD = "as"; 413 + LD_FOR_BUILD = "ld"; 414 + NM_FOR_BUILD = "nm"; 415 + OBJCOPY_FOR_BUILD = "objcopy"; 416 + OBJDUMP_FOR_BUILD = "objdump"; 417 + RANLIB_FOR_BUILD = "ranlib"; 418 + SIZE_FOR_BUILD = "size"; 419 + STRINGS_FOR_BUILD = "strings"; 420 + STRIP_FOR_BUILD = "strip"; 421 + CC_FOR_BUILD = "gcc"; 422 + CXX_FOR_BUILD = "g++"; 423 + 424 AR = "${targetPlatform.config}-ar"; 425 + AS = "${targetPlatform.config}-as"; 426 LD = "${targetPlatform.config}-ld"; 427 + NM = "${targetPlatform.config}-nm"; 428 + OBJCOPY = "${targetPlatform.config}-objcopy"; 429 + OBJDUMP = "${targetPlatform.config}-objdump"; 430 + RANLIB = "${targetPlatform.config}-ranlib"; 431 + SIZE = "${targetPlatform.config}-size"; 432 + STRINGS = "${targetPlatform.config}-strings"; 433 + STRIP = "${targetPlatform.config}-strip"; 434 CC = "${targetPlatform.config}-gcc"; 435 + CXX = "${targetPlatform.config}-g++"; 436 + 437 AR_FOR_TARGET = "${targetPlatform.config}-ar"; 438 + AS_FOR_TARGET = "${targetPlatform.config}-as"; 439 LD_FOR_TARGET = "${targetPlatform.config}-ld"; 440 NM_FOR_TARGET = "${targetPlatform.config}-nm"; 441 + OBJCOPY_FOR_TARGET = "${targetPlatform.config}-objcopy"; 442 + OBJDUMP_FOR_TARGET = "${targetPlatform.config}-objdump"; 443 + RANLIB_FOR_TARGET = "${targetPlatform.config}-ranlib"; 444 + SIZE_FOR_TARGET = "${targetPlatform.config}-size"; 445 + STRINGS_FOR_TARGET = "${targetPlatform.config}-strings"; 446 + STRIP_FOR_TARGET = "${targetPlatform.config}-strip"; 447 + CC_FOR_TARGET = "${targetPlatform.config}-gcc"; 448 CXX_FOR_TARGET = "${targetPlatform.config}-g++"; 449 # If we are making a cross compiler, targetPlatform != hostPlatform 450 NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; 451 dontStrip = true; 452 buildFlags = ""; 453 }; 454
+41 -53
pkgs/development/compilers/gcc/snapshot/default.nix
··· 23 , x11Support ? langJava 24 , gnatboot ? null 25 , enableMultilib ? false 26 - , enablePlugin ? true # whether to support user-supplied plug-ins 27 , name ? "gcc" 28 , libcCross ? null 29 , crossStageStatic ? false ··· 98 javaAwtGtk = langJava && x11Support; 99 100 /* Platform flags */ 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}" ++ ··· 117 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 118 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; 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" ] ++ ··· 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 ··· 396 else "install"; 397 398 /* For cross-built gcc (build != host == target) */ 399 - crossAttrs = let 400 - xgccArch = targetPlatform.gcc.arch or null; 401 - xgccCpu = targetPlatform.gcc.cpu or null; 402 - xgccAbi = targetPlatform.gcc.abi or null; 403 - xgccFpu = targetPlatform.gcc.fpu or null; 404 - xgccFloat = targetPlatform.gcc.float or null; 405 - in { 406 AR = "${targetPlatform.config}-ar"; 407 LD = "${targetPlatform.config}-ld"; 408 CC = "${targetPlatform.config}-gcc"; 409 - CXX = "${targetPlatform.config}-gcc"; 410 AR_FOR_TARGET = "${targetPlatform.config}-ar"; 411 LD_FOR_TARGET = "${targetPlatform.config}-ld"; 412 - CC_FOR_TARGET = "${targetPlatform.config}-gcc"; 413 NM_FOR_TARGET = "${targetPlatform.config}-nm"; 414 CXX_FOR_TARGET = "${targetPlatform.config}-g++"; 415 # If we are making a cross compiler, targetPlatform != hostPlatform 416 NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; 417 dontStrip = true; 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 - ) 441 - ) 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 - ; 451 buildFlags = ""; 452 }; 453
··· 23 , x11Support ? langJava 24 , gnatboot ? null 25 , enableMultilib ? false 26 + , enablePlugin ? hostPlatform == buildPlatform # Whether to support user-supplied plug-ins 27 , name ? "gcc" 28 , libcCross ? null 29 , crossStageStatic ? false ··· 98 javaAwtGtk = langJava && x11Support; 99 100 /* Platform flags */ 101 + platformFlags = let 102 + gccArch = targetPlatform.platform.gcc.arch or null; 103 + gccCpu = targetPlatform.platform.gcc.cpu or null; 104 + gccAbi = targetPlatform.platform.gcc.abi or null; 105 + gccFpu = targetPlatform.platform.gcc.fpu or null; 106 + gccFloat = targetPlatform.platform.gcc.float or null; 107 + gccMode = targetPlatform.platform.gcc.mode or null; 108 in 109 optional (gccArch != null) "--with-arch=${gccArch}" ++ 110 optional (gccCpu != null) "--with-cpu=${gccCpu}" ++ ··· 117 crossMingw = targetPlatform != hostPlatform && targetPlatform.libc == "msvcrt"; 118 crossDarwin = targetPlatform != hostPlatform && targetPlatform.libc == "libSystem"; 119 crossConfigureFlags = 120 # Ensure that -print-prog-name is able to find the correct programs. 121 [ "--with-as=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-as" 122 "--with-ld=${targetPackages.stdenv.cc.bintools}/bin/${targetPlatform.config}-ld" ] ++ ··· 369 in "--with-native-system-header-dir=${incDir}" 370 ) ++ 371 372 + platformFlags ++ 373 optional (targetPlatform != hostPlatform) crossConfigureFlags ++ 374 optional (!bootstrap) "--disable-bootstrap" ++ 375 ··· 394 else "install"; 395 396 /* For cross-built gcc (build != host == target) */ 397 + crossAttrs = { 398 + AR_FOR_BUILD = "ar"; 399 + AS_FOR_BUILD = "as"; 400 + LD_FOR_BUILD = "ld"; 401 + NM_FOR_BUILD = "nm"; 402 + OBJCOPY_FOR_BUILD = "objcopy"; 403 + OBJDUMP_FOR_BUILD = "objdump"; 404 + RANLIB_FOR_BUILD = "ranlib"; 405 + SIZE_FOR_BUILD = "size"; 406 + STRINGS_FOR_BUILD = "strings"; 407 + STRIP_FOR_BUILD = "strip"; 408 + CC_FOR_BUILD = "gcc"; 409 + CXX_FOR_BUILD = "g++"; 410 + 411 AR = "${targetPlatform.config}-ar"; 412 + AS = "${targetPlatform.config}-as"; 413 LD = "${targetPlatform.config}-ld"; 414 + NM = "${targetPlatform.config}-nm"; 415 + OBJCOPY = "${targetPlatform.config}-objcopy"; 416 + OBJDUMP = "${targetPlatform.config}-objdump"; 417 + RANLIB = "${targetPlatform.config}-ranlib"; 418 + SIZE = "${targetPlatform.config}-size"; 419 + STRINGS = "${targetPlatform.config}-strings"; 420 + STRIP = "${targetPlatform.config}-strip"; 421 CC = "${targetPlatform.config}-gcc"; 422 + CXX = "${targetPlatform.config}-g++"; 423 + 424 AR_FOR_TARGET = "${targetPlatform.config}-ar"; 425 + AS_FOR_TARGET = "${targetPlatform.config}-as"; 426 LD_FOR_TARGET = "${targetPlatform.config}-ld"; 427 NM_FOR_TARGET = "${targetPlatform.config}-nm"; 428 + OBJCOPY_FOR_TARGET = "${targetPlatform.config}-objcopy"; 429 + OBJDUMP_FOR_TARGET = "${targetPlatform.config}-objdump"; 430 + RANLIB_FOR_TARGET = "${targetPlatform.config}-ranlib"; 431 + SIZE_FOR_TARGET = "${targetPlatform.config}-size"; 432 + STRINGS_FOR_TARGET = "${targetPlatform.config}-strings"; 433 + STRIP_FOR_TARGET = "${targetPlatform.config}-strip"; 434 + CC_FOR_TARGET = "${targetPlatform.config}-gcc"; 435 CXX_FOR_TARGET = "${targetPlatform.config}-g++"; 436 # If we are making a cross compiler, targetPlatform != hostPlatform 437 NIX_CC_CROSS = optionalString (targetPlatform == hostPlatform) builtins.toString stdenv.cc; 438 dontStrip = true; 439 buildFlags = ""; 440 }; 441