Commit graph

59 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
github-actions[bot]
2137c13b40
Merge master into staging-next 2021-01-27 12:24:05 +00:00
Ben Siraphob
3bbad8b041 treewide: remove inherited stdenv.lib 2021-01-27 12:44:43 +07:00
github-actions[bot]
58752914f4
Merge master into staging-next 2021-01-23 12:40:13 +00:00
Ben Siraphob
acc5f7b18a pkgs/development/compilers: stdenv.lib -> lib 2021-01-23 08:57:37 +07:00
Matthew Bauer
4bdcddf9aa gcc: allow stripping gcc libraries
When cross compiling to the same kernel / arch combination, it is safe
to use strip of libraries. This happens when cross-compiling musl
programs. dontStrip is now set in each gcc compiler instead of in
gcc/builder.sh.

Fixes #75476
2021-01-21 16:25:48 -06:00
Kira Bruneau
f0c6e40948 gcc10: fix MinGW build & use local copy of mcfgthread patches 2021-01-03 23:04:37 -05:00
John Ericson
8e48232180 gcc: Always pass --enable-shared by default
I am actually a bit skeptical about this, but @matthewbauer makes the
case for this in
https://github.com/NixOS/nixpkgs/pull/107238#discussion_r546454453 and
I'm happy to go with it not being as in the loop on static linking stuff
as he is.
2021-01-03 19:19:09 +00:00
John Ericson
f52263ced0 treewide: Start to break up static overlay
We can use use `stdenv.hostPlatform.isStatic` instead, and move the
logic per package. The least opionated benefit of this is that it makes
it much easier to replace packages with modified ones, as there is no
longer any issue of overlay order.

CC @FRidh @matthewbauer
2021-01-03 19:18:16 +00:00
Daniël de Kok
c81a429fb7 gcc9: apply gcc PR 96796 to avoid cycling on certain subreg reloads
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96796

This may have caused the AArch64 build failure of PyTorch in:

https://github.com/NixOS/nixpkgs/pull/101917
2020-11-02 20:06:53 +01:00
adisbladis
6fc3562432
Merge pull request #94637 from antifuchs/gccemacs-on-darwin
emacs: Make gccemacs build on darwin
2020-09-02 18:30:58 +02:00
Andreas Fuchs
41e34e76d8 gcc: Only use strip -x if building libgccjit on darwin
It's not necessary to use strip -x otherwise, so let's just use it for
the JIT library.
2020-08-29 23:10:38 -04:00
Matthew Bauer
872b23d214 Merge remote-tracking branch 'origin/master' into gcc-cross 2020-08-26 16:10:02 -05:00
Matthew Bauer
d0677e6d45 treewide: add warning comment to “boot” packages
This adds a warning to the top of each “boot” package that reads:

  Note: this package is used for bootstrapping fetchurl, and thus cannot
  use fetchpatch! All mutable patches (generated by GitHub or cgit) that
  are needed here should be included directly in Nixpkgs as files.

This makes it clear to maintainer that they may need to treat this
package a little differently than others. Importantly, we can’t use
fetchpatch here due to using <nix/fetchurl.nix>. To avoid having stale
hashes, we need to include patches that are subject to changing
overtime (for instance, gitweb’s patches contain a version number at
the bottom).
2020-07-31 08:56:53 +02:00
Gaelan Steele
459c60dda2 gcc: fix building darwin->linux cross compiler
This reverts d9feea5 with some slight modifications to work with
other changes since then.

Fixes #88213.
2020-05-26 03:16:03 -07:00
Frederik Rietdijk
d578248611 Merge staging-next into staging 2020-05-24 10:10:06 +02:00
Frederik Rietdijk
c778596f56 Merge master into staging-next 2020-05-24 10:03:22 +02:00
Stefan Frijters
fc9b93d2fc gdc: init at 9.3.0 2020-05-19 23:06:52 +02:00
John Ericson
1ac5398589 *-wrapper; Switch from infixSalt to suffixSalt
I hate the thing too even though I made it, and rather just get rid of
it. But we can't do that yet. In the meantime, this brings us more
inline with autoconf and will make it slightly easier for me to write a
pkg-config wrapper, which we need.
2020-05-12 00:44:44 -04:00
Matthew Bauer
fe1955588a gcc: add langJit option for gcclangjit
This option can be used to set the “jit” language which enable the
libgccjit functionality. Also adds a “libgccjit” attr which is gcc
built with just jit enabled.
2020-05-06 23:12:17 -05:00
Matthew Bauer
9c4fbf9cb1 gcc: don’t require "lib" output
libgccjit is a library but is used as a compiler. So it references a
bunch of compiler things in $out. To avoid a cycle, we need to put
everything in $out, so referenced to $lib need to be replaced with
${!outputLib}.
2020-05-05 22:23:26 -05:00
Lars Jellema
8e79583510 gnat: init at 9.3.0 2020-04-20 14:41:22 +02:00
Michael Reilly
84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
Vladimír Čunát
4e6a21dbec
Merge #82510: gcc: fix building cross on 32-bit host
... into staging
2020-03-22 08:44:40 +01:00
Maximilian Bosch
1688d38004
gcc9: 9.2.0 -> 9.3.0 2020-03-14 06:28:18 +01:00
Ben Wolsieffer
83fa0d9400 Revert "gcc: minimal hacky fixup for our pkgsi686Linux.nix"
This reverts commit b6ae8193ed.
2020-03-13 17:46:55 -04:00
Vladimír Čunát
e1d58266d5
gcc: tweak platform condition in the hack from b6ae8193
It was rightly noted that armv7l suffers from the same issue:
https://hydra.nixos.org/build/114263466#tabs-buildsteps
2020-03-13 12:27:02 +01:00
Vladimír Čunát
b6ae8193ed
gcc: minimal hacky fixup for our pkgsi686Linux.nix
This has been blocking nixos-unstable channel through i686 ISO:
Fixes #82435, closes #82436.
https://hydra.nixos.org/build/114512204
2020-03-13 08:37:41 +01:00
Robin Gloster
755db0b689
treewide: installTargets is a list 2019-12-31 00:25:26 +01:00
John Ericson
6d3b7458cc
Merge pull request #74065 from Ericson2314/cc-versions
compilers, binutils: Add version and pname
2019-11-24 18:35:13 -05:00
Craig Hall
26ab4a37ae gcc: Use pname 2019-11-24 18:32:26 +00:00
Craig Hall
eea6fc4cf9 gcc: Add version attribute 2019-11-24 18:32:26 +00:00
John Ericson
195c263a81
Merge pull request #74016 from Ericson2314/gcc-fix-cross-name
gcc: Fix cross names
2019-11-24 11:03:07 -05:00
Craig Hall
62d6429793 gcc: Fix cross names
There was an issue with the dashes.

(taken from commit e158e113a6b74f6cd0e1de9e976b882a03714bf8)
2019-11-24 05:18:50 +00:00
John Ericson
16f0fe7fe3 Merge remote-tracking branch 'upstream/master' into mingw-mcfthreads 2019-11-11 20:48:14 -05:00
John Ericson
04cb05d20c gcc: Build MinGW stage two with threading library
Currently this is set up to be mcfgthreads, but it could be something
else instead.
2019-11-11 11:02:38 -05:00
John Ericson
999ef20129 mingw-w64 libc: Multiple outputs and parallel builds
Also deduplicate more of the GCC derivations.
2019-11-11 00:25:24 -05:00
John Ericson
1782f6c826
Merge pull request #73184 from Ericson2314/gcc-fix-cross-whoops
gcc: Fix cross after I accidentally changed build target
2019-11-10 17:49:48 -05:00
John Ericson
3f74a4d066 gcc: Fix cross after I accidentally changed build target
I deleted "bootstrap", but forgot to make the condition
build = host = target.
2019-11-10 17:06:22 -05:00