nixpkgs/pkgs/build-support
Sergei Trofimovich 649ebfbed6 cc-wrapper: change cflags order from cc/crt1/libc to crt1/libc/cc
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.
2022-02-20 10:45:45 +00:00
..
add-opengl-runpath
agda
alternatives lapack: include lapacke_utils.h in alternatives/lapack 2021-12-01 15:14:47 +08:00
appimage
bintools-wrapper Check link type based on expanded parameters 2022-01-01 20:30:56 +08:00
build-bazel-package buildBazelPackage: Pass --curses=no for terse logs 2021-12-04 23:36:40 +00:00
build-fhs-userenv chrootenv: remove default.nix from src 2022-02-05 03:01:03 -05:00
build-fhs-userenv-bubblewrap Merge pull request #145258 from Ma27/steam-resolv-conf-override 2022-01-18 22:59:08 +01:00
build-graalvm-native-image buildGraalVmNativeImage: enable utf-8 by default 2022-01-04 09:56:34 +01:00
build-setupcfg
buildenv
cc-wrapper cc-wrapper: change cflags order from cc/crt1/libc to crt1/libc/cc 2022-02-20 10:45:45 +00:00
coq
dhall dhallDirectoryToNix: add this utility function 2021-12-07 13:36:21 +09:00
docker streamLayeredImage: pass through passthru attributes 2022-01-31 10:10:10 +03:00
dotnet dotnetenv: move to pkgs/build-support/dotnet 2022-02-11 16:43:20 +01:00
emacs melpa2nix: Ignore large file warnings 2021-12-19 08:07:18 -08:00
expand-response-params
fetchbitbucket
fetchbower
fetchbzr
fetchcvs
fetchdarcs
fetchdocker
fetchfirefoxaddon
fetchfossil
fetchgit fetchgit: Add test for sparseCheckout 2022-01-24 11:23:56 +08:00
fetchgitea
fetchgithub fetchFromGitHub: perserve originating position 2022-02-10 10:18:16 -08:00
fetchgitiles
fetchgitlab fetchgitlab: fix unexpected argument 2021-11-18 21:53:46 +03:00
fetchgitlocal
fetchgx
fetchhg
fetchipfs
fetchmavenartifact
fetchmtn
fetchnextcloudapp
fetchpatch fetchpatch: Clean up 2022-02-02 12:15:47 +01:00
fetchrepoorcz
fetchrepoproject
fetchs3
fetchsavannah
fetchsourcehut fetchFromSourcehut: allow recursive fetching 2022-01-03 16:37:16 +07:00
fetchsvn
fetchsvnrevision
fetchsvnssh
fetchurl fetchurl: also check certificate when using all zero hash (#152608) 2022-01-02 13:01:17 +01:00
fetchzip
go garble: 20200107 -> 0.5.1, switch to go_1_17 2022-01-30 07:42:46 +10:00
icon-conv-tools
install-shell-files
java
kernel make-initrd: fix reproducibility problems with hard links 2022-01-29 18:07:11 -05:00
libredirect Merge remote-tracking branch 'nixpkgs/staging-next' into staging 2022-01-24 15:39:34 +00:00
make-darwin-bundle build-support: make-darwin-bundle: new 2022-02-10 18:53:53 +00:00
make-desktopitem
make-startupitem
make-symlinks
mkshell mkShell: make it buildable (#153194) 2022-01-08 01:54:04 +01:00
mono-dll-fixer mono-dll-fixer: remove builder.sh 2021-11-20 18:01:00 +01:00
nix-gitignore
node/fetch-yarn-deps fetchYarnDeps: support more url types 2021-12-30 11:13:25 +01:00
nuke-references
ocaml
oci-tools
pkg-config-wrapper pkg-config: make comment clearer for non-natives 2021-12-02 16:11:43 -08:00
prefer-remote-fetch
references-by-popularity
release
remove-references-to
replace-secret
rust Merge master into staging-next 2022-01-20 00:01:46 +00:00
setup-hooks Merge staging-next into staging 2022-02-11 00:02:23 +00:00
singularity-tools
skaware skawarePackages.buildPackage: reformat with nixpkgs-fmt 2022-01-15 22:06:56 +01:00
snap
src-only
substitute
substitute-files
templaterpm
trivial-builders nixos/nix-daemon: use structural settings 2022-01-26 21:04:50 -05:00
vm vmTools/test: fix pcmanfm instead of pan 2021-12-31 16:47:22 +01:00
wrapper-common
writers writers.PyPy{2,3}: init 2021-12-15 10:01:08 +01:00
build-maven.nix
build-pecl.nix
closure-info.nix
plugins.nix
replace-dependency.nix
setup-systemd-units.nix
source-from-head-fun.nix
test-equal-derivation.nix testEqualDerivation: init 2022-01-08 15:18:57 +01:00
trivial-builders.nix Merge branch 'staging-next' into staging 2022-01-10 01:26:05 +01:00