Commit Graph

10 Commits

Author SHA1 Message Date
Tim
eaee7b7a45 glibc_multi: add output "static"
This change enables static compilation with glibc in a multilib setup. For
building a nix shell the output can now be referenced as follows:

devShells.default = pkgs.mkShell {
    packages = [
        pkgs.glibc_multi.static
    ];
};

In the implementation I was forced to make two design decisions:
1. The directory `$static/lib64` has to be a "real" directory and not a symlink.
   Otherwise, the path to this directory is not added to $NIX_LDFLAGS, which in
   turn causes the files to not be visible to gcc and ld during the build
   process (for details see `pkgs/build-support/bintools-wrapper/setup-hook.sh`
   line 16).
2. The directories `$static/lib` and `$static/lib64` have to contain symlinks
   to both the files used for static and for dynamic linking (i.e. the outputs
   of `static` and `out` of the 32 and 64 bit variant of glibc). Without this,
   dynamic linking still works, however the resulting binaries will segfault.
2025-02-17 12:52:56 +01:00
Silvan Mosberger
4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00
Adam Joseph
0e9ef0a07d cc-wrapper: when merging gcc32 and gcc64, merge libgcc as well
Our gcc_multi and glibc_multi expressions merge together a
32-bit-targeted and 64-bit-targeted gcc.  However they do not thread
through the passthru.libgcc from these merged gccs.

This commit corrects that.

It also extends passthru.libgcc to allow a *list* rather than just a
single outpath.

Resolves part of #221891 (at least getting it back to the error
message it gave before).
2023-05-09 00:16:24 -07:00
Artturin
513b7f1010 glibc_multi: match output ordering of glibc
glibc has an exception in that 'out' is the default output instead of 'bin'

it should be matched here for consistency
2022-05-29 19:54:32 +03:00
Tuomas Tynkkynen
73f1ade407 glibc_multi: Reference dev outputs of glibc 2016-08-30 15:18:51 +03:00
Tuomas Tynkkynen
040fadf345 glibc_multi: Fix unnoticed output shuffle 2016-08-29 14:49:53 +03:00
Vladimír Čunát
244f985461 glibc-multi: fix with multiple outputs 2015-12-05 17:40:37 +01:00
Nikolay Amiantov
1283e3da5d glibc_multi: fix ldd for 64-bit ELFs 2015-10-07 15:44:12 +03:00
Emery Hemingway
be2060f1e7 glibc_multi: fix package name (close #5284)
"multi" should be between the "glibc" and the version
2014-12-10 18:31:31 +01:00
Eelco Dolstra
1b55b07eeb glibc/2.19 -> glibc
We only have one version of Glibc so no need for a separate directory.
2014-10-29 13:42:59 +01:00