Commit graph

22 commits

Author SHA1 Message Date
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 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
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
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
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
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
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
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 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
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
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 4aa95e3312 gcc: native aarch64-darwin support 2021-05-10 19:07:30 -07:00
Ivan Babrou 8cf144d139 gnat11: extract gnat-cflags-11.patch from gnat-cflags.patch 2021-05-04 20:14:01 -07: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