Commit graph

630 commits

Author SHA1 Message Date
Sergei Trofimovich 7f92320f66 make-bootstrap-tools.nix: drop libelf.so from tootstrap tarballs
gcc stopped using libelf in commit 48215350c24 ("re PR lto/46273 (Failed
to bootstrap)") around 2010, before gcc-4.6.0.

Bootstrap tools don't use it either.
2022-08-18 08:23:08 +01:00
Bernardo Meurer d00f5c5eaa
Merge pull request #183487 from amjoseph-nixpkgs/pr/mipsel/bootstrap-files
stdenv/linux/bootstrap-files: add mipsel-linux (mips32)
2022-08-17 15:14:47 -07:00
Adam Joseph 6122297eab pkgs/stdenv/linux: update powerpc64le bootstrap-files
This PR updates the Hydra-generated bootstrap tarballs for
powerpc64le-linux.  The bootstrap-files referenced prior to this
commit will only bootstrap in a nixpkgs which has
https://github.com/NixOS/nixpkgs/pull/181802.  That PR was closed in
favor of https://github.com/NixOS/nixpkgs/pull/181943, which is a
cleaner solution but which requires regenerating the bootstrap-files.

I'll be following the script established in
https://github.com/NixOS/nixpkgs/pull/151399, which I previously used
in https://github.com/NixOS/nixpkgs/pull/168199.

Files came from [this](https://hydra.nixos.org/build/186237511) Hydra build, which used nixpkgs revision ac43c44478 to instantiate:

```
/nix/store/nhjbza9vlcyhp9zxfz6lwpc3m2ghrpzj-stdenv-bootstrap-tools-powerpc64le-unknown-linux-gnu.drv
```

and then built:

```
/nix/store/fklpm7fy6cp5wz55w0gd8wakyqvzapjx-stdenv-bootstrap-tools-powerpc64le-unknown-linux-gnu
```

I downloaded these files from Hydra with the following commands:

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

I then prefetched them into `/nix/store` with:

```
$ nix store prefetch-file --executable file:///nix/store/p9lz8r81zp3a4sl2qq2v4j69syjzryn2-busybox
Downloaded 'file:///nix/store/p9lz8r81zp3a4sl2qq2v4j69syjzryn2-busybox' to '/nix/store/a42qf2kf5hychcsw5sz0pvghy9vli1im-p9lz8r81zp3a4sl2qq2v4j69syjzryn2-busybox' (hash 'sha256-jtPEAsht4AUAG4MLK8xocQSfveUR4ppU1lS4bGI1VN4=').

$ nix store prefetch-file file:///nix/store/y4530zpk7ia4szf5cdi4zpyy5lpjv3iv-bootstrap-tools.tar.xz
Downloaded 'file:///nix/store/y4530zpk7ia4szf5cdi4zpyy5lpjv3iv-bootstrap-tools.tar.xz' to '/nix/store/kgzyq9q08nll28ccqjcbv8angq5hyvdp-y4530zpk7ia4szf5cdi4zpyy5lpjv3iv-bootstrap-tools.tar.xz' (hash 'sha256-MpIDnpZUK3M17qlnuoxfnK0EgxRosm3TMW1WfPZ1+jU=').
```

And started the bootstrap with the following command:

```
nix build -f . -L hello
```

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

```
$ sha256sum /nix/store/fklpm7fy6cp5wz55w0gd8wakyqvzapjx-stdenv-bootstrap-tools-powerpc64le-unknown-linux-gnu/on-server/*
3292039e96542b7335eea967ba8c5f9cad04831468b26dd3316d567cf675fa35  /nix/store/fklpm7fy6cp5wz55w0gd8wakyqvzapjx-stdenv-bootstrap-tools-powerpc64le-unknown-linux-gnu/on-server/bootstrap-tools.tar.xz
3d078dff7b4087d82442937667c91dace3321493aae4d3a4160d046b7eabcc2c  /nix/store/fklpm7fy6cp5wz55w0gd8wakyqvzapjx-stdenv-bootstrap-tools-powerpc64le-unknown-linux-gnu/on-server/busybox
```
2022-08-04 23:05:31 -07:00
Robert Hensing 12a060dbbc
Merge pull request #183967 from Ericson2314/small-stdenv-cleanup
stdenv: Two small cleanups
2022-08-01 14:37:42 +02:00
John Ericson 9d59a4df78 stdenv/common-path.nix: move to stdenv/generic/
Do this since it is part of the generic stdenv/`mkDerivation`
infrastructure, rather than being a bootstrapping strategy.
2022-07-29 18:24:00 -04:00
Sergei Trofimovich f6ee60dde4 gnumake: unconditionally disable guileSupport on bootstrap
Before the change an attempt to use `gnumake.override { guileSupport = true; }`
caused recursion in bootstrap stages as guileSupport pulls in guile and it's
dependencies.

To restore the bootstrap the change unconditionally sets
`guileSupport = false;` for `gnumake`.

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2022-07-29 19:34:09 +01:00
Adam Joseph efb35dff8a stdenv/linux/bootstrap-files: add mipsel-linux (mips32) 2022-07-28 14:23:11 -07:00
github-actions[bot] 9ed58a6fb6
Merge master into staging-next 2022-07-27 12:01:18 +00:00
Vladimír Čunát a0e2bdeb84
Merge #179628: make-bootstrap-tools-cross: add mips32el 2022-07-27 13:12:10 +02:00
Artturi 111abd87ca
Merge pull request #168590 from amjoseph-nixpkgs/stdenv-disallowedReferences
stdenv: use disallowedRequisites to check forbidden requisites
2022-07-18 02:51:23 +03:00
github-actions[bot] 8df1eb061a
Merge master into staging-next 2022-07-17 00:02:14 +00:00
Bernardo Meurer 5fed5fe917
Merge pull request #180223 from amjoseph-nixpkgs/pr/mips64el/bootstrap-file-hashes
pkgs/stdenv/linux: add mips64el bootstrap-files
2022-07-16 16:41:08 -07:00
Adam Joseph 73811b372e pkgs/stdenv/linux: add mips64el bootstrap-files
This PR adds Hydra-generated bootstrap tarballs for mips64el-linux.  I'll be following the script established in https://github.com/NixOS/nixpkgs/pull/151399, which I previously used in https://github.com/NixOS/nixpkgs/pull/168199.

Files came from [this](https://hydra.nixos.org/build/182757245) Hydra build, which used nixpkgs revision ef3fe254f3 to instantiate:

```
/nix/store/a2bvv663wjnyhq8m7v84aspsd3sgf9h6-stdenv-bootstrap-tools-mips64el-unknown-linux-gnuabi64.drv
```

and then built:

```
/nix/store/aw3dmsrh22831l83vi3q9apg9qi3x8ms-stdenv-bootstrap-tools-mips64el-unknown-linux-gnuabi64
```

I downloaded these files from Hydra with the following commands:

```
STOREPATH=aw3dmsrh22831l83vi3q9apg9qi3x8ms-stdenv-bootstrap-tools-mips64el-unknown-linux-gnuabi64
OPTIONS="--option binary-caches https://cache.nixos.org"
nix store add-file \
  --name bootstrap-tools.tar.xz  \
  $(nix-store ${OPTIONS} -r /nix/store/${STOREPATH})/on-server/bootstrap-tools.tar.xz
nix store add-path \
  --name busybox \
  $(nix-store ${OPTIONS} -r /nix/store/${STOREPATH})/on-server/busybox
```

I then prefetched them into `/nix/store` with:

```
$ nix store prefetch-file --executable file:///nix/store/aw3dmsrh22831l83vi3q9apg9qi3x8ms-stdenv-bootstrap-tools-mips64el-unknown-linux-gnuabi64/on-server/busybox
Downloaded 'file:///nix/store/aw3dmsrh22831l83vi3q9apg9qi3x8ms-stdenv-bootstrap-tools-mips64el-unknown-linux-gnuabi64/on-server/busybox' to '/nix/store/ai30ss23914syz6j8m95arkwffbbx44k-busybox' (hash 'sha256-sTE58ofjqAqX3Xtq1g9wDxzIe6Vo//GHbicfqJoivDI=').

$ nix store prefetch-file  file:///nix/store/aw3dmsrh22831l83vi3q9apg9qi3x8ms-stdenv-bootstrap-tools-mips64el-unknown-linux-gnuabi64/on-server/bootstrap-tools.tar.xz
Downloaded 'file:///nix/store/aw3dmsrh22831l83vi3q9apg9qi3x8ms-stdenv-bootstrap-tools-mips64el-unknown-linux-gnuabi64/on-server/bootstrap-tools.tar.xz' to '/nix/store/nr6zjrbwbxcxs6brf042zsyqllwbwj9v-bootstrap-tools.tar.xz' (hash 'sha256-tTgjeXpd2YgnfP4JvRuO0bXd2j8GqzBcd57JI3wH9x0=').
```

And started the bootstrap with the following command (the `--arg localSystem` is needed because #161159 has not merged):

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

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

```
$ sha256sum /nix/store/aw3dmsrh22831l83vi3q9apg9qi3x8ms-stdenv-bootstrap-tools-mips64el-unknown-linux-gnuabi64/on-server/*
b53823797a5dd988277cfe09bd1b8ed1b5ddda3f06ab305c779ec9237c07f71d  /nix/store/aw3dmsrh22831l83vi3q9apg9qi3x8ms-stdenv-bootstrap-tools-mips64el-unknown-linux-gnuabi64/on-server/bootstrap-tools.tar.xz
598e05abb69b2c1a0db46585cd2131212077c0937ce2a665daf3811f059ae767  /nix/store/aw3dmsrh22831l83vi3q9apg9qi3x8ms-stdenv-bootstrap-tools-mips64el-unknown-linux-gnuabi64/on-server/busybox
```
2022-07-05 12:16:58 -07:00
Adam Joseph dc5bdd6852 Revert "stdenv: label the ephemeral coreutils-stage4 package"
This reverts commit 23ea8b35da.
2022-07-02 16:56:08 -07:00
Rick van Schijndel 2fcdf54568
Merge pull request #169378 from amjoseph-nixpkgs/stdenv-makeStaticLibraries-do-what-comment-says
stdenv: make stage3.{gmp,mpfr,mpc,isl} do what the comment says
2022-06-30 07:44:05 +02:00
Adam Joseph ea32f3e523 make-bootstrap-tools-cross: enable Hydra builds of mips32el bootstrap-files
This one-line commit will cause Hydra to build a bootstrap-files
tarball for 32-bit little-endian MIPS.
2022-06-29 14:48:13 -07:00
Vladimír Čunát 5ffd19ddbf
Merge #175785: libidn2: hack to avoid referencing bootstrap tools
...into staging
2022-06-17 18:23:25 +02:00
Martin Weinelt 6451e9d4a5 Merge remote-tracking branch 'origin/staging-next' into staging 2022-06-08 22:22:26 +02:00
Alyssa Ross 5dfe7f928e
release-cross.nix: fix cross bootstrap tools eval
In 5643714dea, I changed pkgs/stdenv/linux/make-bootstrap-tools.nix
to take a package set instead of system and localSystem arguments, but
I forgot to update make-bootstrap-tools-cross.nix.

Fixes: 5643714dea ("stdenvBootstrapTools: inherit {cross,local}System")
2022-06-08 17:17:10 +00:00
Adam Joseph 02630180fa stdenv: add -stageX markers to gmp, mpfr, libmpc, and isl 2022-06-05 00:35:06 -07:00
Adam Joseph a9e0d86411 Update pkgs/stdenv/linux/default.nix
Co-authored-by: sternenseemann <sternenseemann@systemli.org>
2022-06-05 00:35:06 -07:00
Adam Joseph 23ea8b35da stdenv: label the ephemeral coreutils-stage4 package
During stdenv bootstrapping, coreutils is built twice.  This makes
troubleshooting very difficult, because both packages have
name="coreutils", so it is a hassle to figure out "which coreutils am
I using / is not building"?

The first of these builds is used only in stage4, and is not part of
the final stdenv.  Let's label that one with a different `name`
attribute to make it obvious which is which.
2022-06-05 00:35:06 -07:00
Adam Joseph 122b6930b0 stdenv: cause makeStaticLibraries usage to agree with usage spec
The usage of `makeStaticLibraries` in stdenv/linux/default.nix is
prefaced by this comment:

  # Link GCC statically against GMP etc.  This makes sense because
  # these builds of the libraries are only used by GCC, so it
  # reduces the size of the stdenv closure.

However "these builds of the libraries are only used by GCC" is not
actually true.  As currently written, the stage4 coreutils links
against these customized, static-ified libraries.

Beside the fact that the code doesn't actually do what it says, this
causes other problems as well.  One example is #168983, which arises
because have a dynamically-linked binary (coreutils) which is built
from statically-linked libraries (libgmp.a); doing this causes mayhem
on platforms where `-fstack-protector` needs an auxiliary
`libssp.{so,a}` library; we end up with link failures because some
parts of the resulting binary want `libssp.so` and other parts want
`libssp_nonshared.a`.

Let's make the code actually do what the comment says, by moving these
definitions into the `gcc-unwrapped` override.  This will cause the
stage4-coreutils to link against libgmp dynamically, rather than
statically.  For this reason this commit depends on the previous
commit, which allows that to be done without creating a forbidden
reference from stdenv-final to the bootstrap-files.
2022-06-05 00:35:06 -07:00
Adam Joseph 7fd749009f stdenv: force gmp to rebuild in stage4 of the bootstrap
As explained in the comment, this ensures that stage4-coreutils does
not leak a reference to the bootstrap-files by way of libgmp.  This
will allow the next patch in this series to build stage4-coreutils
using a dynamically-linked (rather than statically-linked) libgmp.
2022-06-05 00:35:00 -07:00
Vladimír Čunát 088b29159d
libidn2: hack to avoid referencing bootstrap tools
Due to bootstrap tools getting purged from closure of libidn2.dev,
a very large rebuild is caused.
2022-06-05 08:59:20 +02:00
github-actions[bot] e8d5ce419a
Merge staging-next into staging 2022-05-31 18:01:50 +00:00
github-actions[bot] d6ede66f6a
Merge master into staging-next 2022-05-31 18:01:11 +00:00
Alyssa Ross 5643714dea stdenvBootstrapTools: inherit {cross,local}System
It's expected that attributes in the top-level package set will all use
that package set, but this wasn't the case for the bootstrap tools.
This led some very confusing behaviour:

- pkgsMusl.stdenvBootstrapTools would build glibc bootstrap tools
- stdenvBootstrapTools was _always_ cross compiled, even if
  Nixpkgs wasn't, because it always set crossSystem.  This also didn't
  match the behaviour of using make-bootstrap-tools.nix as an
  entrypoint, where crossSystem would default to null.

For the Linux stdenv, I've made the ideal fix, which is to make pkgs an
argument rather than taking the arguments for pkgs, and then
re-importing it.  This means it'll always use exactly the same package
set that's calling it, and should also mean faster eval due to not
importing Nixpkgs twice.

The Darwin stdenv is more complicated, and I'm not able to easily test
it, so I wasn't confident in making the same fix there.  Instead, I've
just made sure crossSystem and localSystem are set to the correct values
so they're not always cross compiled and match the parent package set's.
It would still be preferable if somebody could make Darwin's
make-bootstrap-tools.nix take pkgs as an argument, rather than all the
arguments for pkgs.
2022-05-31 14:32:27 +00:00
Rick van Schijndel f174277eed
Merge pull request #168413 from a-m-joseph/libtool-purity-fix-put-file-in-bootstrap
fixLibtool(): replace /usr/bin/file in ./configure, add file to common-path.nix
2022-05-28 17:53:43 +02:00
github-actions[bot] ff43d848bf
Merge staging-next into staging 2022-05-27 18:01:52 +00:00
Artturi 60a0871486
Merge pull request #172391 from Artturin/deprecate-stdenv-glibc 2022-05-27 17:56:19 +03:00
Alyssa Ross 089ff89f49
lib.systems: drop scaleway-c1
These servers apparently no longer exist, since September 2, 2021[1].
If somebody needs this for non-Scaleway machines, they should suggest
its reintroduction with a different name.

[1]: https://news.ycombinator.com/item?id=27192757
2022-05-27 12:02:39 +00:00
Adam Joseph 97c43828fb fixLibtool(): patch ./configure, add file to common-path.nix
libtool's libtool.m4 script assumes that `file` is available, and can
be found at `/usr/bin/file` (this path is hardwired).  Furthermore,
the script with this assumption is vendored into the ./configure
scripts of an enormous number of packages.  Without this commit, you
will frequently see errors like this during the configurePhase with
the sandbox enabled:

  ./configure: line 9595: /usr/bin/file: command not found

Due mostly to luck, this error does not affect native compiles on
nixpkgs' two most popular platforms, x86_64-linux and aarch64-linux.
However it will cause incorrect linker flag detection and a failure to
generate shared libraries for sandboxed cross-builds to a x86_64-linux
host as well as any sandboxed build (cross or native) for the following
hosts: x86_64-freebsd, *-hpux, *-irix, mips64*-linux, powerpc*-linux,
s390x-linux, s390x-tpf, sparc-linux, and *-solaris.

This commit fixes the problem by adding an extra line to fixLibtool()
in pkgs/stdenv/generic/setup.sh.  This extra line will scan the
unpacked source code for executable files named "configure" which
contain the following text:

'GNU Libtool is free software; you can redistribute it and/or modify'

This text is taken to be an indicator of a vendored libtool.m4.  When
it is found, the configure script containing it is subjected to `sed
-i s_/usr/bin/file_file_` which replaces all occurrences of
`/usr/bin/file` with `file`.

Additionally, the `file` package is now considered to be part of
`stdenv`.  It has been added to `common-path.nix` so that the `file`
binary will be found in the `$PATH` of every build, except for the
bootstrap-tools and the first few stages of stdenv boostrapping.

Verified no regressions under:

  nix-build --arg pkgs 'import ./. {}' ./lib/tests/release.nix

This commit allows the following commands to complete, which should
enable Hydra to produce bootstrap-files for mips64el:

  nix-build \
    --option sandbox true \
    --option sandbox-fallback false \
    pkgs/top-level/release-cross.nix \
    -A bootstrapTools.mips64el-linux-gnuabi64.build

  nix-build \
    --option sandbox true \
    --option sandbox-fallback false \
    . \
    -A pkgsCross.mips64el-linux-gnuabi64.nix_2_4
2022-05-26 13:53:36 -07:00
Artturin 1d44ac176c treewide: add enableParallelBuilding's to bootstrap packages so hashes stay the same
when enableParallelBuildingByDefault is enabled

verified with
`nix-diff $(nix eval ".#gcc-unwrapped.drvPath") $(nix eval --expr 'with import ./. { config = { enableParallelBuildingByDefault = true; }; }; gcc-unwrapped.drvPath' --impure)`
2022-05-25 16:03:14 +03:00
Artturin a05b581783 stdenv: warn about use of stdenv.glibc
TODO was added in
119920faa6
2022-05-25 15:51:20 +03:00
github-actions[bot] 574f2d4696
Merge staging-next into staging 2022-05-24 00:02:57 +00:00
sternenseemann acb063701a lib.systems.elaborate: expose canExecute predicate over isCompatible
canExecute is like isCompatible, but also checks that the Kernels are
_equal_, i.e. that both platforms use the same syscall interface. This
is crucial in order to actually be able to execute binaries for the
other platform.

isCompatible is dropped, since it has changed semantically and there's
no use case left in nixpkgs.
2022-05-23 21:25:04 +02:00
Artturin f002ffed9a treewide: enable strictDeps in bootstrap packages 2022-05-22 16:40:26 +03:00
Artturin 33415135b0 config.contentAddressedByDefault: init option 2022-04-27 23:21:32 +03:00
github-actions[bot] deb60260a7
Merge master into staging-next 2022-04-17 06:01:07 +00:00
Adam Joseph 9d60e3dd29 stdenv: use disallowedRequisites to check forbidden requisites 2022-04-13 23:13:33 -07:00
Adam Joseph 9d46a1025a pkgs/stdenv/linux: add powerpc64le bootstrap-files
This PR adds Hydra-generated bootstrap tarballs for powerpc64le-linux.
I'll be following the script established in PR to tarballs.nixos.org.

Files came from this Hydra build:

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

Which used nixpkgs revision 49a83445c2
to instantiate:

  /nix/store/gj272sd56gsj6qpyzh4njpfzwdhviliz-stdenv-bootstrap-tools-powerpc64le-unknown-linux-gnu.drv

and then built:

  /nix/store/n81pljbd8m0xgypm84krc2bnvqgjrfxx-stdenv-bootstrap-tools-powerpc64le-unknown-linux-gnu

I downloaded these files from Hydra with the following commands:

```
STOREPATH=n81pljbd8m0xgypm84krc2bnvqgjrfxx-stdenv-bootstrap-tools-powerpc64le-unknown-linux-gnu
OPTIONS="--option binary-caches https://cache.nixos.org"
nix store add-file \
  --name bootstrap-tools.tar.xz  \
  $(nix-store ${OPTIONS} -r /nix/store/${STOREPATH})/on-server/bootstrap-tools.tar.xz
nix store add-path \
  --name busybox \
  $(nix-store ${OPTIONS} -r /nix/store/${STOREPATH})/on-server/busybox
```

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

```
$ sha256sum /nix/store/n81pljbd8m0xgypm84krc2bnvqgjrfxx-stdenv-bootstrap-tools-powerpc64le-unknown-linux-gnu/on-server/*
036d062869f7accf0ad89714d12029469dfe6af504f9b226d61eb7d808ad4735  /nix/store/n81pljbd8m0xgypm84krc2bnvqgjrfxx-stdenv-bootstrap-tools-powerpc64le-unknown-linux-gnu/on-server/bootstrap-tools.tar.xz
6bc05832180f5075f4458c32eb0a5e2b673f605884dce01822be474f4e0a63ee  /nix/store/n81pljbd8m0xgypm84krc2bnvqgjrfxx-stdenv-bootstrap-tools-powerpc64le-unknown-linux-gnu/on-server/busybox
```

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
2022-04-11 18:35:44 -07:00
Martin Weinelt bf1914e12a Merge remote-tracking branch 'origin/staging-next' into staging 2022-04-05 04:05:02 +02:00
Vladimír Čunát 6fd0d1bb4b
stdenv bootstrap tools: adjust with glibc-2.34 (2nd try)
This time without rebuilding stdenvs.
2022-04-04 20:40:42 +02:00
Vladimír Čunát e66ed266f8
Revert "stdenv bootstrap tools: adjust with glibc-2.34"
This reverts commit c1ef87e8d0.
I didn't realize that it would rebuild all linux stdenvs;
I certainly don't want to incur such a rebuild at this point.
2022-04-04 20:40:41 +02:00
Vladimír Čunát c1ef87e8d0
stdenv bootstrap tools: adjust with glibc-2.34
https://hydra.nixos.org/build/171494041
2022-04-04 19:54:28 +02:00
Bernardo Meurer 8e5d2ead61
binutils: rename gold to enableGold 2022-03-28 18:50:11 -07:00
Bernardo Meurer 7bac80fef8
stdenv: fix binutils' bootstrap
Co-authored-by: TredwellGit <tredwell@tutanota.com>
2022-03-28 18:50:04 -07:00
Adam Joseph 13e63f67dd make-bootstrap-tools-cross: fix typo which prevents hydra eval
When implementing this reviewer request:

  https://github.com/NixOS/nixpkgs/pull/161158#discussion_r822256070

to move mips64el-unknown-linux-* from platforms.nix to examples.nix, I
neglected to update the reference in make-bootstrap-tools-cross.nix.
As a result, the hydra jobs to generate a bootstrap tarball for
mips64el are not running:

  https://hydra.nixos.org/eval/1750828?filter=mips&compare=1750620&full=#tabs-errors

This commit fixes the problem, so the hydra job can run.  Once it
does, I will submit a PR adding the trusted bootstrap tarball hash to
pkgs/stdenv/linux/bootstrap-files/.

Co-authored-by: sterni <sternenseemann@systemli.org>
2022-03-26 12:03:00 +01:00
Adam Joseph 12371a51e6 lib/systems: add mips64el definitions
MIPS has a large space of {architecture,abi,endianness}; this commit
adds all of them to lib/systems/platforms.nix so we can be done with
it.

Currently lib/systems/inspect.nix has a single "isMips" predicate,
which is a bit ambiguous now that we will have both mips32 and mips64
support, with the latter having two ABIs.  Let's add four new
predicates (isMips32, isMips64, isMips64n32, and isMips64n64) and
treat the now-ambiguous isMips as deprecated in favor of the
more-specific predicates.  These predicates are used mainly for
enabling/disabling target-specific workarounds, and it is extremely
rare that a platform-specific workaround is needed, and both mips32
and mips64 need exactly the same workaround.

The separate predicates (isMips64n32 and isMips64n64) for ABI
distinctions are, unfortunately, useful.  Boost's user-scheduled
threading (used by nix) does does not currently supports mips64n32,
which is a very desirable ABI on routers since they rarely have
more than 2**32 bytes of DRAM.
2022-03-10 20:30:16 -08:00
Vladimír Čunát 0b7de2ab41
Merge #151399: stdenv: update aarch64 bootstrap-files
...into staging
2022-01-04 20:08:39 +01:00
David Guibert 8e7acfc587 aarch64: update bootstrap-files
fixes #112086

Fetch bootstrap files built by Hydra and re-add them as FODs to skip
currently dangling URLs. They are already available on
https://cache.nixos.org

https://hydra.nixos.org/job/nixpkgs/trunk/stdenvBootstrapTools.aarch64-linux.dist ->
https://hydra.nixos.org/build/160330465#tabs-buildinputs

These commands have been run to get the output hashes as FODs:

nix store add-file --name bootstrap-tools.tar.xz  $(nix-store -r /nix/store/9y4qnwflnxkjrqnfbzhsjv6zq2r0m48z-stdenv-bootstrap-tools --option binary-caches https://cache.nixos.org)/on-server/bootstrap-tools.tar.xz
nix store add-path --name busybox                 $(nix-store -r /nix/store/9y4qnwflnxkjrqnfbzhsjv6zq2r0m48z-stdenv-bootstrap-tools --option binary-caches https://cache.nixos.org)/on-server/busybox
2021-12-20 10:53:19 +01:00
oxalica a5851f18c5
stdenv: add bootstrap files for riscv64
Bootstrap files are from
https://hydra.nixos.org/build/159891432
and
https://hydra.nixos.org/build/159891436
2021-11-30 05:03:30 +08:00
oxalica 8cf96b9426
stdenv: patch autoconf script for riscv in stage 2 2021-11-26 00:32:33 +08:00
oxalica fc3ea54fb3
make-bootstrap-tools: produce libatomic on riscv platform 2021-11-26 00:32:33 +08:00
sternenseemann 11fe2fc3cf stdenv: move --enable-deterministic-archives flag into GNU wrapper
`--enable-deterministic-archives` is a GNU specific strip flag and
causes other strip implementations (for example LLVM's, see #138013)
to fail. Since strip failures are ignored, this means that stripping
doesn't work at all in certain situation (causing unnecessary
dependencies etc.).

To fix this, no longer pass `--enable-deterministic-archives`
unconditionally, but instead add it in a GNU binutils specific strip
wrapper only.

`commonStripFlags` was only used for this flag, so we can remove
it altogether.

Future work could be to make a generic strip wrapper, with support for
nix-support/strip-flags-{before,after} and NIX_STRIP_FLAGS_{BEFORE,AFTER}.
This possibly overkill and unnecessary though -- also with the
additional challenge of incorporating the darwin strip wrapper somehow.
2021-09-18 15:11:17 +02:00
Vladimír Čunát 2a44031d56
stdenv/make-bootstrap-tools: nuke yet another header
This is needed after glibc bump from PR #111616.
2021-07-16 16:15:32 +02:00
Vladimír Čunát 5a71fa8447
stdenv bootstrap: hack around glibc version mismatch
With this we shouldn't need other workarounds for the LTO problems.
2021-07-06 16:02:11 +02:00
John Ericson 77e97ac4ca glibc: Use pname and version 2021-05-10 20:56:33 +00:00
github-actions[bot] 9cf0393c37
Merge staging-next into staging 2021-04-28 18:14:28 +00:00
regnat 4105c06bf3 Also make the bootstrap tools generation CA
(And fix an ofborg eval error btw)
2021-04-28 12:46:43 +02:00
regnat 14f66d60a7 Make the bootsrap respect the contentAddressedByDefault setting
Patch every `derivation` call in the bootsrap process to add it a
conditional `__contentAddressed` parameter.

That way, passing `contentAddressedByDefault` means that the entire
build closure of a system can be content addressed
2021-04-28 10:25:49 +02:00
Arnout Engelen 48c952c039
Merge pull request #112928 from baloo/baloo/gcc/reproducible
stdenv: provide a deterministically built gcc
2021-04-26 11:07:34 +02:00
Ryan Burns 68823d6d65 stdenv/bootstrap-tools: remove powerpc64 special case
Now that powerpc64 is always ELFv2, we can unconditionally use musl
tools here.
2021-03-15 19:27:41 -07:00
Arthur Gautier a961aeadae stdenv: provide a deterministically built gcc
Signed-off-by: Arthur Gautier <baloo@superbaloo.net>
2021-03-01 05:06:39 +00:00
John Ericson 5fc5e83808
Merge pull request #111345 from r-burns/ppc64-big-endian
Enable PPC64 (big-endian)
2021-01-30 16:26:06 -05:00
Ryan Burns 76fc6d2870 bootstrap-tools-cross: add powerpc64-linux
Also check for powerpc64-linux-elfv1, which does not support musl.
2021-01-30 12:34:30 -08:00
Vladimír Čunát a648a07c19
Merge #104742: linux bootstrap tools: fix tests on ppc64 2021-01-26 08:09:59 +01:00
Ben Siraphob aa8868c7cc pkgs/build-support: stdenv.lib -> lib 2021-01-24 19:07:54 -08:00
John Ericson fa204a97d8 stdenv: Remove stdenv.platform
This was not working after #110544 as caught by @r-burns in
https://github.com/NixOS/nixpkgs/pull/110544#issuecomment-766444647.
Thankfully it isn't used anymore and I believe wasn't documented either.
(I at least did not remember it existed.)
2021-01-24 22:51:12 +00:00
Frederik Rietdijk 1649296354 makeBootstrapTools: set schedulingPriority
Increase schedulingPriority of the bootstrap tools to unblock the
nixpkgs-unstable channel.

The channel is repeatedly blocked by the makeBootstrapTools job for
aarch64. The cause is lack of resources.

By increasing the priority, it should become the first job Hydra would
build, allowing the channel to advance quicker. Of course, it does mean
that while the channel advances, nothing else has been built.

This should be a temporary solution until we have more capacity for
aarch64.
2020-12-02 20:32:38 +01:00
Ryan Burns 9682c1d0da linux bootstrap tools: fix tests on ppc64
The dynamic loader on powerpc64 is called ld64.so.2 rather than
ld-linux.so.*, and was not matched by the existing pattern.

We reuse the dynamicLinker name from binutils to match a wider set
of platforms and to avoid specifying this information in two places.
2020-11-24 18:32:12 -08:00
Arnout Engelen 05e0aa3040
gcc: update to isl 0.20.0 for bootstrapping and recent versions (#103311) 2020-11-17 21:20:48 +00:00
Michael Reilly 84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
Matthew Bauer e45f16b9f5 stdenv/linux: remove powerpc64le bootstrap tools
These files never existed, so best to not leave the reference. If
someone want to step up to maintain this, that would be fine. I don’t
have the hardware to test these out. In addition, someone tried to use
the bootstrap-tools currently built by Hydra and found that they were
broken in some unclear way.
2020-03-31 15:03:26 -04:00
Graham Christensen 6b361c3a31
armv{5tel,6l,7l}: bootstrap-files: quote URLs for rfc-45
Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com>
2020-03-16 19:04:39 -04:00
Graham Christensen 11b54adeac
armv{5tel,6l,7l}: update bootstrap tools after #80497 2020-03-16 18:11:59 -04:00
Frederik Rietdijk 0eb0ddc4db Merge staging-next into master 2020-03-08 08:11:01 +01:00
Ben Wolsieffer 05fc2a3524 unpack-bootstrap-tools: remove obsolete linker script patching
The linker scripts no longer contain store paths, so this does nothing. More
importantly, libpthread.so is not longer a linker script on ARM, so the patching
would corrupt it.
2020-03-06 06:58:20 +01:00
Ben Wolsieffer ee39e49b68 stdenv: update ARM bootstrap tarballs
Fixes building glibc 2.30, which requires at least GCC 6.

Picked from the following cross-trunk evaluation:
https://hydra.nixos.org/eval/1568864 based on nixpkgs
commit ac241fb7a5.

armv5tel job: https://hydra.nixos.org/build/111556418
armv6l job: https://hydra.nixos.org/build/111556521
armv7l job: https://hydra.nixos.org/build/111556551
2020-03-06 06:58:20 +01:00
Ben Wolsieffer 4478766b64 make-bootstrap-tools: add libssp to allow stack protector to work 2020-02-18 22:40:30 -05:00
Vladimír Čunát cc1ae9f21b
make-bootstrap-tools: fixup after glibc update
There's a generated header that got comment about the source header
from glibc.dev, which added unwanted runtime dependency.  Tested:
nix build -f pkgs/top-level/release.nix stdenvBootstrapTools.{aarch64,i686,x86_64}-linux.test
2020-02-10 17:31:35 +01:00
Vladimír Čunát cf242659fe
stdenv bootstrap tools: switch one file to official URL 2020-02-05 13:59:18 +01:00
Vladimír Čunát 53349b9c27
stdenv bootstrap tools: regenerate "officialy"
From Hydra's binaries for c5aabb0 (19.09).
This time I re-tested full stdenv bootstrap on these three platforms.
https://github.com/NixOS/nixpkgs/pull/66528#issuecomment-582351637
2020-02-05 13:04:13 +01:00
Maximilian Bosch 2d36eac780 stdenv: rebuild aarch64 bootstrap files with gcc8
The old bootstrapping files would break with glibc 2.30 as at least gcc6
is needed.
2020-01-14 08:52:25 +00:00
Vladimír Čunát 2aea16c4d6 glibc: depend on libidn2 (and libunistring, transitively)
It's a bit hacky, but ATM I can't see any better way for glibc >= 2.28.

Signed-off-by: Luka Blaskovic <lblasc@tvbeat.com>
2020-01-14 08:27:00 +00:00
Vladimír Čunát 0c75f51304 stdenv bootstrap: disable dejagnu tests
There's a failure - I don't know why.  The checks from "normal" dejagnu
still succeed, so I assume this commit is quite a safe work-around.
2020-01-14 08:27:00 +00:00
Luka Blaskovic e80a85a057 bootstrap-files: bump WIP 2020-01-14 08:26:58 +00:00
Will Dietz 43c721df4a make-bootstrap-tools: use 'extreme' option to reduce size but not cost
Apparently this option trades compression time for size,
and explicitly does so without increasing resources needed in decomp.

Doesn't make tarball creation unbearable, so add it to options!
2019-11-03 14:52:44 +01:00
Will Dietz 78d3cb1d16 binutils: offer "for bootstrap" variant that's less.. feature-complete 2019-11-03 14:52:44 +01:00
Will Dietz 5b46a7c240 gcc7: make building w/LTO support optional, don't use in bootstrap tools 2019-11-03 14:52:44 +01:00
volth 35d68ef143 treewide: remove redundant quotes 2019-08-26 21:40:19 +00:00
Daniel Schaefer 786f02f7a4 treewide: Remove usage of isNull
isNull "is deprecated; just write e == null instead" says the Nix manual
2019-04-29 14:05:50 +02:00
Matthew Bauer dd584d8eeb stdenv/linux: use isCompatible to find bootstrap tools
This avoids part of the issue where things like armv7a don’t work
because the system doesn’t realize it can use the armv7l bootstrap
tools.
2019-04-19 12:00:44 -04:00
Matthew Bauer 9edb851308
Merge pull request #51628 from ju1m/arm
stdenv: add armv7a-linux system
2019-03-01 15:36:07 -05:00
Frederik Rietdijk 092e3b50a8 Merge master into staging-next 2019-01-02 21:08:27 +01:00
Will Dietz 1bb4e5c8dc
Merge pull request #36384 from dtzWill/musl-native-bootstrap
x86_64-musl bootstrap: refresh bootstrap tools package
2018-12-31 14:59:56 -06:00
Jörg Thalheim 1b146a8c6f
treewide: remove paxutils from stdenv
More then one year ago we removed grsecurity kernels from nixpkgs:
https://github.com/NixOS/nixpkgs/pull/25277

This removes now also paxutils from stdenv.
2018-12-22 12:55:05 +01:00
Frederik Rietdijk 5f554279ec Merge master into staging-next 2018-12-07 15:22:35 +01:00
Julien Moutinho 3168e85833 stdenv: add armv7a-linux system 2018-12-06 17:55:25 +01:00