Commit Graph

51 Commits

Author SHA1 Message Date
Randy Eckenrode
299c06a0f5 gcc{48,49,6,7,8,9,10}: improve cctools-llvm compatibility
darwin.cctools defaults to `llvm-strip` when the version of LLVM in the
stdenv is 12 or newer. This strip implementation does not support the
`-c` flag required by older versions of GCC. Use the cctools-port
version for compatibility when building older versions of GCC.
2023-11-08 10:50:07 +00:00
Randy Eckenrode
b09f87fb0d gcc48: disable on x86_64-darwin
According to Hydra, the last time GCC 4.8 successfully built on Darwin
was October 2014. It is possible to make the first stage build
successfully with clang, but the resulting GCC is not capable of reading
the Darwin SDK headers due to their use of `__can_include`.

It’s been broken for almost a decade, so just disable it.
2023-11-08 07:32:47 +00:00
Adam Joseph
78706a9184 gcc: move version information to gcc/versions.nix 2023-11-07 09:57:54 +00:00
github-actions[bot]
ab895db907
Merge staging-next into staging 2023-09-22 00:02:40 +00:00
Adam Joseph
ea61be413c gcc: set GFORTRAN_FOR_TARGET on cross-built native compilers
For a cross-built native compiler, i.e. build!=(host==target), the
bundled libgfortran needs a gfortran which can run on the
buildPlatform and emit code for the targetPlatform.  The compiler
which is built alongside gfortran in this configuration doesn't meet
that need: it runs on the hostPlatform.

This commit passes the necessary compiler via `GFORTRAN_FOR_TARGET`,
using `pkgsBuildTarget.gfortran`.
2023-09-21 09:24:56 +03:00
Artturi
2e705d027f
Merge pull request #250498 from amjoseph-nixpkgs/gcc/deduplicate/simplify2 2023-09-19 07:47:50 +03:00
John Ericson
e829eca886
Merge pull request #253939 from angerman/angerman/ucrt64
Add ucrt64 mingw toolchain.
2023-09-08 22:40:14 -04:00
Adam Joseph
aafab3b5b6 gcc: for cross compilers, don't build libgcc twice
Cross-compiled binaries currently end up with two different libgcc
outpaths in their closure.  This is harmless, but confusing.

The two libgccs are:

- One of them is the "first" targetPlatform libgcc, which is built
  by the "first" cross-compiler.  This "first libgcc" and "first
  compiler" are used to build the targetPlatform glibc.

- Once glibc is built, we *rebuild* the cross-compiler, since gcc
  can't enable most of its features unless you give it an
  already-compiled targetPlatform glibc.  When this "second"
  compiler is built, it also builds an extra copy of libgcc.

This commit discards the second, extra libgcc, and instead puts a
reference to the first (correct) libgcc into the "second compiler"
`.passthru.libgcc`, so that anybody expecting `stdenv.cc.cc.libgcc`
to exist will still find it there.

Closes #249680
2023-09-08 16:07:50 +03:00
Moritz Angermann
a81e3dcd75 treewide: replace libc == "msvcrt" with isMinGW
msvcrt is only one of the libcs in MinGW. We therefore
replace explictly testing for msvcrt with the isMinGW
predicate. This lays the foundation for ucrt64 support.
2023-09-08 10:56:08 +00:00
Adam Joseph
af319af225 gcc: unescapify backslash 2023-08-23 21:47:12 -07:00
Adam Joseph
80198b835b gcc: remove backticks-used-as-quotes (error prone) 2023-08-23 21:47:12 -07:00
Adam Joseph
040cf4248d gcc: simplify expression by applying workarounds more broadly
This commit simplifies our gcc expression by applying various
workarounds unconditionally, rather than only to exactly the
versions which applied them prior to the deduplication cleanup.

Unlike its predecessors https://github.com/NixOS/nixpkgs/pull/249707
and https://github.com/NixOS/nixpkgs/pull/250489 this commit *does*
affect eval.
2023-08-23 21:47:12 -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
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
Adam Joseph
fa0fc88e0c gcc: match weird whack-a-mole per-version hash algorithm 2023-08-20 22:59:20 -07:00
Adam Joseph
869b639285 gcc: clean up version conditions 2023-08-20 22:59:20 -07:00
Adam Joseph
02198751fa gcc: move version-map out of all-packages.nix, into pkgs/ 2023-08-20 22:59:20 -07:00
Adam Joseph
7367bb691d gcc: move patches attribute into patches/ subdirectory 2023-08-20 22:59:19 -07:00
Adam Joseph
da87387073 gcc: if atLeast 4.8, use deduplicated version 2023-08-20 22:59:16 -07:00
Adam Joseph
8a4148a538 gcc: if atLeast 4.9, use deduplicated version 2023-08-20 22:59:16 -07:00
Adam Joseph
b505fb4711 gcc: if atLeast 6, use deduplicated version 2023-08-20 22:59:16 -07:00
Adam Joseph
b3d07e87d2 gcc: if atLeast 7, use deduplicated version 2023-08-20 22:59:15 -07:00
Adam Joseph
942d7ecf08 gcc: if atLeast 8, use deduplicated version 2023-08-20 22:59:15 -07:00
Adam Joseph
01902c7b45 gcc: if atLeast 9, use deduplicated version 2023-08-20 22:59:15 -07:00
Adam Joseph
c72e136046 gcc: if atLeast 10, use deduplicated version 2023-08-20 22:59:15 -07:00
Adam Joseph
8a822d6e5d gcc: if atLeast 11, use deduplicated version 2023-08-20 22:59:14 -07:00
Adam Joseph
dc3eb566d1 gcc: if atLeast 12, use deduplicated version 2023-08-20 22:59:14 -07:00
Adam Joseph
59daa06947 gcc: default.nix: parameterize by version 2023-08-20 22:52:41 -07:00
Adam Joseph
2e16ac593a gcc: default.nix: replace ../ with ./ 2023-08-20 22:52:40 -07:00
Adam Joseph
0f7bf37e5a gcc: cp ./13/default.nix ./default.nix 2023-08-20 22:52:40 -07:00
Eelco Dolstra
1ab4a9324c * The `patch' command is now part of stdenv, so it no longer needs to
be passed to derivations that need to apply patches.
* GCC 3.4 is now the default compiler (old GCC renamed to `gcc-3.3').
* The temporary GCCs built during the stdenvLinux bootstrap are now
  built without C++ support and without profiling.
* Remove fixincl in GCC 3.4 to prevent a retained dependency on the
  previous GCC.
* Always set $prefix in setup.sh, even when there is no configure
  script.

svn path=/nixpkgs/trunk/; revision=1444
2004-09-18 17:23:18 +00:00
Eelco Dolstra
12ae5363ea * Remove trivial builders.
* Make builders unexecutable by removing the hash-bang line and
  execute permission.
* Convert calls to `derivation' to `mkDerivation'.
* Remove `system' and `stdenv' attributes from calls to
  `mkDerivation'.  These transformations were all done automatically,
  so it is quite possible I broke stuff.
* Put the `mkDerivation' function in stdenv/generic.

svn path=/nixpkgs/trunk/; revision=874
2004-03-29 17:23:01 +00:00
Eelco Dolstra
8c4a80b585 * Upgrade to gcc 3.3.3. Starting at 3.3.3, the gcc makefile checks
whether the system header file directory actually exists (when
  calling fixinc), so passing a non-existent directory no longer
  works.  Instead we make a empty dummy directory.

svn path=/nixpkgs/trunk/; revision=858
2004-03-27 16:35:59 +00:00
Eelco Dolstra
de13527000 * Finally got stdenv-nix-linux working again. Still not perfect,
though.
* libxml2: upgrade to latest.
* octavefront/rna: keep debug info.

svn path=/nixpkgs/trunk/; revision=830
2004-03-11 17:26:14 +00:00
Eelco Dolstra
a1b3ae0c81 * stdenv-nix-linux should more-or-less work again now.
svn path=/nixpkgs/trunk/; revision=826
2004-03-09 17:16:02 +00:00
Eelco Dolstra
ab73ec398b * Removed the old gcc.
svn path=/nixpkgs/trunk/; revision=825
2004-03-09 17:10:23 +00:00