diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-12-28 19:54:15 +0100 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-12-28 19:54:15 +0100 |
commit | 84779a6f7da93bd6325f478c62c82cc0a1a2e341 (patch) | |
tree | 554971a930d84656bb952ba0f9a328ef08e70c72 /pkgs/development/compilers/gcc | |
parent | e2d505b24e50e16e3634478d565c7c9988b1d90f (diff) | |
download | nixpkgs-84779a6f7da93bd6325f478c62c82cc0a1a2e341.tar nixpkgs-84779a6f7da93bd6325f478c62c82cc0a1a2e341.tar.gz nixpkgs-84779a6f7da93bd6325f478c62c82cc0a1a2e341.tar.bz2 nixpkgs-84779a6f7da93bd6325f478c62c82cc0a1a2e341.tar.lz nixpkgs-84779a6f7da93bd6325f478c62c82cc0a1a2e341.tar.xz nixpkgs-84779a6f7da93bd6325f478c62c82cc0a1a2e341.tar.zst nixpkgs-84779a6f7da93bd6325f478c62c82cc0a1a2e341.zip |
Remove unnecessary parentheses around if conditions
Pet peeve...
Diffstat (limited to 'pkgs/development/compilers/gcc')
-rw-r--r-- | pkgs/development/compilers/gcc/4.3/default.nix | 6 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/4.4/default.nix | 10 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/4.5/default.nix | 16 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/4.6/default.nix | 16 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/4.7/default.nix | 16 |
5 files changed, 32 insertions, 32 deletions
diff --git a/pkgs/development/compilers/gcc/4.3/default.nix b/pkgs/development/compilers/gcc/4.3/default.nix index 4b9fd616d84..04e9f25fedf 100644 --- a/pkgs/development/compilers/gcc/4.3/default.nix +++ b/pkgs/development/compilers/gcc/4.3/default.nix @@ -47,9 +47,9 @@ let " --enable-threads=posix" + " --enable-nls" ); - stageNameAddon = if (crossStageStatic) then "-stage-static" else + stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; - crossNameAddon = if (cross != null) then "-${cross.config}" + stageNameAddon else ""; + crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else ""; in stdenv.mkDerivation ({ @@ -85,7 +85,7 @@ stdenv.mkDerivation ({ inherit noSysDirs profiledCompiler staticCompiler crossStageStatic binutilsCross libcCross; - targetConfig = if (cross != null) then cross.config else null; + targetConfig = if cross != null then cross.config else null; buildInputs = [texinfo gmp mpfr] ++ (optionals langTreelang [bison flex]) diff --git a/pkgs/development/compilers/gcc/4.4/default.nix b/pkgs/development/compilers/gcc/4.4/default.nix index 49fbcd3205a..09609894ac6 100644 --- a/pkgs/development/compilers/gcc/4.4/default.nix +++ b/pkgs/development/compilers/gcc/4.4/default.nix @@ -84,9 +84,9 @@ let version = "4.4.6"; " --enable-nls" + " --disable-decimal-float" # No final libdecnumber (it may work only in 386) ); - stageNameAddon = if (crossStageStatic) then "-stage-static" else + stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; - crossNameAddon = if (cross != null) then "-${cross.config}" + stageNameAddon else ""; + crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else ""; in @@ -163,11 +163,11 @@ stdenv.mkDerivation ({ ) } ${if langAda then " --enable-libada" else ""} - ${if (cross == null && stdenv.isi686) then "--with-arch=i686" else ""} + ${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""} ${if cross != null then crossConfigureFlags else ""} "; - targetConfig = if (cross != null) then cross.config else null; + targetConfig = if cross != null then cross.config else null; # Needed for the cross compilation to work AR = "ar"; @@ -211,7 +211,7 @@ stdenv.mkDerivation ({ ) } ${if langAda then " --enable-libada" else ""} - ${if (cross == null && stdenv.isi686) then "--with-arch=i686" else ""} + ${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""} ${if cross != null then crossConfigureFlags else ""} --target=${stdenv.cross.config} "; diff --git a/pkgs/development/compilers/gcc/4.5/default.nix b/pkgs/development/compilers/gcc/4.5/default.nix index b0916cf52b8..cb0432b6672 100644 --- a/pkgs/development/compilers/gcc/4.5/default.nix +++ b/pkgs/development/compilers/gcc/4.5/default.nix @@ -78,7 +78,7 @@ let version = "4.5.4"; withArch + withCpu + withAbi + - (if (crossMingw && crossStageStatic) then + (if crossMingw && crossStageStatic then " --with-headers=${libcCross}/include" + " --with-gcc" + " --with-gnu-as" + @@ -115,9 +115,9 @@ let version = "4.5.4"; " --enable-nls" + " --disable-decimal-float") # No final libdecnumber (it may work only in 386) ); - stageNameAddon = if (crossStageStatic) then "-stage-static" else + stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; - crossNameAddon = if (cross != null) then "-${cross.config}" + stageNameAddon else ""; + crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else ""; in @@ -189,7 +189,7 @@ stdenv.mkDerivation ({ # On NixOS, use the right path to the dynamic linker instead of # `/lib/ld*.so'. let - libc = if (libcCross != null) then libcCross else stdenv.gcc.libc; + libc = if libcCross != null then libcCross else stdenv.gcc.libc; in '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..." for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h @@ -237,7 +237,7 @@ stdenv.mkDerivation ({ --with-gmp=${gmp} --with-mpfr=${mpfr} --with-mpc=${mpc} - ${if (libelf != null) then "--with-libelf=${libelf}" else ""} + ${if libelf != null then "--with-libelf=${libelf}" else ""} --disable-libstdcxx-pch --without-included-gettext --with-system-zlib @@ -255,11 +255,11 @@ stdenv.mkDerivation ({ ${ # Trick that should be taken out once we have a mips64el-linux not loongson2f if cross == null && stdenv.system == "mips64el-linux" then "--with-arch=loongson2f" else ""} ${if langAda then " --enable-libada" else ""} - ${if (cross == null && stdenv.isi686) then "--with-arch=i686" else ""} + ${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""} ${if cross != null then crossConfigureFlags else ""} "; - targetConfig = if (cross != null) then cross.config else null; + targetConfig = if cross != null then cross.config else null; crossAttrs = { AR = "${stdenv.cross.config}-ar"; @@ -299,7 +299,7 @@ stdenv.mkDerivation ({ ) } ${if langAda then " --enable-libada" else ""} - ${if (cross == null && stdenv.isi686) then "--with-arch=i686" else ""} + ${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""} ${if cross != null then crossConfigureFlags else ""} --target=${stdenv.cross.config} ''; diff --git a/pkgs/development/compilers/gcc/4.6/default.nix b/pkgs/development/compilers/gcc/4.6/default.nix index d67ee8bef0e..38c3282b7c4 100644 --- a/pkgs/development/compilers/gcc/4.6/default.nix +++ b/pkgs/development/compilers/gcc/4.6/default.nix @@ -101,7 +101,7 @@ let version = "4.6.3"; withArch + withCpu + withAbi + - (if (crossMingw && crossStageStatic) then + (if crossMingw && crossStageStatic then " --with-headers=${libcCross}/include" + " --with-gcc" + " --with-gnu-as" + @@ -149,9 +149,9 @@ let version = "4.6.3"; " --enable-nls" + " --disable-decimal-float") # No final libdecnumber (it may work only in 386) ); - stageNameAddon = if (crossStageStatic) then "-stage-static" else + stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; - crossNameAddon = if (cross != null) then "-${cross.config}" + stageNameAddon else ""; + crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else ""; bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips; @@ -216,7 +216,7 @@ stdenv.mkDerivation ({ # On NixOS, use the right path to the dynamic linker instead of # `/lib/ld*.so'. let - libc = if (libcCross != null) then libcCross else stdenv.gcc.libc; + libc = if libcCross != null then libcCross else stdenv.gcc.libc; in '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..." for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h @@ -275,7 +275,7 @@ stdenv.mkDerivation ({ --with-gmp=${gmp} --with-mpfr=${mpfr} --with-mpc=${mpc} - ${if (libelf != null) then "--with-libelf=${libelf}" else ""} + ${if libelf != null then "--with-libelf=${libelf}" else ""} --disable-libstdcxx-pch --without-included-gettext --with-system-zlib @@ -294,12 +294,12 @@ stdenv.mkDerivation ({ ${ # Trick that should be taken out once we have a mips64el-linux not loongson2f if cross == null && stdenv.system == "mips64el-linux" then "--with-arch=loongson2f" else ""} ${if langAda then " --enable-libada" else ""} - ${if (cross == null && stdenv.isi686) then "--with-arch=i686" else ""} + ${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""} ${if cross != null then crossConfigureFlags else ""} ${if !bootstrap then "--disable-bootstrap" else ""} "; - targetConfig = if (cross != null) then cross.config else null; + targetConfig = if cross != null then cross.config else null; buildFlags = if bootstrap then (if profiledCompiler then "profiledbootstrap" else "bootstrap") @@ -350,7 +350,7 @@ stdenv.mkDerivation ({ ) } ${if langAda then " --enable-libada" else ""} - ${if (cross == null && stdenv.isi686) then "--with-arch=i686" else ""} + ${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""} ${if cross != null then crossConfigureFlags else ""} --target=${stdenv.cross.config} ''; diff --git a/pkgs/development/compilers/gcc/4.7/default.nix b/pkgs/development/compilers/gcc/4.7/default.nix index 3e45efcf645..05e7568a803 100644 --- a/pkgs/development/compilers/gcc/4.7/default.nix +++ b/pkgs/development/compilers/gcc/4.7/default.nix @@ -99,7 +99,7 @@ let version = "4.7.2"; withArch + withCpu + withAbi + - (if (crossMingw && crossStageStatic) then + (if crossMingw && crossStageStatic then " --with-headers=${libcCross}/include" + " --with-gcc" + " --with-gnu-as" + @@ -147,9 +147,9 @@ let version = "4.7.2"; " --enable-nls" + " --disable-decimal-float") # No final libdecnumber (it may work only in 386) ); - stageNameAddon = if (crossStageStatic) then "-stage-static" else + stageNameAddon = if crossStageStatic then "-stage-static" else "-stage-final"; - crossNameAddon = if (cross != null) then "-${cross.config}" + stageNameAddon else ""; + crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else ""; bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips; @@ -211,7 +211,7 @@ stdenv.mkDerivation ({ # On NixOS, use the right path to the dynamic linker instead of # `/lib/ld*.so'. let - libc = if (libcCross != null) then libcCross else stdenv.gcc.libc; + libc = if libcCross != null then libcCross else stdenv.gcc.libc; in '' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..." for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h @@ -274,7 +274,7 @@ stdenv.mkDerivation ({ --with-gmp=${gmp} --with-mpfr=${mpfr} --with-mpc=${mpc} - ${if (libelf != null) then "--with-libelf=${libelf}" else ""} + ${if libelf != null then "--with-libelf=${libelf}" else ""} --disable-libstdcxx-pch --without-included-gettext --with-system-zlib @@ -296,12 +296,12 @@ stdenv.mkDerivation ({ ${ # Trick that should be taken out once we have a mips64el-linux not loongson2f if cross == null && stdenv.system == "mips64el-linux" then "--with-arch=loongson2f" else ""} ${if langAda then " --enable-libada" else ""} - ${if (cross == null && stdenv.isi686) then "--with-arch=i686" else ""} + ${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""} ${if cross != null then crossConfigureFlags else ""} ${if !bootstrap then "--disable-bootstrap" else ""} "; - targetConfig = if (cross != null) then cross.config else null; + targetConfig = if cross != null then cross.config else null; buildFlags = if bootstrap then (if profiledCompiler then "profiledbootstrap" else "bootstrap") @@ -351,7 +351,7 @@ stdenv.mkDerivation ({ ) } ${if langAda then " --enable-libada" else ""} - ${if (cross == null && stdenv.isi686) then "--with-arch=i686" else ""} + ${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""} ${if cross != null then crossConfigureFlags else ""} --target=${stdenv.cross.config} ''; |