|
|
|
@ -227,6 +227,27 @@ in |
|
|
|
|
gcc-unwrapped coreutils gnugrep |
|
|
|
|
perl gnum4 bison; |
|
|
|
|
dejagnu = super.dejagnu.overrideAttrs (a: { doCheck = false; } ); |
|
|
|
|
|
|
|
|
|
# We need libidn2 and its dependency libunistring as glibc dependency. |
|
|
|
|
# To avoid the cycle, we build against bootstrap libc, nuke references, |
|
|
|
|
# and use the result as input for our final glibc. We also pass this pair |
|
|
|
|
# through, so the final package-set uses exactly the same builds. |
|
|
|
|
libunistring = super.libunistring.overrideAttrs (attrs: { |
|
|
|
|
postFixup = attrs.postFixup or "" + '' |
|
|
|
|
${self.nukeReferences}/bin/nuke-refs "$out"/lib/lib*.so.*.* |
|
|
|
|
''; |
|
|
|
|
# Apparently iconv won't work with bootstrap glibc, but it will be used |
|
|
|
|
# with glibc built later where we keep *this* build of libunistring, |
|
|
|
|
# so we need to trick it into supporting libiconv. |
|
|
|
|
am_cv_func_iconv_works = "yes"; |
|
|
|
|
}); |
|
|
|
|
libidn2 = super.libidn2.overrideAttrs (attrs: { |
|
|
|
|
postFixup = attrs.postFixup or "" + '' |
|
|
|
|
${self.nukeReferences}/bin/nuke-refs -e '${lib.getLib self.libunistring}' \ |
|
|
|
|
"$out"/lib/lib*.so.*.* |
|
|
|
|
''; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
# This also contains the full, dynamically linked, final Glibc. |
|
|
|
|
binutils = prevStage.binutils.override { |
|
|
|
|
# Rewrap the binutils with the new glibc, so both the next |
|
|
|
@ -247,7 +268,7 @@ in |
|
|
|
|
inherit (prevStage) |
|
|
|
|
ccWrapperStdenv |
|
|
|
|
binutils coreutils gnugrep |
|
|
|
|
perl patchelf linuxHeaders gnum4 bison; |
|
|
|
|
perl patchelf linuxHeaders gnum4 bison libidn2 libunistring; |
|
|
|
|
${localSystem.libc} = getLibc prevStage; |
|
|
|
|
# Link GCC statically against GMP etc. This makes sense because |
|
|
|
|
# these builds of the libraries are only used by GCC, so it |
|
|
|
@ -277,7 +298,7 @@ in |
|
|
|
|
# because gcc (since JAR support) already depends on zlib, and |
|
|
|
|
# then if we already have a zlib we want to use that for the |
|
|
|
|
# other purposes (binutils and top-level pkgs) too. |
|
|
|
|
inherit (prevStage) gettext gnum4 bison gmp perl texinfo zlib linuxHeaders; |
|
|
|
|
inherit (prevStage) gettext gnum4 bison gmp perl texinfo zlib linuxHeaders libidn2 libunistring; |
|
|
|
|
${localSystem.libc} = getLibc prevStage; |
|
|
|
|
binutils = super.binutils.override { |
|
|
|
|
# Don't use stdenv's shell but our own |
|
|
|
@ -363,7 +384,7 @@ in |
|
|
|
|
] |
|
|
|
|
# Library dependencies |
|
|
|
|
++ map getLib ( |
|
|
|
|
[ attr acl zlib pcre ] |
|
|
|
|
[ attr acl zlib pcre libidn2 libunistring ] |
|
|
|
|
++ lib.optional (gawk.libsigsegv != null) gawk.libsigsegv |
|
|
|
|
) |
|
|
|
|
# More complicated cases |
|
|
|
@ -378,7 +399,7 @@ in |
|
|
|
|
inherit (prevStage) |
|
|
|
|
gzip bzip2 xz bash coreutils diffutils findutils gawk |
|
|
|
|
gnumake gnused gnutar gnugrep gnupatch patchelf |
|
|
|
|
attr acl zlib pcre; |
|
|
|
|
attr acl zlib pcre libunistring libidn2; |
|
|
|
|
${localSystem.libc} = getLibc prevStage; |
|
|
|
|
} // lib.optionalAttrs (super.stdenv.targetPlatform == localSystem) { |
|
|
|
|
# Need to get rid of these when cross-compiling. |
|
|
|
|