···11+{ lib
22+, stdenv
33+}:
44+55+# Trick to build a gcc that is capable of emitting shared libraries *without* having the
66+# targetPlatform libc available beforehand. Taken from:
77+# https://web.archive.org/web/20170222224855/http://frank.harvard.edu/~coldwell/toolchain/
88+# https://web.archive.org/web/20170224235700/http://frank.harvard.edu/~coldwell/toolchain/t-linux.diff
99+let
1010+ # crt{i,n}.o are the first and last (respectively) object file
1111+ # linked when producing an executable. Traditionally these
1212+ # files are delivered as part of the C library, but on GNU
1313+ # systems they are in fact built by GCC. Since libgcc needs to
1414+ # build before glibc, we can't wait for them to be copied by
1515+ # glibc. At this early pre-glibc stage these files sometimes
1616+ # have different names.
1717+ crtstuff-ofiles =
1818+ if stdenv.targetPlatform.isPower
1919+ then "ecrti.o ecrtn.o ncrti.o ncrtn.o"
2020+ else "crti.o crtn.o";
2121+2222+ # Normally, `SHLIB_LC` is set to `-lc`, which means that
2323+ # `libgcc_s.so` cannot be built until `libc.so` is available.
2424+ # The assignment below clobbers this variable, removing the
2525+ # `-lc`.
2626+ #
2727+ # On PowerPC we add `-mnewlib`, which means "libc has not been
2828+ # built yet". This causes libgcc's Makefile to use the
2929+ # gcc-built `{e,n}crt{n,i}.o` instead of failing to find the
3030+ # versions which have been repackaged in libc as `crt{n,i}.o`
3131+ #
3232+ SHLIB_LC = lib.optionalString stdenv.targetPlatform.isPower "-mnewlib";
3333+3434+in ''
3535+ echo 'libgcc.a: ${crtstuff-ofiles}' >> libgcc/Makefile.in
3636+ echo 'SHLIB_LC=${SHLIB_LC}' >> libgcc/Makefile.in
3737+ ''
+7-7
pkgs/development/compilers/gcc/common/libgcc.nix
···4444 !langJit &&
4545 !stdenv.hostPlatform.isDarwin &&
4646 enableShared
4747- ;
4747+ ;
48484949- # For some reason libgcc_s.so has major-version "2" on m68k but
5050- # "1" everywhere else. Might be worth changing this to "*".
5151- libgcc_s-version-major =
5252- if targetPlatform.isM68k
5353- then "2"
5454- else "1";
4949+ # For some reason libgcc_s.so has major-version "2" on m68k but
5050+ # "1" everywhere else. Might be worth changing this to "*".
5151+ libgcc_s-version-major =
5252+ if targetPlatform.isM68k
5353+ then "2"
5454+ else "1";
55555656in
5757(pkg: pkg.overrideAttrs (previousAttrs: lib.optionalAttrs ((!langC) || langJit || enableLibGccOutput) {
···112112 export inhibit_libc=true
113113''
114114115115-# Trick to build a gcc that is capable of emitting shared libraries *without* having the
116116-# targetPlatform libc available beforehand. Taken from:
117117-# https://web.archive.org/web/20170222224855/http://frank.harvard.edu/~coldwell/toolchain/
118118-# https://web.archive.org/web/20170224235700/http://frank.harvard.edu/~coldwell/toolchain/t-linux.diff
119115+ lib.optionalString (targetPlatform != hostPlatform && withoutTargetLibc && enableShared)
120120- (let
121121-122122- # crt{i,n}.o are the first and last (respectively) object file
123123- # linked when producing an executable. Traditionally these
124124- # files are delivered as part of the C library, but on GNU
125125- # systems they are in fact built by GCC. Since libgcc needs to
126126- # build before glibc, we can't wait for them to be copied by
127127- # glibc. At this early pre-glibc stage these files sometimes
128128- # have different names.
129129- crtstuff-ofiles =
130130- if targetPlatform.isPower
131131- then "ecrti.o ecrtn.o ncrti.o ncrtn.o"
132132- else "crti.o crtn.o";
133133-134134- # Normally, `SHLIB_LC` is set to `-lc`, which means that
135135- # `libgcc_s.so` cannot be built until `libc.so` is available.
136136- # The assignment below clobbers this variable, removing the
137137- # `-lc`.
138138- #
139139- # On PowerPC we add `-mnewlib`, which means "libc has not been
140140- # built yet". This causes libgcc's Makefile to use the
141141- # gcc-built `{e,n}crt{n,i}.o` instead of failing to find the
142142- # versions which have been repackaged in libc as `crt{n,i}.o`
143143- #
144144- SHLIB_LC = lib.optionalString targetPlatform.isPower "-mnewlib";
145145-146146- in ''
147147- echo 'libgcc.a: ${crtstuff-ofiles}' >> libgcc/Makefile.in
148148- echo 'SHLIB_LC=${SHLIB_LC}' >> libgcc/Makefile.in
149149- '')
150150-116116+ (import ./libgcc-buildstuff.nix { inherit lib stdenv; })
···115115 in
116116 pkgs.runCommand "test-mbuffer" {} ''
117117 echo hello | ${emulator} ${mbuffer}/bin/mbuffer
118118+ touch $out
118119 '';
119120120121 # This is meant to be a carefully curated list of builds/packages
···127128 # of things that often break. So, no buckshot `mapTestOnCross`
128129 # calls here.
129130 sanity = [
130130- #pkgs.mbuffer # https://github.com/NixOS/nixpkgs/issues/213453
131131+ mbuffer
131132 #pkgs.pkgsCross.gnu64.bash # https://github.com/NixOS/nixpkgs/issues/243164
132133 pkgs.gcc_multi.cc
133134 pkgs.pkgsMusl.stdenv
134135 pkgs.pkgsLLVM.stdenv
135136 pkgs.pkgsStatic.bash
136137 pkgs.pkgsCross.arm-embedded.stdenv
138138+ pkgs.pkgsCross.armv7l-hf-multiplatform.stdenv
137139 pkgs.pkgsCross.m68k.stdenv
138140 pkgs.pkgsCross.aarch64-multiplatform.pkgsBuildTarget.gcc
139141 pkgs.pkgsCross.powernv.pkgsBuildTarget.gcc
-1
pkgs/top-level/aliases.nix
···879879 liberation_ttf_v1_from_source = throw "'liberation_ttf_v1_from_source' has been renamed to/replaced by 'liberation_ttf_v1'"; # Converted to throw 2022-02-22
880880 liberation_ttf_v2_from_source = throw "'liberation_ttf_v2_from_source' has been renamed to/replaced by 'liberation_ttf_v2'"; # Converted to throw 2022-02-22
881881 liberationsansnarrow = throw "'liberationsansnarrow' has been renamed to/replaced by 'liberation-sans-narrow'"; # Converted to throw 2022-02-22
882882- libgcc = throw "libgcc was removed, use gcc.cc.libgcc if needed"; # added 2023-05-13
883882 libgksu = throw "libgksu has been removed"; # Added 2022-01-16
884883 libgme = game-music-emu; # Added 2022-07-20
885884 libgnome_keyring = throw "'libgnome_keyring' has been renamed to/replaced by 'libgnome-keyring'"; # Converted to throw 2022-02-22
+7
pkgs/top-level/all-packages.nix
···18918189181891918919 librarian-puppet-go = callPackage ../development/tools/librarian-puppet-go { };
18920189201892118921+ libgcc = stdenv.cc.cc.libgcc or null;
1892218922+1892118923 # This is for e.g. LLVM libraries on linux.
1892218924 gccForLibs =
1892318925 if stdenv.targetPlatform == stdenv.hostPlatform && targetPackages.stdenv.cc.isGNU
···2144421446 # Being redundant to avoid cycles on boot. TODO: find a better way
2144521447 glibcCross = callPackage ../development/libraries/glibc {
2144621448 stdenv = gccCrossLibcStdenv; # doesn't compile without gcc
2144921449+ libgcc = callPackage ../development/libraries/gcc/libgcc {
2145021450+ gcc = gccCrossLibcStdenv.cc;
2145121451+ glibc = glibcCross.override { libgcc = null; };
2145221452+ stdenvNoLibs = gccCrossLibcStdenv;
2145321453+ };
2144721454 };
21448214552144921456 muslCross = musl.override {