···3939 # limit rebuilds by only disabling pie w/musl
4040 ++ stdenv.lib.optional stdenv.hostPlatform.isMusl "pie";
41414242+ # When building glibc from bootstrap-tools, we need libgcc_s at RPATH for
4343+ # any program we run, because the gcc will have been placed at a new
4444+ # store path than that determined when built (as a source for the
4545+ # bootstrap-tools tarball)
4646+ # Building from a proper gcc staying in the path where it was installed,
4747+ # libgcc_s will not be at {gcc}/lib, and gcc's libgcc will be found without
4848+ # any special hack.
4949+ preInstall = ''
5050+ if [ -f ${stdenv.cc.cc}/lib/libgcc_s.so.1 ]; then
5151+ mkdir -p $out/lib
5252+ cp ${stdenv.cc.cc}/lib/libgcc_s.so.1 $out/lib/libgcc_s.so.1
5353+ # the .so It used to be a symlink, but now it is a script
5454+ cp -a ${stdenv.cc.cc}/lib/libgcc_s.so $out/lib/libgcc_s.so
5555+ fi
5656+ '';
5757+4258 postInstall = ''
4359 echo SUPPORTED-LOCALES=C.UTF-8/UTF-8 > ../glibc-2*/localedata/SUPPORTED
4460 make -j''${NIX_BUILD_CORES:-1} -l''${NIX_BUILD_CORES:-1} localedata/install-locales