Commit Graph

462 Commits

Author SHA1 Message Date
Antoine Eiche
5b6129f69c gcc49: remove darwin support 2018-05-03 15:12:01 +02:00
Antoine Eiche
ada2fc088c gcc49: backport retpoline support
To mitigate Spectre Variant 2, GCC needs to have retpoline
support (-mindirect-branch and -mfunction-return arguments on amd64
and i386).

Patches were pulled from H.J. Lu's backport branch to
4.9 (hjl/indirect/gcc-4_9-branch), available at
https://github.com/hjl-tools/gcc/tree/hjl/indirect/gcc-4_9-branch/master. Upstream
GCC does not apply patches to anything older than the
gcc-6-branch. H.J. Lu is the author of the upstream retpoline commits
as well.

Several Linux distributions already backported these patches to GCC 4
branches and some old kernels (3.13 for instance) have been recompiled
with these GCC patches. These kernels only allow to load kernel
modules that are compiled with the retpoline support.

References:
- Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/gcc-4.8/+bug/1749261
- Ubuntu package: https://launchpad.net/ubuntu/+source/gcc-4.8/4.8.4-2ubuntu1~14.04.4

Fixes #38394
2018-05-03 11:35:49 +02:00
John Ericson
ba52ae5048 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
2018-04-25 15:28:55 -04:00
Shea Levy
d0a8866622
Merge branch 'binutils-2.30' into staging 2018-03-22 07:28:10 -04:00
Tuomas Tynkkynen
74720a36c7 Merge remote-tracking branch 'upstream/master' into staging 2018-03-21 23:51:55 +02:00
Clemens Fruhwirth
c0cf13e52e Add space for NIX_CXXSTDLIB_COMPILE+=' ...' as NIX_CXXSTDLIB_COMPILE might not be empty. 2018-03-19 13:18:49 +01:00
Shea Levy
a5d064826b
gcc: Try to fix /bin/sh dependency 2018-03-17 21:58:15 -04:00
Shea Levy
017d678a00
gcc: Add uncommitted patch. 2018-03-16 16:39:55 -04:00
Shea Levy
a1ede569ef
gcc: Unconditionally add some upstream RISC-V patches. 2018-03-16 16:38:32 -04:00
Shea Levy
c69d8bf5e6
treewide: Remove gnat support.
See discussion in 6ac7b19c97.
2018-03-08 13:56:36 -05:00
Tuomas Tynkkynen
34f95d92a2 Merge remote-tracking branch 'upstream/master' into staging
Conflicts:
	pkgs/applications/misc/pytrainer/default.nix
	pkgs/development/tools/pew/default.nix
	pkgs/tools/misc/you-get/default.nix
2018-02-28 20:52:49 +02:00
John Ericson
dfc5d7835d
Merge pull request #35247 from telent/mips32
lib, treewide: Add missing MIPS arches, and fix existing usage
2018-02-27 14:01:15 -05:00
Shea Levy
4728ef130e
RISC-V: Add upstream gcc patch to fix -pthread.
Fixes libmicrohttpd build.
2018-02-26 05:24:36 -05:00
Daniel Barlow
9c50ae6898 lib, treewide: Add missing MIPS arches, and fix existing usage
Existing "mips64el" should be "mipsel".

This is just the barest minimum so that nixpkgs can recognize them as
systems - although required for building individual derivations onto
MIPS boards, it is not sufficient if you want to actually build nixos on
those targets
2018-02-23 20:43:42 -05:00
Will Dietz
39f61d5c02 gcc7: fix native and cross-musl build, sync w/gcc6 fixes 2018-02-21 20:55:22 -06:00
Tuomas Tynkkynen
b1916b45a3 Merge remote-tracking branch 'upstream/staging' into gcc-7
Conflicts:
	pkgs/development/libraries/libidn/default.nix
	pkgs/top-level/all-packages.nix
2018-02-15 15:45:37 +02:00
Will Dietz
9bd4e00ce3 gcc6: cross-musl disable libmpx 2018-02-13 09:45:03 -06:00
Will Dietz
7eba45d063 gcc5: patch for musl compat/support 2018-02-13 09:44:52 -06:00
Will Dietz
3b0d3248c9 gcc7: tweak check, target -> host 2018-02-13 09:44:43 -06:00
Will Dietz
f566e3f987 gcc7: more selftest disabling, whenever building cross 2018-02-13 09:44:42 -06:00
Will Dietz
ff9b494103 gcc7: Apply patch to fix selftest w/musl? 2018-02-13 09:44:39 -06:00
Will Dietz
f146a3c316 gcc5, 7: same fixes as gcc6 2018-02-13 09:44:38 -06:00
Will Dietz
fbf41b9ee2 gcc6: try to fix LOCAL_INCLUDE_DIR problem w/musl 2018-02-13 09:44:38 -06:00
Will Dietz
5eea9e82f4 gcc6: try patching MUSL_DYNAMIC_LINKER as well 2018-02-13 09:44:38 -06:00
Will Dietz
ece06deee4 gcc6: try to fix gccCrossStageStati 2018-02-13 09:44:38 -06:00
Will Dietz
15d401dcfa gcc: disable libsanitizer, libgomp on musl 2018-02-13 09:44:38 -06:00
Ben Gamari
d625f181bd autoconf: Enable cross-compilation 2018-02-13 09:44:28 -06:00
Franz Pletz
e2c1c76fd0
Merge remote-tracking branch 'origin/master' into gcc-7 2018-01-28 23:17:32 +01:00
Tuomas Tynkkynen
11e98eaae7 gcc7: More resync from gcc6
I think I managed to lose these during a merge conflict.
2018-01-28 03:15:05 +02:00
Clemens Fruhwirth
2f83f52ab8 gcc: 7.2.0 -> 7.3.0 2018-01-26 15:59:22 +01:00
Tuomas Tynkkynen
99fc949330 gcc7: Drop flex again
I think I lost this during merge conflict resolution
2018-01-26 16:50:13 +02: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
Vladimír Čunát
1fcd92ce92
Merge branch 'master' into staging
A few thousand rebuilds from master, again.
Hydra: ?compare=1422362
2017-12-31 09:53:49 +01: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
5b74540c5b treewide: Use depsBuildBuild for buildPackges.stdenv.cc 2017-12-30 22:04:21 -05:00
Dmitry Kalinkin
6d9769663d
cc-wrapper: allow compilers to specify unsupported hardening modes
Fixes: 0fd7ef61b2 ('clang_34: Disable hardening bits (#28543)')
2017-12-30 12:23:25 -05:00
John Ericson
5db559f855 Merge branch 'mingw32-w64-fix' into ericson2314-cross-base 2017-12-29 15:46:02 -05:00
John Ericson
52a4a7c3bb
Merge pull request #33167 from bnikolic/mingw32-w64-fix
Mingw_w64 fix to get cross-compilation working again
2017-12-29 15:44:17 -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
4e4520a0f3 gcc: Don't choke if there is no lib output 2017-12-10 17:36:15 -05:00