Commit Graph

692 Commits

Author SHA1 Message Date
w
d7ec977f86 stdenv: Allow user to supply their bootstrapFiles set of tools 2024-08-30 02:31:18 +00:00
Philip Taron
4758cfe98f
stdenv/linux: disable and drop isl from gcc's bootstrap tools (#336985) 2024-08-28 19:32:54 -07:00
Jörg Thalheim
2c9d00dbed
pkgs/stdenv/linux: update s390x-unknown-linux-gnu bootstrap-files (#334334) 2024-08-28 09:27:19 +02:00
Sergei Trofimovich
a74147fe6a stdenv/linux: disable and drop isl from gcc's bootstrap tools
`isl` is only needed to support `gcc` transformations enabled by
`-fgraphite*` options. Packages do not usually use those flags. None of
the bootstrap packages use it.

`nixpkgs` does not use up-to-date `isl` for `gcc` either. Let's drop
`isl` dependency from the bootstrap binary seed.
2024-08-24 10:27:24 +01:00
Philip Taron
2cf5e918df
stdenv: remove with statements 2024-08-18 06:32:22 -07:00
bl0v3
f32f54b860 pkgs/stdenv/linux: update s390x-unknown-linux-gnu bootstrap-files
sha256sum of files to be uploaded:

$ sha256sum /nix/store/ijkl5anf7mx1p3whdkxv4qs5crf6ic35-stdenv-bootstrap-tools-s390x-unknown-linux-gnu/on-server/*
1d8a28370912b69f50d6764ec3d71e9448903d6c14ee24873f589ac68741bf58  /nix/store/ijkl5anf7mx1p3whdkxv4qs5crf6ic35-stdenv-bootstrap-tools-s390x-unknown-linux-gnu/on-server/bootstrap-tools.tar.xz
03f16d698a45ec58bd5a0dc428d64ad5122a3ea1fd4d886cc93618951e4e74eb  /nix/store/ijkl5anf7mx1p3whdkxv4qs5crf6ic35-stdenv-bootstrap-tools-s390x-unknown-linux-gnu/on-server/busybox

Suggested commands to upload files to 'tarballs.nixos.org':

    $ nix-store --realize /nix/store/ijkl5anf7mx1p3whdkxv4qs5crf6ic35-stdenv-bootstrap-tools-s390x-unknown-linux-gnu
    $ aws s3 cp --recursive --acl public-read /nix/store/ijkl5anf7mx1p3whdkxv4qs5crf6ic35-stdenv-bootstrap-tools-s390x-unknown-linux-gnu/on-server/ s3://nixpkgs-tarballs/stdenv/s390x-unknown-linux-gnu/0a7eaa55ccaa5103f44a9a4e3e0b06e5314a6401
    $ aws s3 cp --recursive s3://nixpkgs-tarballs/stdenv/s390x-unknown-linux-gnu/0a7eaa55ccaa5103f44a9a4e3e0b06e5314a6401 ./
    $ sha256sum bootstrap-tools.tar.xz busybox
    $ sha256sum /nix/store/ijkl5anf7mx1p3whdkxv4qs5crf6ic35-stdenv-bootstrap-tools-s390x-unknown-linux-gnu/on-server/*
2024-08-13 10:18:32 +02:00
github-actions[bot]
cf88251824
Merge staging-next into staging 2024-08-05 18:01:40 +00:00
bl0v3
398058603f stdenv: add bootstrap files for s390x 2024-08-05 13:04:20 +02:00
Vladimír Čunát
d4720e9c1e
Merge branch 'staging-next' into staging
There was a nontrivial conflict in pkgs/stdenv/linux/bootstrap-tools*
(reorganizing code vs. modifying it)  I hope I really got it right.
2024-08-05 11:05:55 +02:00
Philip Taron
e915f6b32e
freshBootstrapTools: run nixfmt 2024-08-02 17:47:52 -07:00
Philip Taron
2587d88ee8
freshBootstrapTools.bootstrapTools: extract as a sort of package 2024-08-02 17:47:40 -07:00
Philip Taron
052ecdbfae
freshBootstrapTools: unify glibc and musl into the same directory
CI required that I `nixfmt` them at the same time.
2024-08-02 17:47:19 -07:00
Philip Taron
0a8120ff7d
freshBootstrapTools: avoid top-level with 2024-08-02 17:31:07 -07:00
Philip Taron
fd5887f5d0
freshBootstrapTools.build: put bootstrapFiles into stdenv-bootstrap-tools.nix 2024-08-02 17:31:04 -07:00
Philip Taron
67a5dcdc41
freshBootstrapTools.test: extract a package 2024-08-02 17:31:00 -07:00
Philip Taron
ed4cd6ab51
freshBootstrapTools.build: extract a package 2024-08-02 17:30:22 -07:00
Robert Scott
48bde3a189 cc-wrapper: add support for pacret hardening flag on aarch64 2024-07-28 19:27:14 +01:00
Emily
8a837af302
Merge pull request #326819 from risicle/ris-shadowstack
cc-wrapper: add support for `shadowstack` hardening flag
2024-07-28 19:07:52 +01:00
bolives-hax
59dabc0d10
add s390x to make-bootstrap-tools-cross.nix 2024-07-16 20:33:49 +02:00
Robert Scott
b207b6ef74 cc-wrapper: add support for shadowstack hardening flag 2024-07-14 21:25:47 +01:00
Robert Scott
c68739f4f0 bootstrap-tools-musl: match bootstrap-tools hardeningUnsupportedFlags
seems we missed adding stackclashprotection
2024-07-14 21:25:47 +01:00
Franz Pletz
3db93c351d cc-wrapper: add stack clash protection hardening flag
Most Linux distributions are enabling this these days and it does
protect against real world vulnerabilities as demonstrated by
CVE-2018-16864 and CVE-2018-16865.

Fix #53753.

Information on llvm version support gleaned from
6609892a2d
68e07da3e5
092507a730

Information on gcc version support a lot harder to gather,
but both 32bit and 64bit arm do appear to be supported
based on the test suite.
2024-06-07 20:23:46 +01:00
sternenseemann
7be562d046 wrapCC, wrapBintools: move expand-response-params bootstrapping out
The cc and bintools wrapper contained ad hoc bootstrapping logic for
expand-response-params (which was callPackage-ed in a let binding). This
lead to the strange situation that the bootstrapping logic related to
expand-response-params is split between the wrapper derivations (where
it is duplicated) and the actual stdenv bootstrapping.

To clean this up, the wrappers simply should take expand-response-params
as an ordinary input: They need an adjacent expand-response-params (i.e.
one that runs on their host platform), but don't care about the how.
Providing this is only problematic during stdenv bootstrapping where we
have to pull it from the previous stage at times.
2024-04-18 20:49:13 +02:00
sternenseemann
b2a568906a wrapCC, wrapBintools: use runtimeShell instead of stdenv shell
We don't need to artificially make sure that we can execute the wrapper
scripts on the build platform by using stdenv's shell (which comes from
buildPackages) since our cross infrastructure will get us the wrapper
from buildPackages. The upside of this change is that cross-compiled
wrappers (e.g. pkgsCross.aarch64-multiplatform.gcc) will actually work
when executed!

For bootstrapping this is also not a problem, since we have a long
build->build platform chain so runtimeShell is just as good as
stdenvNoCC.shell. We do fall back to old ways, though, by explicitly
using the bootstrap-tools shell in stage2, so the adjacent bash is only
used from stage4 onwards. This is unnecessary in principle (I'll try
removing this hack in the future), but ensures this change causes zero
rebuilds.
2024-04-18 20:49:13 +02:00
sternenseemann
0198f43efb stdenv: consistently use self: super: … for bootstrapping overlays
As of late, `final: prev: …` for overlays has become more prevalent in
newer code. This is also exhibited in some code (presumably added
recently) in stdenv. This change is not about any merits or demerits of
any naming convention, but rather aims to make the nomenclature in
stdenv bootstrapping consistent to lessen confusion.

I've chosen to stick to `self: super: …` convention because:

1. It is more common in the code as it stands.

2. Using `final: prev: …` makes the code more confusing, als it causes
   `prev` to be in scope alongside `prevStage`. `prevStage` actually
   bears no relation to `prev` even though their naming suggests it,
   making it easy to confuse them (the former is the (final) package set
   of the previous stage while the latter is just the `prev`/`super` of
   the overlay “chaining” on a completely fresh package set, i.e. `prev`
   doesn't even relate to the previous stage's `overrides` argument).

This change also corrects a naming error in stdenv/native which had no
effect, as the variables were unused.
2024-04-15 12:53:13 +02:00
Sergei Trofimovich
178f1e1f5d pkgs/top-level/release.nix: drop unused dist targets
The PR https://github.com/NixOS/nixpkgs/pull/284090 exposed `build`
target directly on hydra. We are using it now in
https://github.com/NixOS/nixpkgs/tree/master/maintainers/scripts/bootstrap-files
to generate bootstrap tarballs on `linux` and `darwin`.

`dist` was not very useful as it was a bit hard to link back to hydra
jobs that build it. Let's just drop it.
2024-04-04 21:40:08 +01:00
OPNA2608
5ec7dcd7c5 pkgs/stdenv/linux: init powerpc64-unknown-linux-gnuabielfv2 bootstrap-files
sha256sum of files to be uploaded:

$ sha256sum /nix/store/8frm8kk8gzpv31r289ai5jgkwfikmpm4-stdenv-bootstrap-tools-powerpc64-unknown-linux-gnuabielfv2/on-server/*
0af311476b54b399f3024b92e9c518363acd2b15f713e83d0bb4fb3f8f26d98b  /nix/store/8frm8kk8gzpv31r289ai5jgkwfikmpm4-stdenv-bootstrap-tools-powerpc64-unknown-linux-gnuabielfv2/on-server/bootstrap-tools.tar.xz
529a053a8022e89357aaa608e57aaddaa7c3ded93d633916ddca92bb81e22125  /nix/store/8frm8kk8gzpv31r289ai5jgkwfikmpm4-stdenv-bootstrap-tools-powerpc64-unknown-linux-gnuabielfv2/on-server/busybox

Suggested commands to upload files to 'tarballs.nixos.org':

    $ nix-store --realize /nix/store/8frm8kk8gzpv31r289ai5jgkwfikmpm4-stdenv-bootstrap-tools-powerpc64-unknown-linux-gnuabielfv2
    $ aws s3 cp --recursive --acl public-read /nix/store/8frm8kk8gzpv31r289ai5jgkwfikmpm4-stdenv-bootstrap-tools-powerpc64-unknown-linux-gnuabielfv2/on-server/ s3://nixpkgs-tarballs/stdenv/powerpc64-unknown-linux-gnuabielfv2/57cf2e0b24fb52344cc718913eaed78f389b1319
    $ aws s3 cp --recursive s3://nixpkgs-tarballs/stdenv/powerpc64-unknown-linux-gnuabielfv2/57cf2e0b24fb52344cc718913eaed78f389b1319 ./
    $ sha256sum bootstrap-tools.tar.xz busybox
    $ sha256sum /nix/store/8frm8kk8gzpv31r289ai5jgkwfikmpm4-stdenv-bootstrap-tools-powerpc64-unknown-linux-gnuabielfv2/on-server/*
2024-03-10 12:36:34 +01:00
Weijia Wang
172fde7e27
Merge pull request #293257 from OPNA2608/add/make-bootstrap-tools-cross-powerpc64
pkgs/stdenv/linux/make-bootstrap-tools-cross: Add powerpc64 entry
2024-03-08 21:00:53 +01:00
github-actions[bot]
fe2479b166
Merge master into staging-next 2024-03-04 18:00:55 +00:00
OPNA2608
5f8522eeab pkgs/stdenv/linux/make-bootstrap-tools-cross: Add powerpc64 entry
So Hydra can cross-compile bootstrapFiles for the platform.
2024-03-04 15:01:29 +01:00
a-n-n-a-l-e-e
d7425f0f21
Merge pull request #288250 from trofi/make-bootstrap-tools-cross-new-target
pkgs/stdenv/linux/make-bootstrap-tools-cross.nix: allow entries for t…
2024-03-04 05:18:39 -08:00
Robert Scott
4a91b3e798 cc-wrapper: add trivialautovarinit hardening flag support
this equates to -ftrivial-auto-var-init=pattern

clang has removed support for -ftrivial-auto-var-init=zero and
are unlikely to re-add it, so use -ftrivial-auto-var-init=pattern
on both compilers if only to make behaviour more consistent
between the two.

add to pkgsExtraHardening's defaultHardeningFlags.
2024-02-24 12:00:09 +00:00
Vladimír Čunát
e81960770a
Merge #288866: pkgs/stdenv/linux: update x86_64-unknown-linux-gnu bootstrap-files
...into staging
2024-02-17 10:38:31 +01:00
Sergei Trofimovich
a0f80e965c pkgs/stdenv/linux/make-bootstrap-tools-cross.nix: allow entries for to-be uplaoded targets
Newly added targets should be fine to be added as hudra jobs before the
first uplaod happens.

Co-authored-by: Cosima Neidahl <opna2608@protonmail.com>
2024-02-15 09:08:58 +00:00
Sergei Trofimovich
74c4e93541 pkgs/stdenv/linux: update x86_64-unknown-linux-gnu bootstrap-files
sha256sum of files to be uploaded:

$ sha256sum /nix/store/dw6vr6m5w7ysrdrbs0s5wdgbjmbnr7gx-stdenv-bootstrap-tools/on-server/*
61096bd3cf073e8556054da3a4f86920cc8eca81036580f0d72eb448619b50cd  /nix/store/dw6vr6m5w7ysrdrbs0s5wdgbjmbnr7gx-stdenv-bootstrap-tools/on-server/bootstrap-tools.tar.xz
87627883b1517087d1c34fadc340bc8deafb3782eb0c60035271822c64dd3401  /nix/store/dw6vr6m5w7ysrdrbs0s5wdgbjmbnr7gx-stdenv-bootstrap-tools/on-server/busybox

Suggested commands to upload files to 'tarballs.nixos.org':

    $ nix-store --realize /nix/store/dw6vr6m5w7ysrdrbs0s5wdgbjmbnr7gx-stdenv-bootstrap-tools
    $ aws s3 cp --recursive --acl public-read /nix/store/dw6vr6m5w7ysrdrbs0s5wdgbjmbnr7gx-stdenv-bootstrap-tools/on-server/ s3://nixpkgs-tarballs/stdenv/x86_64-unknown-linux-gnu/82b583ba2ba2e5706b35dbe23f31362e62be2a9d
    $ aws s3 cp --recursive s3://nixpkgs-tarballs/stdenv/x86_64-unknown-linux-gnu/82b583ba2ba2e5706b35dbe23f31362e62be2a9d ./
    $ sha256sum bootstrap-tools.tar.xz busybox
    $ sha256sum /nix/store/dw6vr6m5w7ysrdrbs0s5wdgbjmbnr7gx-stdenv-bootstrap-tools/on-server/*
2024-02-13 09:10:00 +00:00
Bernardo Meurer
d73b17633c
Merge pull request #285906 from trofi/update-x86_64-unknown-linux-musl-bootstrap-files
pkgs/stdenv/linux: update x86_64-unknown-linux-musl bootstrap-files
2024-02-05 14:18:03 -05:00
Sergei Trofimovich
5de19bf709 pkgs/stdenv/linux: update x86_64-unknown-linux-musl bootstrap-files
sha256sum of files to be uploaded:

$ sha256sum /nix/store/b0x0qcbf1gsp50jzw52sbbgdp3jlwcjf-stdenv-bootstrap-tools/on-server/*
b745b6311ed4c2d3f260419c468f543ae5df68fe2e5192995c499819c04eb8e0  /nix/store/b0x0qcbf1gsp50jzw52sbbgdp3jlwcjf-stdenv-bootstrap-tools/on-server/bootstrap-tools.tar.xz
f4ae6a814d5053b396af788cd47629385cbfa17df5197ff3c33de62dc1dd9116  /nix/store/b0x0qcbf1gsp50jzw52sbbgdp3jlwcjf-stdenv-bootstrap-tools/on-server/busybox

Suggested commands to upload files to 'tarballs.nixos.org':

    $ nix-store --realize /nix/store/b0x0qcbf1gsp50jzw52sbbgdp3jlwcjf-stdenv-bootstrap-tools
    $ aws s3 cp --recursive --acl public-read /nix/store/b0x0qcbf1gsp50jzw52sbbgdp3jlwcjf-stdenv-bootstrap-tools/on-server/ s3://nixpkgs-tarballs/stdenv/x86_64-unknown-linux-musl/125cefd4cf8f857e5ff1aceaef9230ba578a033d
    $ aws s3 cp --recursive s3://nixpkgs-tarballs/stdenv/x86_64-unknown-linux-musl/125cefd4cf8f857e5ff1aceaef9230ba578a033d ./
    $ sha256sum bootstrap-tools.tar.xz busybox
    $ sha256sum /nix/store/b0x0qcbf1gsp50jzw52sbbgdp3jlwcjf-stdenv-bootstrap-tools/on-server/*
2024-02-02 20:32:44 +00:00
Bernardo Meurer
f228f378e3
Merge pull request #284542 from trofi/i686-linux-bootstrap-update 2024-01-29 21:21:40 -05:00
Sergei Trofimovich
46dae33dd9 pkgs/stdenv/linux: update i686-unknown-linux-gnu bootstrap-files
sha256sum of files to be uploaded:

$ sha256sum /nix/store/5x6dldhza7if5s6wsicaxa8fbndyixps-stdenv-bootstrap-tools/on-server/*
293021dedf7568932230effb3453a3533e9f5c8f48bbe1fb72e383ade5b3f4df  /nix/store/5x6dldhza7if5s6wsicaxa8fbndyixps-stdenv-bootstrap-tools/on-server/bootstrap-tools.tar.xz
d5bffc3231c9f95699ee34118e26bc788e09c608735e5edb2b433057011fddd1  /nix/store/5x6dldhza7if5s6wsicaxa8fbndyixps-stdenv-bootstrap-tools/on-server/busybox

Suggested commands to upload files to 'tarballs.nixos.org':

    $ nix-store --realize /nix/store/5x6dldhza7if5s6wsicaxa8fbndyixps-stdenv-bootstrap-tools
    $ aws s3 cp --recursive --acl public-read /nix/store/5x6dldhza7if5s6wsicaxa8fbndyixps-stdenv-bootstrap-tools/on-server/ s3://nixpkgs-tarballs/stdenv/i686-unknown-linux-gnu/125cefd4cf8f857e5ff1aceaef9230ba578a033d
    $ aws s3 cp --recursive s3://nixpkgs-tarballs/stdenv/i686-unknown-linux-gnu/125cefd4cf8f857e5ff1aceaef9230ba578a033d ./
    $ sha256sum bootstrap-tools.tar.xz busybox
    $ sha256sum /nix/store/5x6dldhza7if5s6wsicaxa8fbndyixps-stdenv-bootstrap-tools/on-server/*
2024-01-28 14:49:11 +00:00
Weijia Wang
4354538139 Merge branch 'staging-next' into staging 2024-01-27 04:17:36 +01:00
Alyssa Ross
ea67e455d3 stdenvBootstrapTools: update aarch64 musl
The aarch64 musl bootstrap tools are woefully outdated.  Just getting
them to the point of being able to build new versions of themselves
required a number of hacks[1] that can be reverted once we have new
bootstrap tools, and before that it stdenv didn't even build for the
preceding three years.

[1]: https://github.com/NixOS/nixpkgs/pull/169764

So, following the script established by previous bootstrap tools
updates:

Files came from this Hydra build:

	https://hydra.nixos.org/build/246470544

…which used nixpkgs revision dd5621df6d
to instantiate:

	/nix/store/g480ass2vjmakaq03z7k2j95xnxh206a-stdenv-bootstrap-tools.drv

…and then built:

	/nix/store/95lm0y33dayag4542s8bi83s31bw68dr-stdenv-bootstrap-tools

I downloaded these files from Hydra and prefetched them into the Nix
store with the following commands:

	STOREPATH=95lm0y33dayag4542s8bi83s31bw68dr-stdenv-bootstrap-tools
	OPTIONS="--option binary-caches https://cache.nixos.org --option trusted-public-keys cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
	nix --extra-experimental-features nix-command store prefetch-file \
	  file://$(nix --extra-experimental-features nix-command store add-file --name bootstrap-tools.tar.xz  $(nix-store ${OPTIONS} -r /nix/store/${STOREPATH})/on-server/bootstrap-tools.tar.xz)
	nix --extra-experimental-features nix-command store prefetch-file --executable \
	  file://$(nix --extra-experimental-features nix-command store add-path --name busybox $(nix-store ${OPTIONS} -r /nix/store/${STOREPATH})/on-server/busybox)

These commands produced the following output:

	warning: you did not specify '--add-root'; the result might be removed by the garbage collector
	Downloaded 'file:///nix/store/fm8ys5bb737j82xgyiciyzpcwmzyi9b2-bootstrap-tools.tar.xz' to '/nix/store/jml0gh0q2rnc9sgr87irz0jfbl0fq545-fm8ys5bb737j82xgyiciyzpcwmzyi9b2-bootstrap-tools.tar.xz' (hash 'sha256-ZY9IMOmx1VOn6uoFDpdJbTnPX59TEkrVCzWNtjQ8/QE=').
	warning: you did not specify '--add-root'; the result might be removed by the garbage collector
	Downloaded 'file:///nix/store/rn9fx55mw2s0qg90zdjxa9xn11nlmjpg-busybox' to '/nix/store/9qylz8gqll63pprwkwlyfs9g4zilak2m-rn9fx55mw2s0qg90zdjxa9xn11nlmjpg-busybox' (hash 'sha256-WuOaun7U5enbOy8SuuCo6G1fbGwsO16jhy/oM8K0lAs=').

I used the hashes from the output above to create the fetchurl
invocation which is part of this commit.

I then started the bootstrap with the following command:

	nix --extra-experimental-features nix-command build -L -f . --arg localSystem '(import ./lib).systems.examples.aarch64-multiplatform-musl' hello

As @lovesegfault requested, here are the the sha256sums of all the
on-server components for extra verification:

	sha256sum /nix/store/${STOREPATH}/on-server/*

…which produced the following output:

	658f4830e9b1d553a7eaea050e97496d39cf5f9f53124ad50b358db6343cfd01  /nix/store/95lm0y33dayag4542s8bi83s31bw68dr-stdenv-bootstrap-tools/on-server/bootstrap-tools.tar.xz
	20cdfecb084ddb6b6b958f2b78fd2cc1d9641632f81ec7d5a48fae0a963ad0fa  /nix/store/95lm0y33dayag4542s8bi83s31bw68dr-stdenv-bootstrap-tools/on-server/busybox
2024-01-25 18:13:54 +01:00
github-actions[bot]
7af142cf2c
Merge staging-next into staging 2024-01-22 00:02:41 +00:00
Francesco Gazzetta
0d7c62f5c9 pkgs/stdenv/linux: update riscv64 bootstrap-files
This PR updates the bootstrap tarballs for riscv64-linux with new Hydra-generated ones.

Fixes #275848 (bootstrap assembler too old to build gcc 13).

I'll be following the script used in #151399, #168199, #183487, and #188334.

Files came from [this](https://hydra.nixos.org/build/246376732#tabs-summary) Hydra build, which used nixpkgs revision 160cedc144 to instantiate:

```
/nix/store/cpiajh4l83b08pynwiwkpxj53d78pcxr-stdenv-bootstrap-tools-riscv64-unknown-linux-gnu.drv
```

and then built:

```
/nix/store/8a92pj40awdw585mcb9dvm4nyb03k3q3-stdenv-bootstrap-tools-riscv64-unknown-linux-gnu
```

I downloaded these files from Hydra and prefetched them into the nix store with the following commands:

```
STOREPATH=8a92pj40awdw585mcb9dvm4nyb03k3q3-stdenv-bootstrap-tools-riscv64-unknown-linux-gnu
OPTIONS="--option binary-caches https://cache.nixos.org --option trusted-public-keys cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
nix store prefetch-file \
  file://$(nix store add-file --name bootstrap-tools.tar.xz  $(nix-store ${OPTIONS} -r /nix/store/${STOREPATH})/on-server/bootstrap-tools.tar.xz)
nix store prefetch-file --executable \
  file://$(nix store add-path --name busybox $(nix-store ${OPTIONS} -r /nix/store/${STOREPATH})/on-server/busybox)
```

These commands produced the following output:

```
Downloaded 'file:///nix/store/xs74wcxq3qc12plfc70fds8inbndhcfm-bootstrap-tools.tar.xz' to '/nix/store/3fal4gikp92013kac6rdmfbrch2s859b-xs74wcxq3qc12plfc70fds8inbndhcfm-bootstrap-tools.tar.xz' (hash 'sha256-0LxRd7fdafQezNJ+N2tuOfm0KEwgfRSts5fhP0e0r0s=').
Downloaded 'file:///nix/store/9ndpna6jrlac4y9fappdjm0sxx0g2bja-busybox' to '/nix/store/kb7wyy30y1gxcmdajljr26kxxac606qa-9ndpna6jrlac4y9fappdjm0sxx0g2bja-busybox' (hash 'sha256-OGO96QUzs2n5pGipn/V87AxzUY9OWKZl417nE8HdZIE=').
```

I used the hashes from the output above to create the `fetchurl` invocation which is part of this commit.

I then started the bootstrap with the following command:

```
nix build -L -f . --arg localSystem '(import ./lib).systems.examples.riscv64' hello
```

As @lovesegfault requested, here are the the `sha256sum`s of all the `on-server` components for extra verification:

```
sha256sum /nix/store/${STOREPATH}/on-server/*
```

which produced the following output:

```
d0bc5177b7dd69f41eccd27e376b6e39f9b4284c207d14adb397e13f47b4af4b  /nix/store/8a92pj40awdw585mcb9dvm4nyb03k3q3-stdenv-bootstrap-tools-riscv64-unknown-linux-gnu/on-server/bootstrap-tools.tar.xz
65f9433abb598f63c932d33351b14f686551512b1cece1e64c2d0e76aa0ec52e  /nix/store/8a92pj40awdw585mcb9dvm4nyb03k3q3-stdenv-bootstrap-tools-riscv64-unknown-linux-gnu/on-server/busybox
```
2024-01-20 16:27:22 +01:00
Robert Scott
40868719b0 cc-wrapper: add zerocallusedregs hardening flag
this uses the value `used-gpr` which seems to be a commonly
chosen value for general use
2024-01-20 13:48:33 +00:00
Sergei Trofimovich
3f3e74bc93 stdenv: fix eval of pkgsMusl packages with platform constraints
Before the change `pkgsMusl.adobe-reader` was failing the interpreter:

    $ nix-instantiate --eval --strict --expr 'with import ./. {}; builtins.tryEval pkgsMusl.adobe-reader'
error:
       error: evaluation aborted with the following error message: 'unsupported platform for the pure Linux stdenv'

After the change `pkgsMusl.adobe-reader` returns catchable excation:

    $ nix-instantiate --eval --strict --expr 'with import ./. {}; builtins.tryEval pkgsMusl.adobe-reader'
    { success = false; value = false; }

Noticed when was exploring `nixpkgs` for uncatchable evaluation errors.
Ideally those should only happen when there is a code bug in the use
site. In this case it's just a package with incompatible constraints for
`musl`.

Changed uncatchable `abort` to `throw`.
2023-12-28 15:29:29 +00:00
Artturin
1b3831f1e6 stdenv: fix typo 2023-10-21 00:26:57 +03:00
Artturin
1270ef59e9 bootstrap-tools-cross: Rename bootstrap file jobs to be more descriptive
Rename files in `bootstrap-files/` to match jobs in `make-bootstrap-tools-cross`.

Should make automating the bootstrap files easier.

```nix
$ nix repl --file ./pkgs/top-level/release-cross.nix
nix-repl> bootstrapTools
{ aarch64-unknown-linux-gnu = { ... }; aarch64-unknown-linux-musl = { ... }; armv5tel-unknown-linux-gnueabi = { ... }; armv6l-unknown-linux-gnueabihf = { ... }; armv6l-unknown-linux-musleabihf = { ... }; armv7l-unknown-linux-gnueabihf = { ... }; mips64el-unknown-linux-gnuabi64 = {... }; mips64el-unknown-linux-gnuabin32 = { ... }; mipsel-unknown-linux-gnu = { ... }; powerpc64le-unknown-linux-gnu = { ... }; riscv64-unknown-linux-gnu = { ... }; x86_64-unknown-linux-musl = { ... }; }
```

Additionally if non-linux bootstrap files are added to
`make-bootstrap-tools-cross` then there won't be any renaming needed.
2023-10-03 23:34:40 +03:00
Artturi
ece37b8aa4
Merge pull request #258476 from Artturin/bootstrapthingies2 2023-10-02 09:10:31 +03:00
Artturin
0848edf7a0 bootstrap-tools-cross: Add a note about what should be here 2023-10-02 01:30:11 +03:00
Artturin
46ecf91843 stdenv: remove unused loongson2f bootstrap files
The last use of it was removed in (linux/default.nix: use mipsel.nix instead of longson.nix for mips32)[e8b10284f3].
2023-10-02 00:35:57 +03:00