Commit Graph

1310 Commits

Author SHA1 Message Date
Adam Joseph
93d63aaa05 gcc: if atLeast 13, use deduplicated version 2023-08-20 23:00:00 -07:00
Adam Joseph
9dc9872922 gcc: default.nix: parameterize by version 2023-08-20 23:00:00 -07:00
Adam Joseph
57a2dfe646 gcc: default.nix: replace ../ with ./ 2023-08-20 23:00:00 -07:00
Adam Joseph
671b761d05 gcc: cp ./13/default.nix ./default.nix 2023-08-20 22:59:59 -07:00
Adam Joseph
39b20be057 gcc: resolve merge conflict from staging 2023-08-20 22:59:20 -07:00
Adam Joseph
fa0fc88e0c gcc: match weird whack-a-mole per-version hash algorithm 2023-08-20 22:59:20 -07:00
Adam Joseph
869b639285 gcc: clean up version conditions 2023-08-20 22:59:20 -07:00
Adam Joseph
02198751fa gcc: move version-map out of all-packages.nix, into pkgs/ 2023-08-20 22:59:20 -07:00
Adam Joseph
7367bb691d gcc: move patches attribute into patches/ subdirectory 2023-08-20 22:59:19 -07:00
Adam Joseph
da87387073 gcc: if atLeast 4.8, use deduplicated version 2023-08-20 22:59:16 -07:00
Adam Joseph
8a4148a538 gcc: if atLeast 4.9, use deduplicated version 2023-08-20 22:59:16 -07:00
Adam Joseph
b505fb4711 gcc: if atLeast 6, use deduplicated version 2023-08-20 22:59:16 -07:00
Adam Joseph
b3d07e87d2 gcc: if atLeast 7, use deduplicated version 2023-08-20 22:59:15 -07:00
Adam Joseph
942d7ecf08 gcc: if atLeast 8, use deduplicated version 2023-08-20 22:59:15 -07:00
Adam Joseph
01902c7b45 gcc: if atLeast 9, use deduplicated version 2023-08-20 22:59:15 -07:00
Adam Joseph
c72e136046 gcc: if atLeast 10, use deduplicated version 2023-08-20 22:59:15 -07:00
Adam Joseph
8a822d6e5d gcc: if atLeast 11, use deduplicated version 2023-08-20 22:59:14 -07:00
Adam Joseph
dc3eb566d1 gcc: if atLeast 12, use deduplicated version 2023-08-20 22:59:14 -07:00
Adam Joseph
c3bae705a9 gcc: if atLeast 13, use deduplicated version 2023-08-20 22:59:11 -07:00
Adam Joseph
59daa06947 gcc: default.nix: parameterize by version 2023-08-20 22:52:41 -07:00
Adam Joseph
2e16ac593a gcc: default.nix: replace ../ with ./ 2023-08-20 22:52:40 -07:00
Adam Joseph
0f7bf37e5a gcc: cp ./13/default.nix ./default.nix 2023-08-20 22:52:40 -07:00
Vladimír Čunát
636fd56f69 Merge #248552: gcc10, gcc13: patch-version bumps
...into staging-next
2023-08-18 06:48:53 +02:00
Vladimír Čunát
5ecef4a6af gcc13: update aarch64-darwin patch 2023-08-17 08:15:43 +02:00
Adam Joseph
92186a49bf gcc: factor out forceLibgccToBuildCrtStuff 2023-08-14 15:08:28 -07:00
Vladimír Čunát
dc1e382f94 gcc13: 13.1.0 -> 13.2.0
The patch would no longer apply, as the the changed part is no longer
exactly at the end of the file.  There's more content now, but it
suffices to just add a preserved empty line into the diff.
2023-08-11 17:27:37 +02:00
Vladimír Čunát
287a5b6baa gcc10: apply a patch more often
As usual, just to earlier detect when it stops applying.
2023-08-11 17:05:11 +02:00
Vladimír Čunát
bab20c7df7 gcc10: 10.4.0 -> 10.5.0
This dropped file now seems unused.
2023-08-11 16:51:03 +02:00
Sergei Trofimovich
3d66844c2d gcc: revert "do not install sys-include headers for cross-compilers."
The change reverts commit 7df4387ebd

A few reasons to revert the commit:
1. The change was not enough to restore `-idirafter` override semantic
   to match unwrapped compiler.
2. The change broke override semantics for cross-compilers
3. The change made override semantics different between cross-compiler
   and native compiler

All of three have some overlap between, but I think it's important
to call all of them out.

The main fallout is the uboot builds, reported by cynerd.

Used the following test to check the override recovery:

    $ nix shell github:NixOS/nixpkgs/release-22.05#pkgsCross.aarch64-multiplatform.stdenv.cc
    $$ cat stdio.h
    # empty
    $$ printf "#include <stdio.h>" | aarch64-unknown-linux-gnu-gcc -E - -o - -idirafter . >/dev/null; echo $?
    0

It failed before the change and succeded after.
2023-07-26 16:40:42 +01:00
Adam Joseph
7621636030 gcc: use Nix instead of bash for conditional
Now that we use the standard builder, the commands produced by
pre-configure.nix are wrapped in a bash function.  Inside of a bash
function, `export foo=` will still add `foo` to the environment of
any child processes forked after that point, but those variables
will *not* be visible to bash code which is outside of the
function-scope in which the `export` occurs.

Weird crap like this is yet another reason why we need to move away
from using bash for logic.  Let's switch.
2023-07-07 05:56:46 -07:00
Adam Joseph
e99f6372fa gcc: use callFile instead of callPackage for builder.nix 2023-07-07 05:56:46 -07:00
Adam Joseph
5eaf17927e gcc: add -g to declare
The bash `declare` builtin works differently when it occurs inside
function, as it now does due to breaking up the monolithic
`builder.sh` into separate phases.  We have to add `-g` in order to
get the outside-of-a-bash-function behavior when using `declare`
within a bash function.
2023-07-07 05:56:46 -07:00
Adam Joseph
67da7b9a1f gcc: remove builder.sh 2023-07-07 05:56:44 -07:00
Adam Joseph
e3f05c22aa gcc: use common/builder.nix
This commit replaces `stdenv.mkDerivation` with `(callPackage
../common/builder.nix {})` in all versions of gcc.
2023-07-07 05:55:15 -07:00
Adam Joseph
c413f5a6c1 gcc: remove builder = ../builder.sh from gcc/${version}/default.nix
This commit deletes the custom builder attribute from all gcc versions.
2023-07-07 05:55:15 -07:00
Adam Joseph
1157e1d856 gcc: add args to common/builder.nix, split up script into phases
This commit adds arguments to `builder.nix`, making it a callable
function, and splits up the single massive shell script into
separate attributes for each phase.  It also drops the first two
lines and the last line because these are part of the default
builder.

All script lines which were not part of a phase function have been
moved into `preUnpack` since this is the first phase that runs.
Subsequent commits will move parts of this to more sensible
locations.
2023-07-07 05:55:15 -07:00
Adam Joseph
72284b0d40 gcc: make common/builder.nix into valid Nix syntax
This commit performs two search-and-replace operations:

- replace all `${` with `''${`
- replace `''` with `""` in shell scripts

This commit is left unsquashed to make review of the subsequent
commits easier.
2023-07-07 05:55:15 -07:00
Adam Joseph
caf22a33eb gcc: copy gcc/builder.sh to gcc/common/builder.nix
This commit is left unsquashed to make review of the subsequent
commits easier.
2023-07-07 05:55:15 -07:00
github-actions[bot]
b6ae9ef2db Merge master into staging-next 2023-07-20 06:01:21 +00:00
github-actions[bot]
e048c645c9 Merge master into staging-next 2023-07-20 00:02:29 +00:00
Adam Joseph
07494a467a Merge pull request #243615 from amjoseph-nixpkgs/pr/gcc/fix-m68k
gcc: if isM68k, look for libgcc_s.so.2 (instead of .so.1)
2023-07-19 22:10:25 +00:00
github-actions[bot]
972652b656 Merge staging-next into staging 2023-07-14 12:02:21 +00:00
Vladimír Čunát
c4c0e2e2ec gnat11: avoid the new "fortify3" hardening
It broke build: https://hydra.nixos.org/build/227264335
Motivation: coreboot-toolchain.* depend on gnat11.

It's just a hack-fix.  gnat12 seems OK, just as other languages on 11,
at least those built on Hydra.  /cc PR #224822 which enabled the flag.
2023-07-14 09:04:12 +02:00
John Ericson
badbdfd88d Merge pull request #243194 from amjoseph-nixpkgs/pr/gcc/crossStageStatic-undo-the-hack
gcc: revert "kludge to prevent mass-rebuild" from #238154
2023-07-13 21:40:51 -04:00
github-actions[bot]
c796e255b3 Merge staging-next into staging 2023-07-14 00:03:13 +00:00
github-actions[bot]
7f792be99d Merge staging-next into staging 2023-07-13 12:01:50 +00:00
github-actions[bot]
e4fb0591c3 Merge staging-next into staging 2023-07-11 18:01:45 +00:00
Sergei Trofimovich
bc1e68558b Merge pull request #241980 from trofi/gcc-print-configure-flags
gcc: restore 'Configured with:' output on 'gcc -v' output
2023-07-10 19:23:58 +01:00
Randy Eckenrode
937f472e92 Revert "gcc: fix build on x86_64-darwin"
This reverts commit b39481bc09.
2023-07-09 13:29:11 -06:00
Sergei Trofimovich
41b146ff40 gcc: restore 'Configured with:' output on 'gcc -v' output
When reporting 'gcc' bugs upstream I'm occasionally asked for the actual
configure flags I used to build gcc.

Before the change `gcc -v` always reported empty string:

    $ gcc -v
    ...
    Target: x86_64-unknown-linux-gnu
    Configured with:

After the change `gcc -v` contains original options with slightly
mangled nix store paths to avoid build-only dependency retention:

    $ gcc -v
    ...
    Target: x86_64-unknown-linux-gnu
    Configured with: ../source/configure --prefix=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gcc-14.0.0 --with-gmp-include=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gmp-6.2.1-dev/include --with-gmp-lib=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gmp-6.2.1/lib --with-mpfr-include=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-mpfr-4.2.0-dev/include --with-mpfr-lib=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-mpfr-4.2.0/lib --with-mpc=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libmpc-1.3.1 --with-native-system-header-dir=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-glibc-2.37-8-dev/include --with-build-sysroot=/ --program-prefix= --enable-lto --disable-libstdcxx-pch --without-included-gettext --with-system-zlib --enable-checking=release --enable-static --enable-languages=c,c++ --disable-multilib --enable-plugin --disable-libcc1 --with-isl=/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-isl-0.20 --disable-bootstrap --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=x86_64-unknown-linux-gnu

While a bit verbose I think it's useful to see how we build gcc.
2023-07-08 14:17:51 +01:00