mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 09:53:10 +00:00
649ebfbed6
In https://github.com/NixOS/nixpkgs/issues/158042 I noticed order mismatch as a bootstrap build failure when building x86_64-linux against glibc-2.35 in nixpkgs (bootstrap libs has glibc-2.27): expand-response-params> ld: /nix/store/p4s4jf7aq6v6z9iazll1aiqwb34aqxq9-bootstrap-tools/lib/crt1.o: in function `_start': expand-response-params> /build/glibc-2.27/csu/../sysdeps/x86_64/start.S:101: undefined reference to `__libc_csu_fini' expand-response-params> ld: /build/glibc-2.27/csu/../sysdeps/x86_64/start.S:102: undefined reference to `__libc_csu_init' expand-response-params> collect2: error: ld returned 1 exit status Here crt1.o from glibc-2.27 links against libc.so.6 from glibc-2.35. This happens because ordering of `-L` (influences `libc.so` lookup) and `-B` (influences `crt1.o` lookup) flags differs: expand-response-params> -B/...-bootstrap-tools/lib expand-response-params> -B/...-glibc-2.35/lib/ ... expand-response-params> -L/...-glibc-2.35/lib expand-response-params> -L/...-bootstrap-tools/lib The change makes consistent ordering of `-L`/`-B` and allows getting to stage4 for `glibc-2.35` target. |
||
---|---|---|
.. | ||
add-flags.sh | ||
add-hardening.sh | ||
cc-wrapper.sh | ||
default.nix | ||
fortran-hook.sh | ||
gnat-wrapper.sh | ||
setup-hook.sh |