nixpkgs/pkgs/development/compilers/gcc/common
Adam Joseph b81284ec71 gcc: link $lib/lib -> $lib/$targetConfig correctly and consistently
When native-compiling, gcc will install libraries into:

  /nix/store/...-$targetConfig-gcc-$version-lib/lib

When cross-compiling, gcc will install libraries into:

  /nix/store/...-$targetConfig-gcc-$version-lib/$targetConfig

When cross-compiling, we intended to create a link from $lib/lib to
$lib/$targetConfig, so that downstream users can always safely
assume that "${lib.getLib stdenv.cc.cc}/lib" is where the gcc
libraries are, regardless of whether `stdenv.cc.cc` is a cross
compiler or a native compiler.

Unfortunately, there were two problems with how we were trying to
create these links:

1. The link would be created only when `enableLibGccOutput==true`

2. The link was being created from the incorrect source
   `$lib/lib/lib` instead of `$lib/lib`.

Both of these mistakes are my fault.  This commit corrects them by
creating the link using `ln -Ts` (which is more predictable) and by
creating the link from `gcc/common/builder.nix` rather than from
`gcc/common/libgcc.nix`.
2024-03-15 18:18:24 +00:00
..
builder.nix gcc: link $lib/lib -> $lib/$targetConfig correctly and consistently 2024-03-15 18:18:24 +00:00
checksum.nix gcc: do not --disable-bootstrap, create libgcc output, or create checksum output on Darwin 2023-04-05 21:36:09 -07:00
configure-flags.nix Merge remote-tracking branch 'origin/staging-next' into staging 2024-01-18 19:15:32 +03:00
dependencies.nix gcc: s_crossStageStatic_withoutTargetLibc_ 2023-07-01 13:12:41 -07:00
extra-target-flags.nix gcc: s_crossStageStatic_withoutTargetLibc_ 2023-07-01 13:12:41 -07:00
libgcc-buildstuff.nix gcc: extend crtn workaround to alpha target 2024-01-18 08:30:39 +00:00
libgcc.nix gcc: link $lib/lib -> $lib/$targetConfig correctly and consistently 2024-03-15 18:18:24 +00:00
meta.nix gcc: add common/meta.nix 2023-02-12 05:44:34 +02:00
platform-flags.nix Merge pull request #228296 from amjoseph-nixpkgs/pr/gcc/libsanitizer/mips64n32 2023-05-05 06:54:41 +00:00
pre-configure.nix gcc: always inhibit libc in cross with same configs 2023-10-10 10:58:44 +00:00
strip-attributes.nix libgccjit: don't try to enter into non-existent $lib output 2022-08-20 12:51:36 +01:00