Commit Graph

960 Commits

Author SHA1 Message Date
Artturin
3d4e0708a0 gcc: move dll.a in lib64 to lib output too
same as c304c1e7d0
2023-08-29 01:04:15 +03:00
marius david
2eeb227d77 gcc: move dll to output 2023-08-27 21:40:34 +03:00
Adam Joseph
6c8b8bc2f1 gcc: limit gcc12 isMips --disable-libsanitizer to abi=="gnu" 2023-08-23 14:32:50 -07:00
Sergei Trofimovich
a62c92ab9b gcc12: disable libsanitizer for mips64
Without the change build on mips64-unknown-linux-gnu fails as:

        $ nix-build -A buildPackages.gcc12 --argstr crossSystem mips64-linux

        In file included from ...-glibc-mips64-unknown-linux-gnu-2.37-8-dev/include/bits/stat.h:25,
                         from ...-glibc-mips64-unknown-linux-gnu-2.37-8-dev/include/fcntl.h:78,
                         from ../../../../gcc-12.3.0/libsanitizer/sanitizer_common/sanitizer_linux.cpp:55:
        ...-glibc-mips64-unknown-linux-gnu-2.37-8-dev/include/bits/struct_stat.h:190:8: error: redefinition of 'struct stat64'
          190 | struct stat64
              |        ^~~~~~
2023-08-23 14:30:54 -07:00
Adam Joseph
1b0ed9f81b gcc: patches: fix patch name 2023-08-20 23:43:45 -07:00
Adam Joseph
8221d5f4e7 gcc: resolve merge conflict from staging 2023-08-20 23:00:03 -07:00
Adam Joseph
8f225b515f gcc: match weird whack-a-mole per-version hash algorithm 2023-08-20 23:00:03 -07:00
Adam Joseph
de36365466 gcc: clean up version conditions 2023-08-20 23:00:03 -07:00
Adam Joseph
30171782b7 gcc: move version-map out of all-packages.nix, into pkgs/ 2023-08-20 23:00:02 -07:00
Adam Joseph
911452ccbd gcc: move patches attribute into patches/ subdirectory 2023-08-20 23:00:02 -07:00
Adam Joseph
95475034d5 gcc: if atLeast 4.8, use deduplicated version 2023-08-20 23:00:02 -07:00
Adam Joseph
beeb48d17a gcc: if atLeast 4.9, use deduplicated version 2023-08-20 23:00:02 -07:00
Adam Joseph
920df10ab7 gcc: if atLeast 6, use deduplicated version 2023-08-20 23:00:02 -07:00
Adam Joseph
33f7f2c5aa gcc: if atLeast 7, use deduplicated version 2023-08-20 23:00:01 -07:00
Adam Joseph
e7afebbc4c gcc: if atLeast 8, use deduplicated version 2023-08-20 23:00:01 -07:00
Adam Joseph
4116fc3e6f gcc: if atLeast 9, use deduplicated version 2023-08-20 23:00:01 -07:00
Adam Joseph
10ee71f582 gcc: if atLeast 10, use deduplicated version 2023-08-20 23:00:01 -07:00
Adam Joseph
72fe04286e gcc: if atLeast 11, use deduplicated version 2023-08-20 23:00:00 -07:00
Adam Joseph
e9ece66a80 gcc: if atLeast 12, use deduplicated version 2023-08-20 23:00:00 -07:00
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
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