lol

gcc: appease the formatter

+43 -16
+8 -3
pkgs/development/compilers/gcc/all.nix
··· 26 26 inherit majorMinorVersion; 27 27 reproducibleBuild = true; 28 28 profiledCompiler = false; 29 - libcCross = if ! lib.systems.equals stdenv.targetPlatform stdenv.buildPlatform then args.libcCross else null; 30 - threadsCross = if ! lib.systems.equals stdenv.targetPlatform stdenv.buildPlatform then threadsCross else { }; 29 + libcCross = 30 + if !lib.systems.equals stdenv.targetPlatform stdenv.buildPlatform then args.libcCross else null; 31 + threadsCross = 32 + if !lib.systems.equals stdenv.targetPlatform stdenv.buildPlatform then threadsCross else { }; 31 33 isl = if stdenv.hostPlatform.isDarwin then null else isl_0_20; 32 34 # do not allow version skew when cross-building gcc 33 35 # ··· 49 51 # cross-case. 50 52 stdenv = 51 53 if 52 - ((! lib.systems.equals stdenv.targetPlatform stdenv.buildPlatform) || (! lib.systems.equals stdenv.hostPlatform stdenv.targetPlatform)) 54 + ( 55 + (!lib.systems.equals stdenv.targetPlatform stdenv.buildPlatform) 56 + || (!lib.systems.equals stdenv.hostPlatform stdenv.targetPlatform) 57 + ) 53 58 && stdenv.cc.isGNU 54 59 then 55 60 pkgs."gcc${majorVersion}Stdenv"
+4 -1
pkgs/development/compilers/gcc/common/checksum.nix
··· 9 9 10 10 let 11 11 enableChecksum = 12 - (with stdenv; lib.systems.equals buildPlatform hostPlatform && lib.systems.equals hostPlatform targetPlatform) 12 + ( 13 + with stdenv; 14 + lib.systems.equals buildPlatform hostPlatform && lib.systems.equals hostPlatform targetPlatform 15 + ) 13 16 && langC 14 17 && langCC 15 18 && !stdenv.hostPlatform.isDarwin;
+2 -2
pkgs/development/compilers/gcc/common/extra-target-flags.nix
··· 19 19 let 20 20 mkFlags = 21 21 dep: langD: 22 - lib.optionals ((! lib.systems.equals targetPlatform hostPlatform) && dep != null && !langD) ( 22 + lib.optionals ((!lib.systems.equals targetPlatform hostPlatform) && dep != null && !langD) ( 23 23 [ 24 24 "-O2 -idirafter ${lib.getDev dep}${dep.incdir or "/include"}" 25 25 ] ··· 35 35 let 36 36 mkFlags = 37 37 dep: 38 - lib.optionals ((! lib.systems.equals targetPlatform hostPlatform) && dep != null) ( 38 + lib.optionals ((!lib.systems.equals targetPlatform hostPlatform) && dep != null) ( 39 39 [ 40 40 "-Wl,-L${lib.getLib dep}${dep.libdir or "/lib"}" 41 41 ]
+7 -2
pkgs/development/compilers/gcc/common/libgcc.nix
··· 25 25 pkg.overrideAttrs ( 26 26 previousAttrs: 27 27 lib.optionalAttrs 28 - ((! lib.systems.equals targetPlatform hostPlatform) && (enableShared || targetPlatform.isMinGW) && withoutTargetLibc) 28 + ( 29 + (!lib.systems.equals targetPlatform hostPlatform) 30 + && (enableShared || targetPlatform.isMinGW) 31 + && withoutTargetLibc 32 + ) 29 33 { 30 34 makeFlags = [ 31 35 "all-gcc" ··· 46 50 47 51 ( 48 52 let 49 - targetPlatformSlash = if lib.systems.equals hostPlatform targetPlatform then "" else "${targetPlatform.config}/"; 53 + targetPlatformSlash = 54 + if lib.systems.equals hostPlatform targetPlatform then "" else "${targetPlatform.config}/"; 50 55 51 56 # If we are building a cross-compiler and the target libc provided 52 57 # to us at build time has a libgcc, use that instead of building a
+15 -6
pkgs/development/compilers/gcc/common/pre-configure.nix
··· 35 35 # meet that need: it runs on the hostPlatform. 36 36 + 37 37 lib.optionalString 38 - (langFortran && (with stdenv; (! lib.systems.equals buildPlatform hostPlatform) && (lib.systems.equals hostPlatform targetPlatform))) 38 + ( 39 + langFortran 40 + && ( 41 + with stdenv; 42 + (!lib.systems.equals buildPlatform hostPlatform) && (lib.systems.equals hostPlatform targetPlatform) 43 + ) 44 + ) 39 45 '' 40 46 export GFORTRAN_FOR_TARGET=${pkgsBuildTarget.gfortran}/bin/${stdenv.targetPlatform.config}-gfortran 41 47 '' ··· 52 58 # actually different we need to convince the configure script that it 53 59 # is in fact building a cross compiler although it doesn't believe it. 54 60 + 55 - lib.optionalString (targetPlatform.config == hostPlatform.config && (! lib.systems.equals targetPlatform hostPlatform)) 61 + lib.optionalString 62 + (targetPlatform.config == hostPlatform.config && (!lib.systems.equals targetPlatform hostPlatform)) 56 63 '' 57 64 substituteInPlace configure --replace is_cross_compiler=no is_cross_compiler=yes 58 65 '' ··· 65 72 + 66 73 lib.optionalString 67 74 ( 68 - (! lib.systems.equals targetPlatform hostPlatform) && withoutTargetLibc && targetPlatform.config == hostPlatform.config 75 + (!lib.systems.equals targetPlatform hostPlatform) 76 + && withoutTargetLibc 77 + && targetPlatform.config == hostPlatform.config 69 78 ) 70 79 '' 71 80 export inhibit_libc=true 72 81 '' 73 82 74 - + lib.optionalString ((! lib.systems.equals targetPlatform hostPlatform) && withoutTargetLibc && enableShared) ( 75 - import ./libgcc-buildstuff.nix { inherit lib stdenv; } 76 - ) 83 + + lib.optionalString ( 84 + (!lib.systems.equals targetPlatform hostPlatform) && withoutTargetLibc && enableShared 85 + ) (import ./libgcc-buildstuff.nix { inherit lib stdenv; })
+7 -2
pkgs/development/compilers/gcc/patches/default.nix
··· 62 62 63 63 [ ] 64 64 ++ optional (!atLeast12) ./fix-bug-80431.patch 65 - ++ optional (! lib.systems.equals targetPlatform hostPlatform) ./libstdc++-target.patch 65 + ++ optional (!lib.systems.equals targetPlatform hostPlatform) ./libstdc++-target.patch 66 66 ++ optionals (noSysDirs) ( 67 67 [ (if atLeast12 then ./gcc-12-no-sys-dirs.patch else ./no-sys-dirs.patch) ] 68 68 ++ ( ··· 255 255 256 256 ++ optional (langAda && (is9 || is10)) ./gnat-cflags.patch 257 257 ++ 258 - optional (is10 && buildPlatform.system == "aarch64-darwin" && (! lib.systems.equals targetPlatform buildPlatform)) 258 + optional 259 + ( 260 + is10 261 + && buildPlatform.system == "aarch64-darwin" 262 + && (!lib.systems.equals targetPlatform buildPlatform) 263 + ) 259 264 (fetchpatch { 260 265 url = "https://raw.githubusercontent.com/richard-vd/musl-cross-make/5e9e87f06fc3220e102c29d3413fbbffa456fcd6/patches/gcc-${version}/0008-darwin-aarch64-self-host-driver.patch"; 261 266 sha256 = "sha256-XtykrPd5h/tsnjY1wGjzSOJ+AyyNLsfnjuOZ5Ryq9vA=";