Commit Graph

670 Commits

Author SHA1 Message Date
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
Matthew Bauer
a3a6ad7a01 stdenv: implement crossOverlays
crossOverlays only apply to the packages being built, not the build
packages. It is useful when you don’t care what is used to build your
packages, just what is being built. The idea relies heavily on the
cross compiling infrastructure. Using this implies that we need to
create a cross stdenv.
2018-12-04 21:06:46 -06:00
Léo Gaspard
8ecd555ded
Merge branch 'pr-46056' into staging
* pr-46056:
  binutils: use shared libs
  binutils: fix #44936 the huge size regression
2018-11-28 09:55:05 +09:00
John Ericson
e3082c313b Merge remote-tracking branch 'upstream/master' into release-lib-cleanup 2018-11-01 16:47:42 -04:00
John Ericson
f2ed7c7af9 linux bootstrap tools: Use right system for some raw derivations
This allows cross builds to work. Evidentallyy this has been done wrong
since I combined the bootstrap tool creation files in
ab651d2c9b. Oops!
2018-11-01 16:22:00 -04:00
John Ericson
ffaffb36d1 linux bootstrap-tools: use stdenv.*Platform to avoid deprecation warning 2018-11-01 16:18:51 -04:00
xeji
6aa5f2db8f
Merge pull request #47245 from dtzWill/fix/coreutils-8.30-bootstrap
coreutils: try 8.30 again, fix bootstrap tools expression motivating revert before
2018-09-25 12:10:27 +02:00
Will Dietz
4d9f9f171b make-bootstrap-tools: fix with latest coreutils
Since gcc.lib/lib64 is a symlink to 'lib', the use of
"lib*/libgcc_s.so*" triggered a warning (error) with
the latest coreutils.  Essentially we were doing:

$ cp a/x b/x y/

And latest coreutils rejects such invocations.

Just copy from 'lib', lib64 is a link to it anyway.

* Nothing else in this file bothers looking at lib*
* AFAICT lib* only ever possibly matched lib64 anyway
2018-09-23 14:54:09 -05:00
Jan Malakhovski
b2c7a5a271 bintools-wrapper, cc-wrapper, stdenv: infer propagateDoc automatically
02c09e0171 (NixOS/nixpkgs#44558) was reverted in
c981787db9 but, as it turns out, it fixed an issue
I didn't know about at the time: the values of `propagateDoc` options were
(and now again are) inconsistent with the underlying things those wrappers wrap
(see NixOS/nixpkgs#46119), which was (and now is) likely to produce more instances
of NixOS/nixpkgs#43547, if not now, then eventually as stdenv changes.

This patch (which is a simplified version of the original reverted patch) is the
simplest solution to this whole thing: it forces wrappers to directly inspect the
outputs of the things they are wrapping instead of making stdenv guess the correct
values.
2018-09-23 17:29:56 +00:00
John Ericson
35378f0141
Merge pull request #46857 from obsidiansystems/darwin-to-linux-prep
misc pkgs: various cross fixes in preparation for darwin->linux
2018-09-18 16:52:30 -04:00
John Ericson
f2bb59e710 stdenv linux, stdenv cross: Harmonize extraNativeBuildInputs
Want to make sure these are the same per host platform, without duplication.
2018-09-18 16:27:04 -04:00
Jan Malakhovski
7931d455a4 stdenv: linux: cleanup a bit 2018-09-04 22:04:56 +00:00
Vladimír Čunát
beb063a103
binutils: use shared libs 2018-09-04 21:36:07 +02:00
John Ericson
0828e2d8c3 treewide: Remove usage of remaining redundant platform compatability stuff
Want to get this out of here for 18.09, so it can be deprecated
thereafter.
2018-08-30 17:20:32 -04:00
CrystalGamma
72d161f548 [RFC] ppc64le enablement (#45340)
* ppc64le enablement

* gcc, glibc: properly handle __float128

* lib/systems, stdenv: syntax cleanup

* gcc7: remove ugly hack

* gcc: add/update __float128 flags

* stdenv: add another pair of quotes for consistency

* gcc: move __float128 flag for ppc64le-glibc into common/platform-flags.nix
2018-08-21 15:31:34 -04:00
Jan Malakhovski
1acbc939c5 stdenv: linux: inherit texinfo in stage4 instead of the final stdenv
This reverts commit a809fdc8e1 and then
achieves the same result (not rebuilding texinfo three times)
but without dragging bootstrap tools into the closure.
2018-08-12 11:47:18 +00:00
Eelco Dolstra
c981787db9
Revert "cc-wrapper, bintools-wrapper: simply symlink man and info outputs"
This reverts commit 02c09e0171.
2018-08-09 12:57:38 +02:00
Jan Malakhovski
02c09e0171 cc-wrapper, bintools-wrapper: simply symlink man and info outputs
See discussion in #44516.
2018-08-06 20:50:16 +00:00
Will Dietz
f3693b0647 make-bootstrap-tools-cross: remove broken i686-musl variant
Not terribly difficult to get this working, but until it does
remove it so the cross jobset doesn't have the failures this introduces.
2018-06-25 11:16:10 -05:00
John Ericson
d00cc1242f
Merge pull request #40040 from obsidiansystems/gnu-config-arm
gnu-config: Update, allowing hacks to be removed
2018-05-14 11:20:09 -04:00
John Ericson
f2b575bd7b Merge remote-tracking branch 'upstream/master' into gnu-config-arm 2018-05-14 10:58:15 -04:00
John Ericson
eebd455dc0 linux stdenv: Update gnu-config on all non-x86
Not just Aarch64. Other non-x86 platforms might be old enough, but I am
about to update gnu-config to handle things better across the board.
2018-05-14 10:55:32 -04:00
Matthew Justin Bauer
eeb016e8f0
Merge branch 'staging' into fix-ncurses-darwin-extensions 2018-05-02 15:40:38 -05:00
Michael Raskin
ce929e6a92
Merge pull request #39457 from oxij/stdenv/texinfo-bash
stdenv: change texinfo bootstrap handling; texinfo, bash: simplify expressions
2018-04-27 19:03:26 +00:00
Will Dietz
f31b147f63 linux bootstrap: remove assertion failure from dev, fixes 'nix eval'
As in:

$ nix eval -f . bash

Also remove the glibc propagation inherit that made these necessary,
stages handle propagating libc themselves (apparently) and
AFAICT no hashes are changed as a result of this.
2018-04-26 10:19:52 -05:00
Jan Malakhovski
a809fdc8e1 stdenv: linux: stop recompiling texinfo
This makes stdenv bootstraping a bit more efficient.
We don't recompile most of other stuff used in bootstrapping stdenv too.
2018-04-25 19:50:54 +00:00
Will Dietz
97698b0d6d musl-stdenv: don't add special allowance for libiconv 2018-04-25 08:08:47 -05:00
Will Dietz
791b5bbbf4 musl bootstrap: remove libiconv 2018-04-24 21:27:28 -05:00
John Ericson
adaa110a72 binutils: No more darwin conditionals
Since at least d7bddc27b2, we've had a
situation where one should depend on:

 - `stdenv.cc.bintools`: for executables at build time
 - `libbfd` or `libiberty`: for those libraries
 - `targetPackages.cc.bintools`: for exectuables at *run* time
 - `binutils`: only for specifically GNU Binutils's executables,
   regardless of the host platform, at run time.

and that commit cleaned up this usage to reflect that. This PR flips the
switch so that:

 - `binutils` is indeed unconditionally GNU Binutils
 - `binutils-raw`, which previously served that role, is gone.

so that the correct usage will be enforced going forward and everything
is simple.

N.B. In a few cases `binutils-unwrapped` (which before and now was
unconditionally actual GNU binutils), rather than `binutils` was used to
replace old `binutils-raw` as it is friendly towards some cross
compilation usage by avoiding a reference to the next bootstrapping
change.
2018-04-03 13:34:52 -04:00
Jan Malakhovski
7079e744d4 Merge branch 'master' into staging
Resolved the following conflicts (by carefully applying patches from the both
branches since the fork point):

   pkgs/development/libraries/epoxy/default.nix
   pkgs/development/libraries/gtk+/3.x.nix
   pkgs/development/python-modules/asgiref/default.nix
   pkgs/development/python-modules/daphne/default.nix
   pkgs/os-specific/linux/systemd/default.nix
2018-03-10 20:38:13 +00:00
Will Dietz
a6e7c85ab8 x86_64-musl bootstrap regen, much smaller
compressed: 28M -> 20M
uncompressed: 201M -> 119M

Built using:
94f3dc4fdf

cc https://github.com/NixOS/nixpkgs/pull/36383
2018-03-06 11:40:23 -06:00
Will Dietz
d7c2cffd86 x86_64-musl: regen again w/symlinks preserved 2018-03-06 11:40:08 -06:00
Will Dietz
856335396f x86_64-musl: use native-built bootstrap package on x86_64
Built using:
46f83fa9d1
2018-03-06 11:36:52 -06:00
Will Dietz
ece4c62d4b make-bootstrap-tools: preserve coreutils symlinks
We go out of our way (see top of file) to build a single binary
with symlinks for all of the tools, but were losing them
when preparing the bootstrap tools.
2018-03-06 15:13:56 +02:00
Tuomas Tynkkynen
34f95d92a2 Merge remote-tracking branch 'upstream/master' into staging
Conflicts:
	pkgs/applications/misc/pytrainer/default.nix
	pkgs/development/tools/pew/default.nix
	pkgs/tools/misc/you-get/default.nix
2018-02-28 20:52:49 +02:00
John Ericson
dfc5d7835d
Merge pull request #35247 from telent/mips32
lib, treewide: Add missing MIPS arches, and fix existing usage
2018-02-27 14:01:15 -05:00
John Ericson
4a29081a94
Merge pull request #35071 from oxij/stdenv/infopages
stdenv, bash: fixing info pages and stuff
2018-02-26 18:06:11 -05:00
Jan Malakhovski
e654d9a9ca stdenv: linux: give distinct names to all the stages
Mainly for debugging.
2018-02-26 22:46:34 +00:00
Jan Malakhovski
522437362a stdenv: linux, darwin: don't build documentation for the the intermediate stages
For the cc of the intermediate stages, to be precise. Doing the same for
bintools requires lots of refactoring.

This is mainly for the future extensibility as now you can change
documentation generation with impunity without rebuilding the
whole of stdenv.
2018-02-26 22:45:10 +00:00
Daniel Barlow
9c50ae6898 lib, treewide: Add missing MIPS arches, and fix existing usage
Existing "mips64el" should be "mipsel".

This is just the barest minimum so that nixpkgs can recognize them as
systems - although required for building individual derivations onto
MIPS boards, it is not sufficient if you want to actually build nixos on
those targets
2018-02-23 20:43:42 -05:00
Shea Levy
32ce7012f0
Merge branch 'master' into gcc-7 2018-02-18 16:27:22 -05:00
Shea Levy
0a0ecc4c2c
Enable building riscv64 cross bootstrap tools
Fixes #35089
2018-02-18 16:07:13 -05:00
Tuomas Tynkkynen
b1916b45a3 Merge remote-tracking branch 'upstream/staging' into gcc-7
Conflicts:
	pkgs/development/libraries/libidn/default.nix
	pkgs/top-level/all-packages.nix
2018-02-15 15:45:37 +02:00
Will Dietz
84a527ea5e x86_64-musl bootstrap: use separate 64bit busybox
Avoid issues like #24954.
2018-02-13 09:45:05 -06:00
Will Dietz
4619f8e06d new musl bootstrap URL's, much smaller. rebuild all the things. 2018-02-13 09:45:04 -06:00
Will Dietz
268bff6185 make-bootstrap-tools: set XZ to maximum level, big wins
x86_64 bootstrap tarball goes from 37M -> 21M (!)
2018-02-13 09:45:04 -06:00
Will Dietz
a4c69744dc aarch64-musl, armv6l-musl: fetch from wdtz.org instead of storePath 2018-02-13 09:45:04 -06:00
Will Dietz
8bedb690a2 add musl bootstrap paths for aarch64, armv6l
Aarch64 tools tested briefly with qemu-aarch64,
but neither have been actually used yet :).

For now only "host" indirectly via binary cache
at cache.allvm.org.
2018-02-13 09:45:04 -06:00
Will Dietz
d00f200f4e bootstrap-files: nicer naming 2018-02-13 09:45:03 -06:00
Will Dietz
119920faa6 restore stdenv.glibc, will remove separately. 2018-02-13 09:45:03 -06:00
Will Dietz
c8d03e6298 make-bootstrap-tools: grab libc from stdenv.cc.libc
This is the same in current cases AFAICT,
other than uses musl instead of glibc when musl-native.
2018-02-13 09:44:57 -06:00
Will Dietz
9bc8127dc3 bootstrap-tools-cross, release-cross: add various musl entries 2018-02-13 09:44:56 -06:00
Will Dietz
4b6b83f159 linux stdenv: find bootstrap files by libc, then arch 2018-02-13 09:44:42 -06:00
Will Dietz
5a8002873e fixup linux stdenv bootstrap 2018-02-13 09:44:40 -06:00
Will Dietz
9dbbd75e54 musl bootstrap: allow libiconv 2018-02-13 09:44:40 -06:00
Will Dietz
fd00d37b4f musl64 bootstrap: grab from gravity, requires netrc magic 2018-02-13 09:44:39 -06:00
Will Dietz
3ee5094934 linux bootstrap for musl: kludgery 2018-02-13 09:44:39 -06:00
Will Dietz
0e16989d39 bootstrap-tools-musl: WIP 2018-02-13 09:44:37 -06:00
Will Dietz
a0af2aadb6 for now, copy bootstrap-tools instead of modify in-place 2018-02-13 09:44:37 -06:00
Will Dietz
0ac504227d make-bootstrap-tools: initial musl support, less glibc-specific 2018-02-13 09:44:37 -06:00
Will Dietz
4831495995 make-bootstrap-tools: glibc -> libcCross 2018-02-13 09:44:37 -06:00