3
0
Fork 0
forked from mirrors/nixpkgs
Commit graph

730 commits

Author SHA1 Message Date
Malo Bourgon 0d0feaa4fc gcc{4..10}: add aarch64-darwin to badPlatforms 2022-04-14 10:02:19 -07:00
Simon Chatterjee 9b310e61b4 gcc10: fix cross-compilation from aarch64-darwin host
Without this patch, linking when cross-compiling fails:

    Undefined symbols for architecture arm64:
      "_host_hooks", referenced from:
          gt_pch_save(__sFILE*) in libbackend.a(ggc-common.o)
          gt_pch_restore(__sFILE*) in libbackend.a(ggc-common.o)
          toplev::main(int, char**) in libbackend.a(toplev.o)
    ld: symbol(s) not found for architecture arm64
2022-04-06 21:55:56 +01:00
Vladimír Čunát f91a565fe3
gnat*: fixup build with glibc-2.34 2022-04-04 18:58:13 +02:00
John Ericson ed07c3b1a2
Merge pull request #163489 from alyssais/gcc-static-lib
pkgsStatic.stdenv.cc.cc: put static libs in $lib
2022-03-22 22:07:50 -04:00
Alyssa Ross 12c37aec37
pkgsStatic.stdenv.cc.cc: put static libs in $lib
libtool requires the library files its .la files describe to be in the
same directory as those files.  We only do this for compilers without
shared libraries, so that the libraries in $lib are always the
libraries the package set is supposed to use.

Fixes: https://github.com/NixOS/nixpkgs/issues/76873
Fixes: https://github.com/NixOS/nixpkgs/issues/108534
2022-03-22 17:56:11 +00:00
Alyssa Ross c6dd11ca39
Revert "gcc: Always pass --enable-shared by default"
This reverts commit 8e48232180.

Since pkgsStatic.stdenv.cc can only produce static binaries, there's
no reason to include that compilers e.g. libstdc++.so.
2022-03-22 17:56:08 +00:00
github-actions[bot] e452d308f5
Merge staging-next into staging 2022-03-22 12:02:02 +00:00
Alyssa Ross cb040db7ab pkgsStatic.gcc: fix build
LTO requires building a compiler plugin, which is a shared object.

The closure is a bit wild but it builds and can compile programs.
2022-03-22 10:52:36 +00:00
Maximilian Bosch e10ea9608a
gcc{7,9,10}: apply patches for asan w/glibc-2.34
This should fix a few broken cc-wrapper tests that also check for
libasan[1][2][3]:

    [...]
    checking whether sanitizers are fully functional... ==243==ERROR: AddressSanitizer failed to allocate 0x0 (0) bytes of SetAlternateSignalStack (error code: 22)
    [...]

The underlying issue is that `SIGSTKSZ` isn't a compile-time constant
anymore, but in this case the uninitialized `kAltStackSize` was
initialized early enough to evalute to `0`[4].

The issue is already fixed in gcc11 and there's  GCC 8.5 which also
contains the patch, however the backports to v9 and v10 aren't released
yet, so we have to apply patches on our own here.

For GCC 7.5 I applied the patch from gcc8 as it doesn't seem as if
there's an official upstream backport.

[1] https://hydra.nixos.org/build/163102264
[2] https://hydra.nixos.org/build/163624687
[3] https://hydra.nixos.org/build/163619227
[4] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100114
2022-02-27 10:26:58 +01:00
Zhaofeng Li 2fca45565d
gcc9: Add no-sys-dir patch for RISC-V (#154230)
Same as in gcc{10,11} (#147942).
2022-01-12 06:27:48 -05:00
Dmitry Kalinkin 1a9297102c
Merge branch 'master' into staging-next 2021-12-23 16:58:33 -05:00
Vladimír Čunát 28e731742c
Revert "Merge #142792: gcc9: 9.3.0 -> 9.4.0"
This reverts commit d71611fb72, reversing
changes made to cae9272c92.

The update caused an issue on aarch64-linux where it's the default
compiler, many packages got broken (usually through `mariadb`; I think).
File lib/gcc/aarch64-unknown-linux-gnu/9.4.0/include/arm_acle.h
got unbalanced braces (look at `cplusplus` lines), e.g. see in
/nix/store/fvkdvx69sf8h99xgx0m42dzfd5ly5csr-gcc-9.4.0/

I don't know how exactly it happened, as in the source this header is OK
and hasn't even changed between 9.3.0 and 9.4.0.  I assume that some
post-processing on headers got broken.  Anyway, I don't have much
motivation to dig deeper here, but perhaps someone else will.
2021-12-19 10:36:57 +01:00
oxalica 0d1750e9c0
gcc{10,11}: add no-sys-dir patch for RiscV
RiscV has an individual STARTFILE_PREFIX_SPEC macro which also need to
be patched.
2021-11-30 16:58:45 +08:00
Vladimír Čunát d71611fb72
Merge #142792: gcc9: 9.3.0 -> 9.4.0 (into staging) 2021-11-25 09:09:06 +01:00
Alyssa Ross 3f01b576af
Merge remote-tracking branch 'nixpkgs/staging-next' into staging
Conflicts:
	nixos/doc/manual/from_md/release-notes/rl-2111.section.xml
	nixos/doc/manual/release-notes/rl-2111.section.md
2021-10-28 16:07:38 +00:00
ajs124 4080dff4f6 gcc8: 8.4.0 -> 8.5.0 2021-10-27 17:49:56 +02:00
ajs124 81394b0ad8 gcc9: 9.3.0 -> 9.4.0 2021-10-25 00:24:08 +02:00
Ivan Babrou e8abd9cc16 gcc11: 11.1.0 -> 11.2.0
The cyclades patch has been applied upstream:

* https://github.com/gcc-mirror/gcc/commit/2bf34b9f4e4
2021-10-23 12:12:18 -07:00
Peter Simons 476635afe1 Drop myself from meta.maintainers for most packages.
I'd like to reduce the number of Github notifications and
review requests I receive.
2021-10-14 11:01:27 +02:00
Sergei Trofimovich 46951d9527
gcc48, gcc49: apply upstream fix for gcc-11 (#138979)
Without the change build fails against gcc-11 as:

```
../../gcc-4.8.5/gcc/reload1.c:89:24:
  error: use of an operand of type 'bool' in 'operator++' is forbidden in C++17
   89 |   (this_target_reload->x_spill_indirect_levels)
      |   ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
```

Co-authored-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>

Co-authored-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
2021-09-24 02:17:09 -04:00
github-actions[bot] 55c0ac1484
Merge staging-next into staging 2021-09-24 06:01:40 +00:00
r-burns 188dad47ca
Merge pull request #135360 from r-burns/gcc-musl-libgomp
gcc: enable libgomp for musl targets
2021-09-23 17:22:21 -07:00
Sergei Trofimovich 974e68a7ad gcc: remove <cyclades.h> from libsanitizer
linux-headers-5.13 removed <cyclades.h> along with device support.
Backport a single https://gcc.gnu.org/PR100379  upstream change to
fix gcc build.

Use local (unmodified) upstream patches to avoid fetchpatch dependency.
2021-09-20 19:37:19 +01:00
Vladimír Čunát c5f4e54e1d
Merge #135692: pkgsCross.avr.buildPackages.gcc: work around
... for log limit on hydra
2021-09-05 16:47:18 +02:00
polykernel ca20a96b5f treewide: concatStrings (intersperse ...) -> concatStringsSep ...
Update all usage of lib.concatStrings (lib.intersperse ...) to
lib.concatStringsSep. This produces the same result as per https://github.com/NixOS/nixpkgs/pull/135843,
however it yields a performance benefit on Nix versions that
support the builtins.concatStringsSep primop.
2021-08-28 11:57:59 -04:00
sternenseemann d01533ceab pkgsCross.avr.buildPackages.gcc{10,11}: avoid log limit on hydra
When upgrading from gcc 9 to 10, avr-gcc started to hit the hydra log
limit, preventing the binary cache from being populated.

This commit tries to workaround this issue by passing `-s` to make for
avr-gcc 10 and 11 which seem to exhibit this problem.

Reference #135605.
2021-08-26 00:36:58 +02:00
Ryan Burns ccc96a4c44 gcc: enable libgomp for musl targets
libgomp has been disabled on musl since musl support was first added to
nixpkgs (15d401dcfa), but seems to work
fine. Tested down to gcc 6 (gcc 4.8 already doesn't build for musl)
2021-08-22 20:44:51 -07:00
Ryan Burns 7364241a6a gcc: update powerpc-specific configuration
* support -m32 on (big-endian) powerpc64-linux
* fix compilation to powerpc*-musl targets with
  incomplete decimal-float support
2021-08-16 19:42:10 -07:00
sternenseemann 1508ea5708 gnat{6,9,10,11}: don't build libada when building a cross compiler
According to https://wiki.osdev.org/GNAT_Cross-Compiler building
libada is not possible when building a cross compiler. Unfortunately I
haven't been able to determine if this is upstream's position as well,
but sure enough disabling libada lets us build a GNAT cross compiler.
2021-07-28 12:44:49 +02:00
sternenseemann d3e05d191f gnat{6,9,10,11}: move gnatboot into nativeBuildInputs 2021-07-28 12:44:49 +02:00
Alyssa Ross 77f3a9a3aa gcc: broaden platforms
Okay, GCC might not technically support _every_ platform in
platforms.unix, but I think it would be easier to subtract those as
they're discovered, if that even matters, rather than trying to
exhaustively list every Unix it does support.

(I ran into this because I wanted to build GCC for NetBSD, which it
definitely supports.)
2021-06-09 10:28:01 +00:00
Patrick Hilhorst 3e91f422fd
gcc11: use maintainer team 2021-05-24 15:02:14 +02:00
Patrick Hilhorst c913e53bdb
gcc*: use maintainer team 2021-05-24 15:01:05 +02:00
Jonathan Ringer f7a112f6c4
Merge remote-tracking branch 'origin/master' into staging-next
Conflicts:
  pkgs/applications/graphics/emulsion/default.nix
  pkgs/development/tools/misc/texlab/default.nix
  pkgs/development/tools/rust/bindgen/default.nix
  pkgs/development/tools/rust/cargo-udeps/default.nix
  pkgs/misc/emulators/ruffle/default.nix
  pkgs/tools/misc/code-minimap/default.nix
2021-05-18 08:57:16 -07:00
sternenseemann 2d176b593b gcc*: force building a cross compiler if host and target platform differ
gcc's configure system has the nasty habit (for us) of judging for
itself if it is building a cross compiler (or cross compiling), but on
the limited information of the build, host and target platforms' config
which only contains a subset of the information we encode in
`stdenv.*Platform`. The practical consequence was that prior to this
change building `pkgsLLVM.buildPackages.gcc` actually fails because it
refuses to use `--with-headers` with something it believes to not be a
cross compiler.

As a workaround we force the appropriate variable in the configure
script to always be `yes` regardless of its own conditional check.

At some point we probably should report this issue in some capacity, so
future gcc versions don't force us into workarounds like this and
acdc783418.
2021-05-18 00:16:54 +02:00
Vladimír Čunát 8eabe2ecc5
Merge #115235: gcc: native aarch64-darwin support 2021-05-11 12:12:04 +02:00
Vladimír Čunát 79762fcb4a
Merge #121772: gcc*: do not modify code in prePatch 2021-05-11 12:01:38 +02:00
Ivan Babrou 4aa95e3312 gcc: native aarch64-darwin support 2021-05-10 19:07:30 -07:00
github-actions[bot] 61fa3fdde8
Merge master into staging-next 2021-05-10 18:28:17 +00:00
Ivan Babrou 99d0c004d1 gcc6, gcc7, gcc8, gcc9, gcc10, gcc11: do not modify code in prePatch
Doing any modifications before patching risks invalidating patch base.
2021-05-04 22:53:21 -07:00
Ivan Babrou 8cf144d139 gnat11: extract gnat-cflags-11.patch from gnat-cflags.patch 2021-05-04 20:14:01 -07:00
github-actions[bot] c6548b2832
Merge staging-next into staging 2021-04-30 06:21:40 +00:00
Ivan Babrou d75d0b9c62 gcc11: init at 11.0.0
Pretty much copy-pasted from gcc10 with changed version and sha256.
2021-04-29 22:05:32 -07:00
Vladimír Čunát 537d9687d1
Merge #119219: gcc10: 10.2 -> 10.3 (into staging) 2021-04-29 10:38:18 +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
github-actions[bot] cdece2032d
Merge staging-next into staging 2021-04-22 18:14:30 +00:00
Alyssa Ross 407e448114 gcc8,gcc9: fix ctypes on NetBSD
This patch was applied to gcc7 in aab8c7ba43 ("netbsd: add cross target"),
but it hasn't been brought forward to newer compilers that have the
same problem.

GCC 6 and (probably) GCC 4.9 also have the issue, but the patch
doesn't apply cleanly to them so I'm leaving them alone for now.

GCC 10, our current default, appears to have finally fixed this.
2021-04-22 12:23:55 +00:00
github-actions[bot] ea5bd4364e
Merge staging-next into staging 2021-04-19 18:11:54 +00:00
Alyssa Ross 7eb3d024ae
gcc: don't build libssp on NetBSD
On NetBSD, this is provided by libc, and the GCC version clashes with it.
Disabling it matches the behaviour of pkgsrc on NetBSD.

Fixes: https://github.com/NixOS/nixpkgs/issues/119839
2021-04-19 14:11:05 +00:00
sternenseemann acdc783418 gcc*: always force --program-prefix and pass --target
Don't rely on gcc detecting from the passed platforms which prefix to
use, but always specify the prefix nixpkgs expects (or doesn't). This
allows us to work around problems where the configure script would add
prefix where nixpkgs doesn't expect one (if `--target` was specified,
but the same as `--host`) or doesn't add one if nixpkgs expects one (if
`--target` and `--host` are the same, but we are actually cross
compiling, but the relevant parts of the platform are not encoded into
the platform config.

See also ca9be0511b.
2021-04-16 22:54:05 +02:00