Commit graph

123 commits

Author SHA1 Message Date
John Ericson c9f6a82b61 gcc: Factor out "platform flags" 2018-05-10 18:00:57 -04:00
John Ericson b9acfb4ecf treewide: isArm -> isAarch32
Following legacy packing conventions, `isArm` was defined just for
32-bit ARM instruction set. This is confusing to non packagers though,
because Aarch64 is an ARM instruction set.

The official ARM overview for ARMv8[1] is surprisingly not confusing,
given the overall state of affairs for ARM naming conventions, and
offers us a solution. It divides the nomenclature into three levels:

```
ISA:             ARMv8   {-A, -R, -M}
                 /    \
Mode:     Aarch32     Aarch64
             |         /   \
Encoding:   A64      A32   T32
```

At the top is the overall v8 instruction set archicture. Second are the
two modes, defined by bitwidth but differing in other semantics too, and
buttom are the encodings, (hopefully?) isomorphic if they encode the
same mode.

The 32 bit encodings are mostly backwards compatible with previous
non-Thumb and Thumb encodings, and if so we can pun the mode names to
instead mean "sets of compatable or isomorphic encodings", and then
voilà we have nice names for 32-bit and 64-bit arm instruction sets
which do not use the word ARM so as to not confused either laymen or
experienced ARM packages.

[1]: https://developer.arm.com/products/architecture/a-profile

(cherry picked from commit ba52ae5048)
2018-04-25 15:50:41 -04:00
Will Dietz 15d401dcfa gcc: disable libsanitizer, libgomp on musl 2018-02-13 09:44:38 -06:00
John Ericson c98e6b6771 gcc, binutils: Narrow down ARM hack so only native builds are affected 2018-01-09 17:25:49 -05:00
Drew Hess 3ed545ab31
Revert "gcc, binutils: Get rid of 32-bit ARM configure flag exception"
This commit breaks native armv7l-linux builds. Revert it until it can
be root-caused. This reversion does not affect other platforms or
cross-compiling.

This reverts commit 0f5c804631.
2018-01-08 20:03:33 -08:00
John Ericson 4ad9a97e96 gcc: Don't let solaris hack pollute CC elsehwere 2017-12-30 22:04:22 -05:00
John Ericson 0f5c804631 gcc, binutils: Get rid of 32-bit ARM configure flag exception
Now that we do `--enable-targes=all`, there is no risk of missing the
needed emulation.

This reverts commit ebc9b161cd.
This reverts commit 88efc22b44.
2017-12-30 22:04:22 -05:00
John Ericson 9cda2f5559 gcc: Fix deps, for cross and consistency
Mainly making sure we have tools to build target libs
2017-12-30 22:04:22 -05:00
John Ericson 114a9b6253 gcc: Let cc-wrapper's setup hook define any tool env vars we need 2017-12-30 22:04:21 -05:00
John Ericson bc23afe5c7 gcc: Add build->build dep for C compilers
5 already had this, but I forgot the other versions.
2017-12-30 22:04:21 -05:00
John Ericson 5db559f855 Merge branch 'mingw32-w64-fix' into ericson2314-cross-base 2017-12-29 15:46:02 -05:00
John Ericson bc3a6e260a Merge commit '3afe325a3e2f906ba512fb7a2f28f79496711592' into mingw32-w64-fix 2017-12-29 15:28:56 -05:00
John Ericson 5d336d36bb Merge commit 'e82bd498d1a2a28fb20249569a6f49fcaab9aca8' into mingw32-w64-fix 2017-12-29 15:28:49 -05:00
John Ericson 169227bfd2 Merge commit '3a59cd87f26cc59c91fb821749b1ec0d64922f87' into mingw32-w64-fix 2017-12-29 14:24:10 -05:00
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 12e0672d88 gcc: Adjust builder.sh to find some things in bintools-wrapper instead 2017-12-13 16:08:19 -05:00
John Ericson 3afe325a3e Merge commit '43d5c5d6db3ce33f3cf1d17ba43c7374257466ec' into gcc-modernize-builder 2017-12-07 02:19:04 -05:00
John Ericson e82bd498d1 Merge commit '992bd2f6d34b2f560fc17df6fa3708fcade1abac' into gcc-modernize-builder 2017-12-07 02:13:24 -05:00
John Ericson 3a59cd87f2 Merge commit '93cd0685c5ac4d8f21d8586d3e5c45cd7394fab9' into gcc-modernize-builder 2017-12-07 01:49:31 -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 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 43d5c5d6db Merge commit '703a9f93c1254f7bdf0350ca0462de0d78033c62' into gcc-simplify-flags 2017-12-05 17:58:16 -05:00
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
Tuomas Tynkkynen 77b409b2cf gcc49: Reduce diff to gcc5 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 8da04338d7
gcc-4.9: fixup build with glibc-2.26
Upstream didn't backport this, but fortunately it wasn't too hard.
2017-11-07 12:56:57 +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 956c266fb7
gcc49: remove Darwin patch that's included in 4.9 2017-08-20 10:30:34 +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