Commit Graph

943 Commits

Author SHA1 Message Date
Francesco Gazzetta
6436bdeb7f gcc: add langD support to gcc 10 2022-05-23 16:09:25 +02:00
Sergei Trofimovich
857a06674d
Merge pull request #173817 from trofi/fix-gcc-12-on-darwin
gcc12: fix substituteInPlace on darwin
2022-05-21 06:42:58 +00:00
Sergei Trofimovich
5d2d60e3e2 gcc12: fix substituteInPlace on darwin
gcc-12 did a mass rename from .c to .cc c++ files. As a result build fails as:

    substitute(): ERROR: file 'gcc/config/darwin-c.c' does not exist

Closes: https://github.com/NixOS/nixpkgs/issues/172877
2022-05-20 23:59:36 +01:00
Francesco Gazzetta
c6ea401438 gdc: match gcc version
Programs compiled with gdc (such as tumiki-fighters and torus-trooper)
that depend on c++ libraries were failing with errors such as

/nix/store/3fqi6nigj8dkbvjnw8y4dy59gkq8vsj4-binutils-2.38/bin/ld: /nix/store/36960p41h83cwkcs2vpzg8ni39w4sc5m-bulletml-0.0.6/lib/libbulletml.so: undefined reference to `std::__throw_bad_array_new_length()@GLIBCXX_3.4.29'

because of the mismatch with the gcc version used to compile the
libraries.

This commit unpins the gcc version gdc is based on, so they are kept in
sync.

gdc9 was removed since no other package depends specifically on that
version
2022-05-20 13:49:55 +02:00
Vladimír Čunát
148df9e42e
Merge #171830: gcc12, gfortran12, gnat12: init at 12.1.0 2022-05-10 10:59:28 +02:00
Sergei Trofimovich
c34a8024bf gcc12, gfortran12, gnat12: init at 12.1.0
A copy of gcc11 with minor patch changes:
- follow .c/.cc rename upstream
- made patches unconditional

Changes: https://www.gnu.org/software/gcc/gcc-12/changes.html
2022-05-07 13:50:47 +01:00
Vladimír Čunát
005e2edc05
Merge #171792: gcc11: downgrade to 11.2.0 on x86_64-darwin
...into staging-next
2022-05-07 08:19:02 +02:00
github-actions[bot]
6e0aca3c43
Merge master into staging-next 2022-05-06 12:02:02 +00:00
Vladimír Čunát
976e65456a
gcc11: downgrade to 11.2.0 also on x86_64-darwin
https://hydra.nixos.org/build/175546330
2022-05-06 11:43:07 +02:00
Thomas Watson
ec87e38d65 Revert "gcc: 11.2.0 -> 11.3.0" for aarch64-darwin
Patches to support GCC 11.3.0 on aarch64-darwin are not available. Homebrew
also is skipping the 11.3.0 upgrade.
2022-05-05 08:11:09 -05:00
Sergei Trofimovich
cb03b37927 pkgsCross.mingw32.gcc11Stdenv: update mcfgthread patches for gcc-11
Without the change mingw32-gcc fails to build as:

    In file included from /build/gcc-11.2.0/libstdc++-v3/libsupc++/cxxabi.h:49,
                     from ../../../../gcc-11.2.0/libstdc++-v3/libsupc++/atexit_thread.cc:24:
    ../../../../gcc-11.2.0/libstdc++-v3/libsupc++/atexit_thread.cc:36:3: error: 'int __cxxabiv1::__cxa_thread_atexit(void (*)(void*), void*, void*)' should have been declared inside '__cxxabiv1'
       36 |   _GLIBCXX_NOTHROW
          |   ^~~~~~~~~~~~~~~~
    ../../../../gcc-11.2.0/libstdc++-v3/libsupc++/atexit_thread.cc:34:1: error: conflicting declaration of C function 'int __cxxabiv1::__cxa_thread_atexit(void (*)(void*), void*, void*)'
       34 | __cxxabiv1::__cxa_thread_atexit (void (*dtor)(void *),
          | ^~~~~~~~~~

The change follows upstream change introduced in
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=7fc0f78c3f43af1967cb7b1ee8f4947f3b890aa2
2022-05-01 15:34:22 +01:00
Vladimír Čunát
cfcccfa572
Merge #170121: gcc: 11.2.0 -> 11.3.0 (into staging) 2022-04-29 08:18:04 +02:00
Sergei Trofimovich
e35682b207 gcc: 11.2.0 -> 11.3.0
Bug fix release.

Changes: https://gcc.gnu.org/gcc-11/changes.html (11.3 link below).
2022-04-24 19:12:51 +01:00
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
Tobias Mayer
d09936ea84
gcc10: 10.2 -> 10.3 2021-04-12 12:22:31 +02:00
John Ericson
e6ca7b6e5b
Merge pull request #113747 from r-burns/nixpkgs-gcc-decfloat
gcc: don't disable decimal-float when cross-compiling
2021-03-21 13:27:43 -04: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
Jörg Thalheim
766246c6df
Merge pull request #112843 from r-burns/gcc-ppc-m32
gcc: support -m32 on ppc64le
2021-02-27 22:23:36 +00:00
adisbladis
a439e0ef6e
gcc10: Pass langJit to preConfigure
This should fix libgccjit on darwin.
2021-02-26 12:10:44 +02:00
Ryan Burns
f74c281386 gcc: don't disable decimal-float when cross-compiling
This causes some minor ugliness during stdenv bootstrap on powerpc64le
using cross-compiled bootstrap tools. MPFR wants to use decimal floats
by default so they have to be manually disabled in the configure flags
when using cross-compiled bootstrap tools.

The lineage of this particular configure flag traces back to 2010 (!)
It was added in commit: 9b1d5353a9
I've built various cross bootstrap tools and they seem to work fine,
so I don't think this is needed anymore.
2021-02-19 18:42:25 -08:00
Symphorien Gibol
d68dee04b7 gcc: fix cross compilation to musl32 2021-02-12 21:11:16 +01:00
Walter Franzini
733d24b50b add stackprotector support on musl32
In order to support stackprotector on musl32, this change import a
couple of patches from alpinelinux:
1. libssp_nonshared.a is built alongside musl's libc
2. the above library is automatically linked when compiling with gcc6
   or gcc7
2021-02-12 21:11:16 +01:00
Ryan Burns
f2ac16ec28 gcc: support -m32 on ppc64le
This is needed to build grub2 for powerpc64le hosts. Running powerpcle code
on powerpc64le is somewhat analogous to running multiarch i686 code on x86_64,
so it's also useful to have in general.
2021-02-11 17:33:24 -08: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
5530a3adbe gcc: fix powerpc64-linux
Long-double-128 is a hardware feature independent of endianness
2021-01-30 12:34:30 -08: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
Jan Tojnar
01ee4ea574
Merge branch 'master' into staging-next 2021-01-24 00:09:45 +01:00
John Ericson
12881a7aa7
Merge pull request #110544 from Ericson2314/no-platform
top-level, lib: Remove platform attribute of platforms
2021-01-23 16:32:36 -05:00
John Ericson
9c213398b3 lib: Clean up how linux and gcc config is specified
Second attempt of 8929989614589ee3acd070a6409b2b9700c92d65; see that
commit for details.

This reverts commit 0bc275e634.
2021-01-23 10:01:28 -05: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
Jonathan Ringer
0bc275e634
Revert "lib: Clean up how linux and gcc config is specified"
This is a stdenv-rebuild, and should not be merged
into master

This reverts commit 8929989614.
2021-01-22 14:07:06 -08:00
John Ericson
8929989614 lib: Clean up how linux and gcc config is specified
The `platform` field is pointless nesting: it's just stuff that happens
to be defined together, and that should be an implementation detail.

This instead makes `linux-kernel` and `gcc` top level fields in platform
configs. They join `rustc` there [all are optional], which was put there
and not in `platform` in anticipation of a change like this.

`linux-kernel.arch` in particular also becomes `linuxArch`, to match the
other `*Arch`es.

The next step after is this to combine the *specific* machines from
`lib.systems.platforms` with `lib.systems.examples`, keeping just the
"multiplatform" ones for defaulting.
2021-01-21 22:44:09 -05: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
Jonathan Ringer
9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00
github-actions[bot]
92f5b04596
Merge staging-next into staging 2021-01-04 06:25:40 +00:00
Kira Bruneau
f0c6e40948 gcc10: fix MinGW build & use local copy of mcfgthread patches 2021-01-03 23:04:37 -05:00
github-actions[bot]
581059aed4
Merge staging-next into staging 2021-01-04 00:57:38 +00: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
John Ericson
0df75bc04e gcc 8, 10: tabs -> spaces 2021-01-03 19:14:56 +00:00
Jörg Thalheim
c417247cf1
Merge pull request #107596 from Mic92/fix-static-pie-take2
bintools-wrapper: skip dynamic linker for static binaries
2020-12-30 06:23:09 +00:00
luc65r
f6fceb321b Remove trailing whitespaces and fix indentation 2020-12-28 08:43:32 +01:00
luc65r
b1b3ca7907 gcc: make -fcommon default on gcc10 2020-12-28 08:43:31 +01:00
Jörg Thalheim
61bbbcd1af
bintools-wrapper: skip dynamic linker for static binaries 2020-12-27 16:42:11 +01: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
Vladimír Čunát
336bc8283b
Re-Revert "Merge #101508: libraw: 0.20.0 -> 0.20.2"
This reverts commit c778945806.

I believe this is exactly what brings the staging branch into
the right shape after the last merge from master (through staging-next);
otherwise part of staging changes would be lost
(due to being already reachable from master but reverted).
2020-10-26 08:19:17 +01:00
Vladimír Čunát
c778945806
Revert "Merge #101508: libraw: 0.20.0 -> 0.20.2"
I'm sorry; I didn't notice it contained staging commits.

This reverts commit 17f5305b6c, reversing
changes made to a8a018ddc0.
2020-10-25 09:41:51 +01:00
Vladimír Čunát
5aca3498a6
Merge #92704: gcc: Improve manpage symlinks 2020-10-18 11:56:39 +02:00
Vladimír Čunát
51ccf2d4ba
gcc10: 10.1.0 -> 10.2.0
It's supposed to be just bugfixes.  I tested building some projects with
gcc10.  Also gfortran10 still builds.  I don't expect issues.
This causes basically no rebuilds, as we use 9 by default.
2020-09-12 11:54:39 +02: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
0b8312660a gcc10: fix building darwin->linux cross compiler
same as 459c60dda2 but for gcc10
2020-08-26 16:15:05 -05:00
Matthew Bauer
872b23d214 Merge remote-tracking branch 'origin/master' into gcc-cross 2020-08-26 16:10:02 -05:00
Andreas Fuchs
1759959863 gcc: On darwin, adjust IDs of installed .so files also
Turns out that libgccjit gets installed as a .so file, which the gcc
builder.sh didn't change: It only touched .dylib files; that means
that anything linking in libgccjit.so would receive an "Image not
found" error at load time.

With this change, we invoke `install_name_tool` on .so files too,
adjusting their dynamic linker ID, so that they too can be found.
2020-08-25 08:12:35 -04:00
Andreas Fuchs
038e86ffbb gcc: Fix building libgccjit on darwin, using strip -x
The default `strip` invocation tries to strip global symbols from the
library, and refuses because those are indirect symbol table
references.
2020-08-25 08:12:35 -04: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
John Ericson
cd719c1eae
Merge pull request #91974 from Mic92/nostdinc
stdenv: make -nostdinc work as intended
2020-07-28 19:49:42 -04:00
Jörg Thalheim
9f5d38e751
Merge pull request #82921 from Calvin-L/fix-gcc-on-catalina
Fix GCC compilation on MacOS 10.15
2020-07-23 11:30:23 +01:00
Jörg Thalheim
96092dc936
stdenv: make -nostdinc work as intended
Right now we add glibc to search path also -nostdinc was provided,
which breaks projects providing their own gcc.
2020-07-23 08:39:46 +01:00
Aaron Janse
60fd049b65 redox: add as target 2020-07-21 13:11:36 -07:00
Alexandria Corkwell
eed46887ca
gcc: fix manpage symlinks when arch tuple is in the file name
In some cases, such as when building cross compilers, the binaries and
manpages contain the target architecture tuple, such as
`i686-w64-mingw32-g++.1`.

Ensure the symlink created to save space with the duplicated manpage
(`g++.1 -> gcc.1`) properly handles such cases and generates symlinks
such as `i686-w64-mingw32-g++.1 -> i686-w64-mingw32-gcc.1`.
Previously in such cases, a broken `gcc.1` link would be created
instead.
2020-07-08 06:35:13 -04:00
Maximilian Bosch
114f97e77e
gcc49: fix build w/glibc-2.31
The same `libsanitizer` problem as in llvm<10 and newer GCCs.

https://hydra.nixos.org/build/122902814
https://hydra.nixos.org/build/122903349
2020-06-29 14:41:43 +02:00
Maximilian Bosch
d348694fb6
gcc6: fix build w/glibc-2.31 2020-06-29 14:41:42 +02:00
Maximilian Bosch
cff1a1eefc
gcc7: fix build w/glibc-2.31
Applied a patch from the `gcc9` branch for `gcc7` to fix `libsanitizer`
for glibc-2.31.
2020-06-29 14:41:42 +02:00
John Ericson
f3f7612a40 C++ Compilers: Systematize handling of standard libraries 2020-06-22 04:24:44 +00:00
Frederik Rietdijk
dc33419285 Merge master into staging-next 2020-06-08 12:06:12 +02:00
Moritz Angermann
f2a33e4486
Update configure-flags.nix 2020-06-08 12:43:58 +08:00
Moritz Angermann
58ffaee5d7
Update configure-flags.nix 2020-06-08 12:40:38 +08:00
Michael Bishop
e27e475f0d
rust: fix rust cross-compile
reasoning:
sjlj (short jump long jump) exception handling makes no sense on x86_64, it's forcably slowing programs down as it produces a constant overhead. On x86_64 we have SEH (Structured Exception Handling) and we should use that. On i686, we do not have SEH, and have to use sjlj with dwarf2. Hence it's now conditional on x86_32
2020-06-05 23:34:38 -03:00
Frederik Rietdijk
03de4c02fb Merge staging-next into staging 2020-05-28 22:05:36 +02:00
Frederik Rietdijk
e27e3ae169 Merge master into staging-next 2020-05-28 22:03:48 +02:00
Tobias Mayer
2be2b5328c
gcc: optimize cross-compiled libraries
`libstdc++` and a few other libraries are comiled with the options
set in `EXTRA_TARGET_FLAGS`. Normally, this is filled form
`EXTRA_FLAGS` inside of `builder.sh`, from which it inherits its
optimization option. For cross compilers `EXTRA_TARGET_FLAGS` is
set by a dedicated function that does not specify any optimization,
leading to sub-par runtime performance of many C++ programs.
2020-05-27 10:07:01 +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
Cole Helbling
f7a93031a2
gcc10: fix eval due to missing langJit
The libgccjit PR was merged after the one introducing gcc10, thus
staging fails to eval because of the missing `langJit` argument.
2020-05-11 16:49:19 -07:00
Frederik Rietdijk
4ddd080d19 Merge staging-next into staging 2020-05-10 09:45:44 +02:00
Vladimír Čunát
da59984d36
gcc10, gfortran10, gnat10: init at 10.1.0
Everything is copied as-is from 9 (except version and hash).
Some platform-specific patches might not apply anymore;
I'm lazily leaving that for the community to fix.
2020-05-08 07:49:35 +02: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
John Ericson
c8a6ea5161 Merge remote-tracking branch 'upstream/master' into staging 2020-04-13 22:17:15 -04:00
Travis Whitaker
74f3b25896 LLVM: Always pass host/target info to compiler-rt/libstdcxxClang 2020-04-13 18:49:27 -04:00
Jan Tojnar
b4a6714571
Merge branch 'staging-next' into staging 2020-04-13 18:54:59 +02:00
Matthew Bauer
53752d0374
Merge pull request #83181 from matthewbauer/move-win-outputs
gcc: move .dll.a* outputs to $lib
2020-04-10 23:44:06 -04:00
Michael Reilly
84cf00f980
treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
Matthew Bauer
c304c1e7d0 gcc: move .dll.a* outputs to $lib
These are expected to be here for Windows compilation. The change in
e1831ebea3 didn’t move these
correctly (while still patching the search paths).

https://hydra.nixos.org/build/114202790
2020-03-23 00:43:57 -04:00
Orivej Desh
1b89aa3f7a Merge branch 'master' into staging 2020-03-23 00:53:16 +00: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
Calvin Loncaric
3a79681eb4
GCC: fix compilation on MacOS 10.15
MacOS 10.15 now includes "aligned_alloc".  Disagreement between the
headers and the binaries about whether aligned_alloc exists leads to
a compilation failure (see #73319 and the detailed comment in this
commit).
2020-03-18 21:15:43 -07:00
Vladimír Čunát
c5f663ff30
gcc8: 8.3.0 -> 8.4.0
https://gcc.gnu.org/legacy-ml/gcc/2020-03/msg00042.html
2020-03-15 20:19:11 +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
Ben Wolsieffer
c0008c5b63 gcc: fix musl cross-compiler on i686 2020-03-13 17:40:37 -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
Ben Wolsieffer
d9feea58ae gcc: remove unneeded RPATH patching 2020-03-05 14:56:52 -05:00
Ben Wolsieffer
e1831ebea3 gcc: move target-specific runtime libraries to separate output 2020-03-04 16:12:36 -05:00
Dmitry Kalinkin
c65ddd0d5e
gcc49.cc: add myself to maintainers 2020-02-09 21:37:06 -05:00
Maximilian Bosch
dd6a291e9f
gcc-snapshot: remove
Package is marked as broken for >2 years and used a fairly old
snapshot from the gcc7-branch, so I fairly doubt that this is
somewhere used (and is also pretty misleading as you don't expect a
random snapshot from gcc7 at `pkgs.gcc-snapshot`).
2020-02-09 22:46:29 +01:00
Maximilian Bosch
295a52fc1a
gcc49: fix build for glibc>=2.28
Co-authored-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
2020-01-28 20:11:02 +01:00
Maximilian Bosch
79a567c883
gcc5: remove
Latest gcc5 release was in 2017[1], doesn't build with glibc 2.30[2].

[1] https://gcc.gnu.org/gcc-5/
[2] https://hydra.nixos.org/build/110408216
2020-01-28 20:11:00 +01:00
Robin Gloster
e9c27ed5f9
treewide: configureFlags is a flat list 2019-12-31 01:34:39 +01:00
Robin Gloster
755db0b689
treewide: installTargets is a list 2019-12-31 00:25:26 +01:00
Robin Gloster
ba0a3edf7f
stdenv: installTargets is a list 2019-12-31 00:24:02 +01:00
Vladimír Čunát
7139b127b3
gcc7: 7.4.0 -> 7.5.0
It's bugfix-only; these tend to be fairly safe,
and we don't really use gcc7 anymore by default.
I tested building gcc7 and gfortran7 on x86_64-linux.
https://gcc.gnu.org/ml/gcc-announce/2019/msg00003.html
2019-12-16 11:40:59 +01:00
John Ericson
f191360ad0 Merge remote-tracking branch 'upstream/staging-next' into staging 2019-11-25 15:59:05 -05: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
John Ericson
814f9104d7
Merge pull request #72657 from cleverca22/vc4
Initial implementation of vc4 cross-compile
2019-11-24 16:04:15 -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 e158e113a6)
2019-11-24 05:18:50 +00:00
Michael Bishop
4aa1ffae04
initial implementation of vc4 cross-compile 2019-11-19 22:19:15 -04:00
Matthew Bauer
93fd7d8888
Merge pull request #73291 from obsidiansystems/fix-gcj
GCC 6: Fix java support
2019-11-12 11:10:34 -05:00
John Ericson
903bdf1709 GCC 6: Fix java support
Major version upper bound was one too low.
2019-11-12 09:56:43 -05: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
John Ericson
62e154ff8d Merge remote-tracking branch 'upstream/master' into gcc-dedup-configure-flags 2019-11-10 16:12:25 -05:00
John Ericson
5c5ca018c8 gcc: Deduplicate configureFlags
Thanks again to @bgamari who in 1c1207220f
did the cleanup to make this possible. It's been a long time coming!
2019-11-10 15:58:35 -05:00
John Ericson
f666c61d20 gcc: Deduplicate preConfigure 2019-11-10 15:15:04 -05:00
John Ericson
f5ddd103e7
Merge pull request #73173 from Ericson2314/gcc-cross-cleanup
gcc: Clean up cross configure flags and name prefix
2019-11-10 15:05:18 -05:00
John Ericson
ca341c2d5b gcc: Clean up cross configure flags and name prefix 2019-11-10 14:29:11 -05:00
Frederik Rietdijk
458964dea2 gcc8: make building w/LTO support optional, fixes eval 2019-11-03 16:04:52 +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
Vladimír Čunát
6c567ed797
Merge branch 'staging-next' into staging 2019-09-22 10:06:45 +02:00
Matthew Bauer
7b58739e2c gcc: fix mising avr limits.h
Fixes #69172
2019-09-20 22:37:00 -04:00
Matthew Bauer
9bdfcf2218 gcc: use gcc8 on darwin 2019-09-17 21:03:08 -04:00
Frederik Rietdijk
e68505e735 Merge remote-tracking branch 'upstream/gcc8' into staging-next 2019-09-06 23:25:18 +02:00
Jan Tojnar
72e7d569a7
tree-wide: s/GTK+/GTK/g
GTK was renamed.
2019-09-06 02:54:53 +02:00
xbreak
549cbc0f48 gcc: 9.1.0 -> 9.2.0
gcc 9.2.0 is a bug-fix release.
2019-08-18 15:39:54 +00:00
Dmitry Kalinkin
bf1818dd5d
gcc48, gfortran48: add myself as maintainer
cc #61130
2019-05-08 19:12:55 -04:00
Will Dietz
5964b3a2e2
gcc9: drop gomp patch (musl)
https://github.com/NixOS/nixpkgs/pull/60860#issuecomment-489495120
2019-05-08 09:20:19 +02:00
Eelco Dolstra
f7d3fb876a
Merge pull request #60860 from vcunat/p/gcc9
gcc9: init at 9.1.0 (released today)
2019-05-07 23:58:47 +02:00
Vladimír Čunát
18d975aff2
gcc9: init at 9.1.0 (released today)
It's just a trivial copy of whole gcc8 stuff,
only with changed version string and hash.
2019-05-03 12:34:40 +02:00
Matthew Bauer
87944c3125
Merge pull request #56744 from matthewbauer/macos-10-12
Update macOS to 10.12
2019-04-26 22:20:03 -04:00
Matthew Bauer
da38a49a24 treewide: mark bad packages
Some old stuff is known not to work.
2019-04-26 21:55:11 -04:00
Matthew Bauer
84d00355e8 Merge remote-tracking branch 'NixOS/master' into staging 2019-04-23 22:00:42 -04:00
Daniel Schaefer
bac4d95aa2 treewide: Change URLs to HTTPS
Lots of URLs were HTTP redirect to HTTPS. Changed those and checked them
if there's actual content. Inspired by
https://github.com/NixOS/nixpkgs/issues/60004
2019-04-22 10:19:54 +02:00
volth
5d87bc2650 fix bootstrap when platform.gcc.arch=="skylake" 2019-04-21 16:37:49 +00:00
Vladimír Čunát
2771375d6e
Merge branch 'master' into staging-next
Hydra nixpkgs: ?compare=1512490
2019-04-02 20:56:53 +02:00
John Ericson
4ccb74011f Merge commit '18aa59b0f26fc707e7313f8467e67159e61600c2' from master into staging
There was one conflict in the NixOS manual; I checked that it still
built after resolving it.
2019-04-01 00:40:03 -04:00
arcnmx
05b0411c57 gcc: fix gcc8 for cross-compiled targets
Adds EXTRA_TARGET_FLAGS missing from 412093994b.

Fixes #58164
2019-03-25 17:57:30 -07:00
Matthew Bauer
aab8c7ba43 netbsd: add cross target 2019-02-26 15:55:47 -05:00
Will Dietz
663bfb120d gcc: 8.2.0 -> 8.3.0
https://gcc.gnu.org/ml/gcc/2019-02/msg00121.html
2019-02-22 15:38:39 -06:00
Alyssa Ross
21d991b1fd
Merge pull request #54578 from alyssais/gcj-darwin
gcj: fix build on Darwin
2019-02-08 16:54:35 +00:00
Vladimír Čunát
5effa4e0f9
Merge branch 'master' into staging-next
Comments on conflicts:
- llvm: d6f401e1 vs. 469ecc70 - docs for 6 and 7 say the default is
  to build all targets, so we should be fine
- some pypi hashes: they were equivalent, just base16 vs. base32
2019-02-01 09:22:29 +01:00
Alyssa Ross
b9b83748f3
gcj: fix build on Darwin
Partially addresses https://github.com/NixOS/nixpkgs/issues/29715.
2019-01-30 18:19:17 +00:00
Matthew Bauer
f9ed5e0089 libstdcxx: don’t set stdlib automatically
We don’t need to set -stdlib=libstdc++. This only works on Clang so it
is not good to set it globally. In addition, Clang knows to use
libstdc++ on Linux by default if no stdlib is set:

324f918438/lib/Driver/ToolChains/Linux.cpp (L456)

It’s a good policy to just leave off stdlib for now.

Fixes #29877.
2019-01-26 01:55:57 -05:00
Daniel Goertzen
1c10efc912 add generic x86_32 support (#52634)
* add generic x86_32 support

- Add support for i386-i586.
- Add `isx86_32` predicate that can replace most uses of `isi686`.
- `isi686` is reinterpreted to mean "exactly i686 arch, and not say i585 or i386".
- This branch was used to build working i586 kernel running on i586 hardware.

* revert `isi[345]86`, remove dead code

- Remove changes to dead code in `doubles.nix` and `for-meta.nix`.
- Remove `isi[345]86` predicates since other cpu families don't have specific model predicates.

* remove i386-linux since linux not supported on that cpu
2019-01-06 12:57:36 -06:00
Lengyel Balazs
f4a53ff3bc treewide/xorg: replace *proto with xorgproto 2019-01-04 14:38:57 +01:00
Will Dietz
ee25d916ee gcc: 7.3 -> 7.4
https://gcc.gnu.org/gcc-7/changes.html
2018-12-29 13:55:20 -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
c0bw3b
0498ccd076 Treewide: use HTTPS on GNU domains
HTTP -> HTTPS for :
- http://gnu.org/
- http://www.gnu.org/
- http://elpa.gnu.org/
- http://lists.gnu.org/
- http://gcc.gnu.org/
- http://ftp.gnu.org/ (except in fetchurl mirrors)
- http://bugs.gnu.org/
2018-12-02 15:51:59 +01:00
Matthew Bauer
76c956be5c treewide: disable pie in more places
Some packages don’t work correctly with pie. Here I disable it for:

- busybox
- linux kernel
- kexectools

I also get rid of the Musl conditional for disabling pie in GCC and
Binutils. Some day we might want to enable PIE without Musl and it
will be useful to have the *just* work with our compiler and linkers.
2018-11-13 07:03:31 -06:00
Frederik Rietdijk
53d00c3351 Merge master into staging-next 2018-11-10 11:08:54 +01:00
Matthew Bauer
2e2afa1943 gcc/binutils: disable pie hardening
These don’t like having -fPIE set for them. We should disable
hardening all the time, but in the interest of not changing hashes,
this only disables it for Musl (where it is now the default).

(cherry picked from commit a3a6884649354a660326acd68c1bd08ffd2dcfa2)
2018-11-09 13:55:35 -06:00
Will Dietz
0c1b8e8770
Merge pull request #49455 from dtzWill/update/gcc-6.5
gcc6: 6.4.0 -> 6.5.0
2018-11-02 04:00:30 -05:00
Frederik Rietdijk
1d196d99be Merge staging-next into staging 2018-10-30 20:35:15 +01:00
Will Dietz
00a51a9669 gcc6: don't apply patches included in update to 6.5 2018-10-30 07:48:07 -05:00
Will Dietz
d2e78403a8 gcc6: 6.4.0 -> 6.5.0
http://lists.gnu.org/archive/html/info-gnu/2018-10/msg00003.html
2018-10-30 07:43:01 -05:00
Matthew Bauer
412093994b gcc: support avr
- respect libc’s incdir and libdir
- make non-unix systems single threaded
- set LIMITS_H_TEST to false for avr
- misc updates to support new libc’s
- use multilib with avr

For threads we want to use:
- posix on unix systems
- win32 on windows
- single on everything else

For avr:
- add library directories for avrlibc
- to disable relro and bind
- avr5 should have precedence over avr3 - otherwise gcc uses the wrong one
2018-10-29 14:34:09 -05:00
Michael Raskin
4a854344b7
Merge pull request #48721 from oxij/tree/mass-rebuild-complicated-cleanups
treewide: mass rebuild complicated cleanups
2018-10-29 19:17:28 +00:00
Jan Malakhovski
eae890db12 gcc-*: homogenize and cleanup expressions with a mass rebuild 2018-10-21 18:26:37 +00:00
John Ericson
c701d6cb21 Merge remote-tracking branch 'upstream/master' into staging 2018-09-25 14:20:27 -04:00
Will Dietz
fecd326399 gcc{5,6,7,8}: share libgomp patch, propagate musl config flags 2018-09-25 00:08:17 -05:00
Will Dietz
e845be1756 gcc: fix libgomp to not use initial-exec
Only apply w/musl since while it's wrong everywhere it apparently
hasn't broken things entirely w/glibc so keep things as they were.

Patch regenerated from original so that it applies
which isn't saying much since it's simple :).

Source:

https://patchwork.ozlabs.org/patch/154298/

IRC chat on #musl with Rich and others endorses this,
at least at the conceptual level of no shared library
should be using initial-exec TLS.

Fixes various uses of libgomp that previously crashed (before 1.1.20)
or encounter errors (post-1.1.20), such as pythonPackages.cython .
2018-09-25 00:04:33 -05:00
Will Dietz
3ec0d14140 gcc7: more options for musl 2018-09-25 00:04:32 -05:00
Jan Malakhovski
e0b5919197 gcc-*: homogenize and cleanup expressions without a rebuild
Looks scary but it is a noop.
2018-09-23 20:56:19 +00:00
Jan Malakhovski
1abf1971cd gcc7: cleanup with a mass rebuild 2018-09-23 17:30:32 +00:00
John Ericson
b14db1b0ba gcc-*: Clean up crossStageStatic logic
54282b9610 tread carefuly to avoid a mass
rebuild. This embraces the mass rebuild to clean things up.
2018-09-23 17:30:32 +00:00
John Ericson
2091133e78 gcc: Clarify Disabling libmpx in cross stage static
This isn't a MUSL thing, but just needed for cross compilation to x86.
No one had tried this when all cross compilation was to linux + glibc,
hence why no one noticed this until recently.
2018-09-18 16:27:04 -04: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
Jörg Thalheim
9efffe0135 hurd: cleanup unmaintained target
This has been not touched in 6 years. Let's remove it to cause less
problems when adding new cross-compiling infrastructure.
This also simplify gcc significantly.
2018-08-28 22:18:02 +01: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
viric
5c77b9cddb
Merge pull request #43982 from viric/viric_clean
Take me (viric) out of most maintenance
2018-07-29 00:17:08 +02:00
Will Dietz
993937d09e gcc8: 8.1 -> 8.2
https://gcc.gnu.org/gcc-8/changes.html
2018-07-27 08:53:42 -05:00
Lluís Batlle i Rossell
66d7126255 Take me (viric) out of most maintenance
Since years I'm not maintaining anything of the list below other
than some updates when I needed them for some reason. Other people
is doing that maintenance on my behalf so I better take me out but
for very few packages. Finally!
2018-07-22 21:50:19 +02:00
volth
52f53c69ce pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
volth
87f5930c3f [bot]: remove unreferenced code 2018-07-20 18:48:37 +00:00
Daiderd Jordan
222524b5e6
gfortran: fix darwin build on hydra
All the warnings about unused -isystem arguments causes the build log to
exceed the hydra limit.
2018-06-24 15:02:49 +02:00
Vladimír Čunát
392e6de7d0
Merge branch 'master' into staging 2018-05-20 13:20:53 +02:00
Matthew Justin Bauer
2c7c9cbbac
gcc5: delete unused patch 2018-05-19 12:06:16 -05:00
Robert Schütz
90c0100139 Merge branch 'master' into staging 2018-05-19 11:12:19 +02:00
Matthew Justin Bauer
bd078c1a31
gcc5: remove patch
The patch fails to apply & may not be necessary any more. Trying to remove it for now just to see.

Hydra log: https://hydra.nixos.org/build/72726891/nixlog/1

Also see #33722

/cc @copumpkin
2018-05-18 17:03:35 -05:00
Tuomas Tynkkynen
6b6a575748 Merge remote-tracking branch 'upstream/master' into staging
Conflicts:
	pkgs/tools/networking/telnet/default.nix
	pkgs/top-level/aliases.nix
2018-05-16 03:09:33 +03:00
Bastian Köcher
780592ca6e gcc7: Enable arm erratum 843419 on aarch64
This fix is required for the raspherry pi 3 with glibc 2.27,
otherwise the kernel panics in initrd with:
```
<<< NixOS Stage 1 >>>

loading module dm_mod...
running udev...
kbd_mode: KDSKBMODE: Inappropriate ioctl for device
Gstarting device mapper and LVM...
[    1.969164] Kernel panic - not syncing: Attempted to kill init!
exitcode=0x0000000b
[    1.969164]
[    1.978476] CPU: 0 PID: 1 Comm: init Not tainted 4.16.8 #1-NixOS
[    1.984580] Hardware name: Raspberry Pi 3 Model B (DT)
[    1.989801] Call trace:
[    1.992301]  dump_backtrace+0x0/0x1c8
[    1.996025]  show_stack+0x24/0x30
[    1.999396]  dump_stack+0x9c/0xc0
[    2.002766]  panic+0x124/0x294
[    2.005872]  complete_and_exit+0x0/0x30
[    2.009771]  do_group_exit+0x40/0xa8
[    2.013406]  get_signal+0x280/0x5b0
[    2.016954]  do_signal+0x88/0x240
[    2.020325]  do_notify_resume+0xd8/0x130
[    2.024311]  work_pending+0x8/0x10
[    2.027774] SMP: stopping secondary CPUs
[    2.031763] Kernel Offset: disabled
[    2.035308] CPU features: 0x0802004
[    2.038850] Memory Limit: none
[    2.041963] ---[ end Kernel panic - not syncing: Attempted to kill
init! exitcode=0x0000000b
[    2.041963]
[    2.865264] random: crng init done
```
Suse has done the same to circumvent crashes with hostname resolving in
glibc 2.27 on aarch64.
2018-05-16 03:04:29 +03:00
Patrick Hilhorst
61411e57ec
Merge remote-tracking branch 'upstream/master' into gcc8 2018-05-15 21:37:03 +02:00
Patrick Hilhorst
87fd200b9a
gcc8: mark as broken on darwin 2018-05-14 21:28:17 +02:00
John Ericson
01a525b84e Merge remote-tracking branch 'upstream/master' into staging 2018-05-14 13:31:20 -04:00
John Ericson
bf7d1bae20 Merge remote-tracking branch 'upstream/master' into gcc-hurd-condition 2018-05-14 13:15:06 -04:00
John Ericson
3a9654bfe2 gcc: Simplify this old Hurd condition
Steps towards getting rid of crossConfig.
2018-05-14 13:13:11 -04: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