···39 # limit rebuilds by only disabling pie w/musl
40 ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "pie";
41000000000000000042 postInstall = ''
43 echo SUPPORTED-LOCALES=C.UTF-8/UTF-8 > ../glibc-2*/localedata/SUPPORTED
44 make -j''${NIX_BUILD_CORES:-1} -l''${NIX_BUILD_CORES:-1} localedata/install-locales
···39 # limit rebuilds by only disabling pie w/musl
40 ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "pie";
4142+ # When building glibc from bootstrap-tools, we need libgcc_s at RPATH for
43+ # any program we run, because the gcc will have been placed at a new
44+ # store path than that determined when built (as a source for the
45+ # bootstrap-tools tarball)
46+ # Building from a proper gcc staying in the path where it was installed,
47+ # libgcc_s will not be at {gcc}/lib, and gcc's libgcc will be found without
48+ # any special hack.
49+ preInstall = ''
50+ if [ -f ${stdenv.cc.cc}/lib/libgcc_s.so.1 ]; then
51+ mkdir -p $out/lib
52+ cp ${stdenv.cc.cc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1
53+ # the .so It used to be a symlink, but now it is a script
54+ cp -a ${stdenv.cc.cc}/lib/libgcc_s.so $out/lib/libgcc_s.so
55+ fi
56+ '';
57+58 postInstall = ''
59 echo SUPPORTED-LOCALES=C.UTF-8/UTF-8 > ../glibc-2*/localedata/SUPPORTED
60 make -j''${NIX_BUILD_CORES:-1} -l''${NIX_BUILD_CORES:-1} localedata/install-locales