nixpkgs/pkgs/development/compilers/gcc
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
..
common gcc: link $lib/lib -> $lib/$targetConfig correctly and consistently 2024-03-15 18:18:24 +00:00
patches gcc: amend __FILE__ mangling patch to only affect -fmacro-prefix-map= 2024-02-02 20:59:41 +00:00
all.nix gcc48: disable on x86_64-darwin 2023-11-08 07:32:47 +00:00
default.nix gcc: link $lib/lib -> $lib/$targetConfig correctly and consistently 2024-03-15 18:18:24 +00:00
versions.nix gcc: move version information to gcc/versions.nix 2023-11-07 09:57:54 +00:00