Commit Graph

167 Commits

Author SHA1 Message Date
John Ericson
992bd2f6d3 Merge commit 'ab77a6bb1e7d2ff475210ad392f1a9bd1bb6ba3a' into gcc-simplify-flags 2017-12-05 17:41:15 -05:00
John Ericson
93cd0685c5 Merge commit '71186e73455a4e06e96a31da34b76f84e545ba1f' into gcc-simplify-flags 2017-12-05 17:09:41 -05:00
John Ericson
c9ca541994 Merge commit '198dceccbe5414a5fd72ca83624c0cc715db1aad' into gcc-simplify-flags 2017-12-05 16:55:11 -05:00
John Ericson
a3e35fbbe1 gcc: Use platformFlags in crossConfigureFlags
A nice code deduplication
2017-12-05 14:01:18 -05:00
John Ericson
1fe9798ac2 lib, gcc: No inherit (platform) gcc; in {host,build,target}Platform 2017-12-05 13:52:20 -05:00
John Ericson
74cbb5796e gcc: Get rid of crossAttrs.configureFlags 2017-12-04 20:50:59 -05:00
John Ericson
cabfe1885f gcc: Don't try to enable plugins with host != build 2017-12-04 16:27:18 -05:00
John Ericson
2fdca4db69 gcc: Lock down more tools for cross-builds
That is, build != host == target
2017-12-04 16:27:18 -05:00
Tuomas Tynkkynen
825b953bf5 gcc48: Reduce diff to gcc49 2017-11-29 23:09:17 +02:00
John Ericson
ab77a6bb1e gcc: Misc indentation and whitespace-in-string fixes 2017-11-14 18:32:50 -05:00
Ben Gamari
1c1207220f gcc: Refactor treatment of configure flags
Previously configureFlags was defined as one giant interpolated string.
Here we refactor this definition to instead use the usual stdenv string
combinators. This seems more in-line with the average nixpkgs expression
and it seems a bit more natural to things of these as lists of flags
rather than monolithic strings.
2017-11-14 16:23:46 -05:00
John Ericson
0101856765
Merge pull request #30549 from obsidiansystems/bintools
treewide: Introduce stdenv.cc.bintools
2017-11-08 14:20:48 -05:00
Vladimír Čunát
54c14e2fa3
gcc-4.8: fix with glibc-2.26 2017-11-07 14:53:10 +01:00
John Ericson
4d4f94cde4 treewide: Depend on targetPackages.stdenv.cc.bintools instead of binutils directly
One should do this when needed executables at run time. It is more
honest and cross-friendly than refering to binutils directly, if one
neeeds the default binary tools for the target platform, rather than
binutils in particular.
2017-11-05 17:10:53 -05:00
John Ericson
54282b9610 gcc: Change default of crossStageStatic param to false
This gets us one step closer to removing `gccCrossStageFinal`.

Care is taken to avoid a mass rebuild; will clean up with one later.
2017-09-21 15:49:18 -04:00
Tuomas Tynkkynen
0c0fad6141 treewide: Consistently call ARM 'arm'
No need for silly differences.
2017-08-24 01:17:01 +03:00
John Ericson
ebc9b161cd gcc: Add configurePlatforms exception for Arm 32
...just as we did for binutils. When the underlying issue is resolved
(probably with a configure script patch or lib/systems/parse.nix
change), this should be reverted.
2017-08-23 14:38:08 -04:00
John Ericson
71186e7345 gcc: Use configurePlatforms to control --build, --host, and --target 2017-08-23 14:28:59 -04:00
Vladimír Čunát
beaad85500
gcc-4.8: fix build
Problems: building with gcc-6 now, and fallout after output changes #27424.
2017-08-20 11:11:44 +02:00
John Ericson
b11889e6a4 gcc: Homogenize syntax in one small spot
Less noise in the diff help maintain these behemoths.
2017-08-18 14:03:48 -04:00
John Ericson
12795a7068 misc: Remove almost all uses of stdenv.{ccCross,binutils} 2017-06-22 17:53:52 -04:00
John Ericson
35ed21d096 gcc*: Replace stdenv.is* with {host,target}Platform.is*
Host everywhere would be guaranteed to preserve the old semantics,
but in a few places it doesn't matter in practice, target is used
instead for clarity.
2017-06-06 19:28:16 -04:00
Ross MacLeod
e854685d65 gcc*: Remove cross argument and instead use hostPlatform and targetPlatform 2017-06-06 19:28:16 -04:00
John Ericson
eaa509f33a stdenv: Rename isGNU to isHurd as GNU is a userland
Elsewhere, things called GNU indeed includes GNU/Linux or GNU/Hurd, but this
predicate was defined excluding Linux regardless of userland.
2017-05-22 13:55:26 -04:00
John Ericson
20fa6fd871 gcc: When cross compiling, always expect prefixed binutils
Previously this was just done on Darwin.
2017-05-17 15:33:05 -04:00
John Ericson
295315cc87 binutilsCross: Remove and use binutils instead always
See previous commit for what was done to `binutils` to make this
possible.

There were some uses of `forcedNativePackages` added. The
combination of overrides with that attribute is highly spooky: it's
often important that if an overridden package comes from it, the
replaced arguments for that package come from it. Long term this
package set and all the spookiness should be gone and irrelevant:

  "Move along, nothing to see here!"

No hashes should be changed with this commit
2017-04-25 21:36:19 -04:00
John Ericson
a7068ace35 Rewrite a few stdenv.cross uses that *should* be targetPlatform
The previous commit redefines `stdenv.cross` for the sake of normal
libaries, the most common use-case of that attribute. Some compilers
however relied on the old definition so we have them use
`targetPlatform` instead. This special casing is fine because we
eventually want to remove `stdenv.cross` and use either `hostPlatform`
or `targetPlatform` instead.
2017-04-24 16:31:45 -04:00
Eelco Dolstra
42574f52b9
Remove references to $NIX_STRIP_DEBUG
This was removed in 3ea1c30846.
2017-02-05 11:08:32 +01:00
Vladimír Čunát
5de2857a54 gcc*: use stdenv.cc.libc instead of stdenv.libc
The latter doesn't exist on Linux.
2016-09-16 23:23:33 +02:00
Matthew Bauer
8610a34474
gcc: use special native system headers for darwin
Darwin systems need to be able to find CoreFoundation headers as well as
libc headers. Somehow, gcc doesn't accept any "framework" parameters
that would normally be used to include CoreFoundation in this
situation.

HACK: Instead, this adds a derivation that combines the two. The result
works but probably not a good long term solution.

ALTERNATIVES: Maybe sending patches in to GCC to allow
"native-system-framework" configure flag to get this found.
2016-09-15 17:58:09 -05:00
Matthew Bauer
cf004ae56e
gcc: add --with-native-system-header-dir for clang
gcc needs to be able find system headers. Without this, gcc fails to build because
/usr/include is not available.

Note: stdenv.libc should be available for all stdenv's, I think.
2016-09-15 17:56:50 -05:00
Matthew Bauer
f2e753a90c
gcc: fix gmp, mpfr includes
This should get gcc48, gcc5, and gcc6 working again.

Also: use makeLibraryPath, and makeSearchPathOutput for LIBRARY_PATH and
CPATH. This is a refactor but it also fixes an issue with zlib.
2016-09-15 17:56:50 -05:00
Matthew Bauer
45cd1ea620
gcc: --enable-bootstrap on Darwin
This seems to be working now. ISL needs to be disable for it to build
completely though.
2016-09-15 17:54:01 -05:00
Kirill Boltaev
0f37287df5 treewide: explicitly specify gtk version 2016-09-13 21:09:24 +03:00
Robin Gloster
5185bc1773 Merge remote-tracking branch 'upstream/master' into hardened-stdenv 2016-07-15 14:41:01 +00:00
Vladimír Čunát
d3e599c9e1 Merge #16355: gcc: darwin support 2016-06-23 12:16:40 +02:00
Matthew Bauer
f05bb6d23f gcc: fix darwin building
- disable bootstrap builds on Darwin
- remove xcrun calls
- check if patchelf is available before using
- apply darwin patch for gcc4.9
- fixes #16047
- fixes #14812
2016-06-19 23:07:10 -05:00
Tuomas Tynkkynen
5fe4076683 gcc: Pass --with-mpc in crossAttrs
Just for consistency, it should be already coming from buildInputs
anyway.
2016-06-10 16:17:30 +03:00
Eric Litak
fa4fcaf6b4 darwin output paths 2016-05-31 16:28:05 -07:00
Eric Litak
89c9a8896b same changes to the rest. 4.5 has inf recursion still, 4.6 too old for glibc2.23 2016-05-31 16:28:05 -07:00
Robin Gloster
2d382f3d98 Merge remote-tracking branch 'upstream/master' into hardened-stdenv 2016-05-30 19:39:34 +00:00
Tuomas Tynkkynen
e254750560 GCC: explicitly use some dev outputs 2016-05-19 10:04:41 +02:00
Tuomas Tynkkynen
3f8b08f506 treewide: Make explicit that 'dev' output of mpfr is used 2016-05-19 10:00:49 +02:00
Tuomas Tynkkynen
47c45e2041 treewide: Make explicit that 'dev' output of gmp is used 2016-05-19 10:00:36 +02:00
Franz Pletz
f8d481754c
Merge remote-tracking branch 'origin/master' into hardened-stdenv 2016-05-18 17:10:02 +02:00
Peter Simons
8e462995ba Bring my stdenv.lib.maintainers user name in line with my github nick. 2016-05-16 22:49:55 +02:00
Robin Gloster
d020caa5b2 Merge remote-tracking branch 'upstream/master' into hardened-stdenv 2016-04-18 13:49:22 +00:00
Franz Pletz
aff1f4ab94 Use general hardening flag toggle lists
The following parameters are now available:

  * hardeningDisable
    To disable specific hardening flags
  * hardeningEnable
    To enable specific hardening flags

Only the cc-wrapper supports this right now, but these may be reused by
other wrappers, builders or setup hooks.

cc-wrapper supports the following flags:

  * fortify
  * stackprotector
  * pie (disabled by default)
  * pic
  * strictoverflow
  * format
  * relro
  * bindnow
2016-03-05 18:55:26 +01:00
Robin Gloster
09a5af76b5 gcc48: turn off format hardening 2016-02-07 22:24:47 +00:00
Luca Bruno
5b0352a6a4 Merge branch 'master' into closure-size 2015-12-11 18:31:00 +01:00
Danny Wilson
6a2b723a8b Fix build of gccgo-wrapper on Illumos.
When compiling GCC with NIX_ENFORCE_PURITY,
linking libgcc fails because crti.o and friends
aren't part of the nix store.
2015-11-16 17:20:12 +01:00
Danny Wilson
fdb534f06e GCC 4.8 compiles on Illumos.
- Disable profiled bootstrap.
- Add illumos meta platform.
2015-11-16 17:20:11 +01:00
Tuomas Tynkkynen
8a460bf953 gcc 4.8, 4.9: Revert conflicting info output 2015-10-03 14:08:49 +02:00
Vladimír Čunát
5227fb1dd5 Merge commit staging+systemd into closure-size
Many non-conflict problems weren't (fully) resolved in this commit yet.
2015-10-03 13:33:37 +02:00
William A. Kennington III
76674a3c07 gcc: 4.8.4 -> 4.8.5 2015-07-08 16:17:25 -07:00
William A. Kennington III
7eae48871f Merge branch 'master.upstream' into staging.upstream 2015-07-01 13:38:17 -07:00
Shea Levy
145768bf9b Unmaintain a bunch of packages 2015-07-01 08:11:05 -04:00
Eelco Dolstra
110b671c13 gcc: Put info in a separate output 2015-05-13 18:17:25 +02:00
Eelco Dolstra
7745c733eb gcc: Remove duplicate files 2015-05-12 15:05:01 +02:00
Vladimír Čunát
bf414c9d4f Merge 'staging' into closure-size
- there were many easy merge conflicts
- cc-wrapper needed nontrivial changes

Many other problems might've been created by interaction of the branches,
but stdenv and a few other packages build fine now.
2015-04-18 11:22:20 +02:00
Jan Malakhovski
29133753c8 gcc 4.8: add x11Support option so that it would stop evaluating gtk by default 2015-03-29 23:31:37 +00:00
Vladimír Čunát
a0bf07827b mpc: also rename the attribute to libmpc
Attrnames and package names should be as close as possible to avoid confusion.
I took care not to confuse the two mpc things during the mass-replace,
so hopefully I suceeded (tarball still builds).
2015-01-17 09:55:32 +01:00
Shea Levy
16fe4be790 Add isGNU attribute to gccs 2015-01-14 20:26:57 -08:00
Ludovic Courtès
41b53577a8 unmaintain a bunch of packages 2015-01-13 22:33:49 +01:00
Vladimír Čunát
becf038336 Merge branch 'staging' 2014-12-26 22:41:19 +01:00
John Wiegley
28b6fb61e6 Change occurrences of gcc to the more general cc
This is done for the sake of Yosemite, which does not have gcc, and yet
this change is also compatible with Linux.
2014-12-26 11:06:21 -06:00
Vladimír Čunát
47a9d03541 gcc: maintenance update 4.8.3 -> 4.8.4 2014-12-24 23:27:23 +01:00
Eelco Dolstra
a0f3faf34e Merge remote-tracking branch 'origin/glibc-2.20' into staging 2014-11-16 22:17:36 +01:00
Vladimír Čunát
457850397a gcc_multi: prevent overwritten libs after 51f1b4ec48 2014-11-13 22:30:32 +01:00
Eelco Dolstra
73b75f6157 gcc: Fix bug causing Glibc miscompilation
http://hydra.nixos.org/build/16564205
2014-11-03 13:27:53 +01:00
Vladimír Čunát
06fea81c6e Merge recent master into staging
Hydra: ?compare=1150594
2014-09-06 16:52:45 +02:00
Ricardo M. Correia
e552fbf521 gcc/gcj: Update antlr dep to 4.4
Version 3.1.3 is no longer available for download.
2014-09-03 14:04:52 +02:00
Vladimír Čunát
b8c7091335 gcc: fixup references. ToDo: port to gcc-4.9 2014-08-30 15:54:07 +02:00
Vladimír Čunát
031baae714 Merge branch 'staging' into v/modular
Conflicts (as in p/modular-stdenv):
	pkgs/stdenv/linux/default.nix
2014-08-30 08:33:10 +02:00
Vladimír Čunát
a70180ba73 mutiout: make it builtin 2014-08-30 08:27:43 +02:00
Gergely Risko
dd3f3bdcc2 GCC >= 4.8 doesn't depend on ppl 2014-08-29 11:45:22 +02:00
Vladimír Čunát
4dccb224c5 WIP2 2014-08-26 01:10:56 +02:00
Vladimír Čunát
3ec413cece WIP 2014-08-25 15:30:46 +02:00
Vladimír Čunát
c96f4d7949 gcc, glibc: merge changes from original multiple-output
Can't be done automatically because of file copies/moves.
2014-08-25 10:29:54 +02:00
Eelco Dolstra
a0c60b76ec gcc: Revive the no-sys-dirs patch
For now, we don't NATIVE_SYSTEM_HEADER_DIR because it breaks the
build. However, it points to Glibc in the Nix store (not /usr/include)
so it's kind of okay.
2014-08-18 17:20:37 +02:00
Gergely Risko
f199e115d2 Enable parallel building for GCC.
Even if using profiledbootstrap.  This was unsafe before 4.8, and
then the documentation was not fixed on time.

The documentation got fixed here:
  c763997f34

But the actual code was already fixed here:
  5d2fca09d5

So this is safe both for GCC 4.8 and GCC 4.9.
2014-08-13 23:21:33 +02:00
Peter Simons
2d326e5032 Merge remote-tracking branch 'origin/master' into staging.
Conflicts:
	pkgs/desktops/e18/enlightenment.nix
2014-08-04 16:51:47 +02:00
Mateusz Kowalczyk
7a45996233 Turn some license strings into lib.licenses values 2014-07-28 11:31:14 +02:00
Eelco Dolstra
ac8775dd96 $xcodePath -> $SDKROOT
SDKROOT is standard. In particular, this fixes the cmake build on
Mac OS X 10.9.
2014-07-24 21:53:46 +02:00
Eelco Dolstra
402688b752 gcc: Fix multilib builds
http://hydra.nixos.org/build/12578050
2014-07-22 13:36:00 +02:00
Eelco Dolstra
0fd9db3cfb gcc-4.8: Get rid of lib64
Having a separate lib64 is bad because it requires special-casing in
lots of places.

Previously done in e4a11b4d92, which
apparently got lost going from 4.6 to 4.8.
2014-07-01 14:27:57 +02:00
Eelco Dolstra
89f8af55f1 Darwin: Use xcrun to get the path to the SDK
Recent versions of Xcode don't install headers in /usr/include but
in a directory like

  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include

So use that instead, falling back to /usr/include in case of an older
version of Xcode.
2014-07-01 11:01:36 +02:00
Eelco Dolstra
55e8e0ef9b gcc: Slight builder cleanup 2014-06-30 17:31:02 +02:00
Eelco Dolstra
7fe89be146 gcc: Fix purity
Somewhere the no-sys-dirs.patch got disabled, so gcc was looking in
/usr/local/include and /usr/lib. Since I can't fix the patch easily,
I've borrowed the --sysroot trick from clang-wrapper. This causes
builtin paths to be prefixed with /var/empty
(e.g. /var/empty/usr/lib), which don't exist.
2014-06-30 16:43:02 +02:00
Vladimír Čunát
5a98b9f514 Merge recent master into p/stdenv
Merged just before the pypi update, as it seems to cause problems on Hydra.
2014-06-09 19:07:31 +02:00
John Wiegley
0369769bd9 gcc-4.8: build Objective-C/C++ support on darwin 2014-05-31 19:39:09 +00:00
Vladimír Čunát
872860e6de Merge #1187 into p/stdenv
Tested building firefox, kdelibs, evince on x86_64-linux.
2014-05-29 22:16:07 +02:00
Vladimír Čunát
610370f844 gcc: bugfix update 4.8.2 -> .3
It's supposed to fix over 140 problems from upstream bugzilla.
https://gcc.gnu.org/bugzilla/buglist.cgi?bug_status=RESOLVED&resolution=FIXED&target_milestone=4.8.3

A previously separate patch got included in the release.

I tested that stdenv still builds.
2014-05-23 00:25:36 +02:00
Lluís Batlle i Rossell
b194050ee1 Fixing the cross gcc building.
gcc 4.8 added libatomic, and it has to be disabled in case of
gccCrossStageStatic, as it requires libc.
2014-05-19 10:26:54 +02:00
Ricardo M. Correia
06725e95eb gcc: Add support for grsecurity 2014-05-15 13:25:47 +02:00
aszlig
625d7b9043
Merge pull request #1928 from 'cross-win-osx'.
This includes a lot of fixes for cross-building to Windows and Mac OS X
and could possibly fix things even for non-cross-builds, like for
example OpenSSL on Windows.

The main reason for merging this in 14.04 already is that we already
have runInWindowsVM in master and it doesn't work until we actually
cross-build Cygwin's setup binary as the upstream version is a fast
moving target which gets _overwritten_ on every new release.

Conflicts:
	pkgs/top-level/all-packages.nix
2014-04-21 10:00:35 +02:00
Shea Levy
88e531d8dc Fix gcc bug 58800.
See #2330 for details, except I needed to remove the Changelog change from the patch
2014-04-20 09:46:21 -04:00
Shea Levy
2364bd807d Revert "Merge branch 'gcc-fix' of git://github.com/ambrop72/nixpkgs"
The patch doesn't apply

This reverts commit 094eea8f6a, reversing
changes made to 552d66cd9e.
2014-04-20 09:36:15 -04:00
ambrop7@gmail.com
7eeb94e8dc Add patch for GCC bug 58800. 2014-04-20 12:40:32 +02:00
aszlig
23b43c6a9b
gcc-4.8: Use --with-as/ld for MinGW-w64 as well.
On MinGW, we're passing these programs to the configure script, but this
obviously won't work for non-autoconf-based projects.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-03-12 10:55:51 +01:00