Commit Graph

109475 Commits

Author SHA1 Message Date
John Ericson
2365e2ffcd Merge commit '51948eab9415fde1825dea5c7d31b99b2e1a0fdb' into mingw32-w64-fix 2017-12-29 14:23:05 -05:00
Bojan Nikolic
771bae04e8 gcc: Enable SSP and shared libs in the final stage for MinGW
Hardening on by default now that we don't use the cross wrapper. In
turn, hardening requires libssp in particular.
2017-12-29 13:27:02 -05:00
John Ericson
51948eab94 gcc: Fix after merge
- NIX_CC_CROSS is now completely gone!

- NIX_CC is defined reliably, so no manual def needed

- stdenv.ccCross -> stdenv.cc, also removing need for "or" fallback
2017-12-07 01:42:43 -05:00
John Ericson
974b9201a5 Merge commit 'c9ca54199409324101bdee38f5b16e7656a16a22' into gcc-modernize-builder 2017-12-07 01:42:35 -05:00
John Ericson
d96cf0f46c gcc: Handle CPATH and LIBRARY_PATH purely in Nix 2017-12-06 19:12:51 -05:00
John Ericson
d4595b38e9 gcc: Modernize builder.sh for Cross
Instead of `NIX_CC` vs `NIX_CC_CROSS` spagetti, unconditionally use
`NIX_BUILD_CC` and `NIX_CC` in a consistent manner.
2017-12-06 19:12:50 -05:00
John Ericson
c9ca541994 Merge commit '198dceccbe5414a5fd72ca83624c0cc715db1aad' into gcc-simplify-flags 2017-12-05 16:55:11 -05:00
Franz Pletz
aeffc007fb coreutils: fix tests depending on setuid/setgid bits
(cherry picked from commit 6a850d2b11)
2017-12-05 14:17:41 -05:00
John Ericson
c8d435476d lib: Unbreak pogoplug example platform
Vendor needed to be made valid
2017-12-05 14:17:00 -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
Ross MacLeod
198dceccbe gcc5: set --build and --host in the case where those differ and make sure to have a build cc-wrapper around as well 2017-06-22 17:53:55 -04:00
John Ericson
7c754b1e3b mpg123: Modernize and fix for cross
Do not even think about configureFlags unless in cross, to avoid hash
breaking when not in cross.
2017-06-22 17:53:55 -04:00
John Ericson
502902f1c6 lynx: Fix for cross
Needed C toolchain targeting build platform
2017-06-22 17:53:55 -04:00
Ross MacLeod
be3f18d79e ddrescue: modernize and fix cross (hopefully)
Carefully do not add attributes for cross unless in cross, to avoid hash breakage
2017-06-22 17:53:54 -04:00
John Ericson
bef622a4e8 unzip: Fix for cross 2017-06-22 17:53:54 -04:00
Ross MacLeod
d710c2d943 findutils: modernize and fix cross 2017-06-22 17:53:54 -04:00
John Ericson
54089620f5 libpmc: Fix for cross by disabling check
Check phase is now only disabled *by default* for cross, but this
package was forcing it unconditionally.
2017-06-22 17:53:54 -04:00
John Ericson
ff6ab1b3c4 pcre: Modernize and fix cross 2017-06-22 17:53:54 -04:00
John Ericson
b93e6034d5 libsigsegv: Fix for cross by disabling check
Check phase is now only disabled *by default* for cross, but this
package was forcing it unconditionally.
2017-06-22 17:53:54 -04:00
John Ericson
af8d1a4ace binutils: Fix build != host == target 2017-06-22 17:53:54 -04:00
John Ericson
2e337fe969 libelf: Modernize and fix for cross 2017-06-22 17:53:53 -04:00
John Ericson
c54c3cb5ce mpfs: Fix for cross by disabling check
check phase is now only disabled by *default* for cross, but mpfr
was forcing it always.
2017-06-22 17:53:53 -04:00
John Ericson
f75ad79375 bash: Modernize derivation, hopefully fixing cross compilation 2017-06-22 17:53:53 -04:00
John Ericson
ef0b07e94a gnu patch: Fix for cross 2017-06-22 17:53:53 -04:00
John Ericson
7bdacad8b3 ed: Modernize and fix for cross 2017-06-22 17:53:53 -04:00
John Ericson
05b3c87d9d busybox: Modernize and fix cross 2017-06-22 17:53:53 -04:00
John Ericson
8b22e497f2 vim: Modernize derivation, hopefully fixing cross 2017-06-22 17:53:53 -04:00
John Ericson
167b80ba76 coreutils: Modernize and fix for cross
"--host=..." needs to be passed but crossAttrs overrides that.
2017-06-22 17:53:52 -04:00
Ross MacLeod
f63f96ae35 zlib: don't really override CC at ay point
but leave the preConfigure script as it was when not cross building in order to avoid hash breakage
2017-06-22 17:53:52 -04:00
John Ericson
38b2bd2f28 dropbear: Remove now-unneeded crossAttrs 2017-06-22 17:53:52 -04:00
John Ericson
12795a7068 misc: Remove almost all uses of stdenv.{ccCross,binutils} 2017-06-22 17:53:52 -04:00
Ross MacLeod
d016637629 podofo: unsimplify derivation a bit to avoid hash breakage 2017-06-22 17:53:52 -04:00
John Ericson
29c4d7f505 podofo: Simplify derivation
Bunch of junk for linux and cross compilation that's no longer needed
2017-06-22 17:53:52 -04:00
John Ericson
f55ccbb60f xbursttools: Fix eval at least so tests pass 2017-06-22 17:53:52 -04:00
John Ericson
fc42ec0a5c mingw-w64: Depend on own headers derivation
Without this, a `#include <float.h>` resolves incorrectly. Either the
headers weren't on the include path at all, or they only were for
local, not system, imports.

What's weird is this used to not be a problem. Not sure what other
change in e.g. cc-wrapper would affect this.
2017-06-22 17:53:51 -04:00
John Ericson
bb7067f882 mingw-w64: Clean up, especially clarifying staging 2017-06-22 17:53:51 -04:00
John Ericson
c2e2152afc cc-wrapper: Port over finding of dynamic linker from gcc-cross-wrapper
At the next break, we can deduplicate and go for the best of both
worlds.
2017-06-22 17:53:36 -04:00
John Ericson
0aee847858 cc-wrapper: Make the cross compiler use a crossEnvHook
This is a hack until stdenv's setup.hs gets overhauled
2017-06-22 17:52:29 -04:00
Ross MacLeod
c1fb71b74a cc-wrapper: when cross building, wedge in setting AR, AS, and LD env vars to their cross building versions
I think it's ok to export things which aren't wrapped. The cc-wrapper
can be thought of as responsible for all of binutils and the c
compiler, only wrapping those binaries which are necessary to
interposition---as opposed to all binaries it thinks are relevaant.

Conversely, adding the setup hook to the unwrapped compilers would be
unforunate as hooks are ugly hacks and the compilers themselves take
a long time to rebuild. Better to wholely separate "pure packages" from
hacks.
2017-06-22 17:52:28 -04:00
John Ericson
e0492d58a6 cross stdenv adaptor: Disable checkPhase by default
Before gcc-cross-wrapper did this unconditionally
2017-06-22 17:52:28 -04:00
John Ericson
594d264205 cross stdenv adaptor: Support --host --build --target across the board
Packages get --host and --target by default, but can explicitly request
any subset to be passed as needed. See docs for more info.

rustc: Avoid hash breakage by using the old (ignored)
dontSetConfigureCross when not cross building
2017-06-22 17:52:28 -04:00
John Ericson
9bfd03eff7 cross stdenv adaptor: Remove ccCross binutils attrs and binutils extra buildDepends
It now has the correct wrapped tools and nothing else is needed.
2017-06-22 17:52:28 -04:00
John Ericson
121e7d9335 gcc-cross-wrapper: Remove in favor of newly-cross-supporting cc-wrapper 2017-06-22 17:52:28 -04:00
John Ericson
8a7433fca4 cc-wrapper: Temporarily got to great lengths to avoid mass-rebuild
Eventually we should avoid this "pre-wrapping" and just update those
files in nixpkgs. This mass-rebuild change is best done along with
those needed to reduce the disparity between native and cross (i.e.
making native the "identity cross").
2017-06-22 17:52:28 -04:00
John Ericson
0f0383394d cc-wrapper: Salt environment variables with LLVM triples
We now (on cross) require per-target flag interposition by putting the
triple in the names of the relevant environment variables, e.g:

export NIX_arm_unknown_linux_gnu_CFLAGS_COMPILE=...

The wrapper also has a `infixSalt` attribute (and "_" prefixed and
suffixed variants) to assist downstream packages.

Note how that the dashes are replaced to keep the identifier valid.
Using names like this allows us to keep the settings for different
compilers seperate.

I think it might be even better to use names like `NIX_{BUILD,HOST}...`
using the platform's role rather than the platform itself, but this
would be more work as the previous stages' tools would have to be re-
wrapped to take on their new role. I therefore didn't do this for now,
but that route should be thoroughly explored in the future.
2017-06-22 17:52:28 -04:00
John Ericson
04a3cad968 cc-wrapper: Add support for no libc whatsoever 2017-06-22 17:52:27 -04:00