about summary refs log tree commit diff
path: root/pkgs/development/compilers/gcc/10/default.nix
AgeCommit message (Collapse)AuthorFilesLines
2023-08-20gcc: if atLeast 10, use deduplicated versionAdam Joseph1-296/+0
2023-08-11gcc10: apply a patch more oftenVladimír Čunát1-1/+1
As usual, just to earlier detect when it stops applying.
2023-08-11gcc10: 10.4.0 -> 10.5.0Vladimír Čunát1-3/+2
This dropped file now seems unused.
2023-07-07gcc: use callFile instead of callPackage for builder.nixAdam Joseph1-1/+1
2023-07-07gcc: use common/builder.nixAdam Joseph1-1/+1
This commit replaces `stdenv.mkDerivation` with `(callPackage ../common/builder.nix {})` in all versions of gcc.
2023-07-07gcc: remove `builder = ../builder.sh` from gcc/${version}/default.nixAdam Joseph1-2/+0
This commit deletes the custom builder attribute from all gcc versions.
2023-06-30Revert "gcc: kludge to prevent mass-rebuild"Adam Joseph1-4/+1
This reverts commit 8dce1f7383b064ae5adee7702a8eeed06346dd24.
2023-07-01gcc: kludge to prevent mass-rebuildAdam Joseph1-1/+4
This commit is reverted in #240596 (which must go to staging).
2023-07-01gcc: withoutTargetLibc: build libgcc_s.soAdam Joseph1-1/+1
We want a `libgcc_s.so` to be built by the first stage cross-compiler (withoutTargetLibc), since that is the compiler which will compile the target libc. This commit accomplishes that, by making three changes: 1. Replacing the `targetPlatform.libc == "msvcrt" &&` conditional with `enableShared`, so that the code which cross-build `libgcc_s.so` is used for all cross compilers capable of emitting shared libraries. 2. Removing the `targetPlatform == hostPlatform` guard from the code which produces the `libgcc` output. 3. Looking for build products in in "lib/${targetPlatform.config}/" rather than "lib/", so we will find them when cross compiling.
2023-07-01gcc: s_crossStageStatic_withoutTargetLibc_Adam Joseph1-6/+6
This commit renames the `crossStageStatic` argument to the `gcc` expression to `withoutTargetLibc`. See previous commit for details.
2023-07-01gcc: use hasSharedLibraries instead of isStaticAdam Joseph1-3/+3
2023-06-27gcc: deduplicate boilerplateAdam Joseph1-7/+6
This commit deduplicates libgcc-related boilerplate which appears in every version of our gcc expression, by moving it into libgcc.nix. I will be submitting a separate PR which changes this boilerplate, but that PR will be much easier to review if I can make the change in just one place. Meanwhile, *this* commit has no effect on eval: $ for A in 10 11 12 13 4.8 4.9 6 7 8 9; do nix-instantiate . -A gcc$(echo $A | tr -d .); done 2>/dev/null | sort | tee before /nix/store/1a37lnzpnz0dhm3lphiy2gcdrxgqa7ma-gcc-wrapper-4.8.5.drv /nix/store/5szdivc8il0c3g94dq4wqnq5j77a9h6p-gcc-wrapper-11.4.0.drv /nix/store/bmmc717wmnp1j2xkd3if5dfxicnflvn5-gcc-wrapper-7.5.0.drv /nix/store/fc1ggpixv3wqcazchhl2hnn5zl5ds30l-gcc-wrapper-13.1.0.drv /nix/store/j9c2b20w35r3ag5nxmklhagbwsgjhds2-gcc-wrapper-4.9.4.drv /nix/store/nq7q57bxmsk2g457wr4b9449as3f216w-gcc-wrapper-12.3.0.drv /nix/store/sqmkkfapzykapcs4azvxm83n786ga7q1-gcc-wrapper-10.4.0.drv /nix/store/vxnz30i23mkl4ldsq485kxn7q0p2y4nf-gcc-wrapper-8.5.0.drv /nix/store/yfhv0bv15cg5kj2xsb9fcgb6pdlw42v0-gcc-wrapper-6.5.0.drv /nix/store/yi5gr75pb6kddnll10jg25hhndhkba7s-gcc-wrapper-9.5.0.drv $ for A in 10 11 12 13 4.8 4.9 6 7 8 9; do nix-instantiate . -A gcc$(echo $A | tr -d .); done | sort | tee after /nix/store/1a37lnzpnz0dhm3lphiy2gcdrxgqa7ma-gcc-wrapper-4.8.5.drv /nix/store/5szdivc8il0c3g94dq4wqnq5j77a9h6p-gcc-wrapper-11.4.0.drv /nix/store/bmmc717wmnp1j2xkd3if5dfxicnflvn5-gcc-wrapper-7.5.0.drv /nix/store/fc1ggpixv3wqcazchhl2hnn5zl5ds30l-gcc-wrapper-13.1.0.drv /nix/store/j9c2b20w35r3ag5nxmklhagbwsgjhds2-gcc-wrapper-4.9.4.drv /nix/store/nq7q57bxmsk2g457wr4b9449as3f216w-gcc-wrapper-12.3.0.drv /nix/store/sqmkkfapzykapcs4azvxm83n786ga7q1-gcc-wrapper-10.4.0.drv /nix/store/vxnz30i23mkl4ldsq485kxn7q0p2y4nf-gcc-wrapper-8.5.0.drv /nix/store/yfhv0bv15cg5kj2xsb9fcgb6pdlw42v0-gcc-wrapper-6.5.0.drv /nix/store/yi5gr75pb6kddnll10jg25hhndhkba7s-gcc-wrapper-9.5.0.drv $ diff -u after before $
2023-06-13gcc: disable parallelism when installingArnout Engelen1-0/+3
to avoid missing sections in the info pages due the index being overwritten by parallel `install-info` invocations
2023-06-13Revert "gcc: install info files serially"Arnout Engelen1-1/+0
Because the build still uses a pre-4.4 version of GNU Make, this option makes the whole build serial rather than only the installation. See also https://gcc.gnu.org/PR109898 This reverts commit f3995cee01fad5aeb5b67de8426a7a0321c74ebf.
2023-05-26gcc{6..11}: import a patch into nixpkgsVladimír Čunát1-5/+1
fetchurl can't be used on generated patches this way. The hash doesn't match anymore. fetchpatch would be an alternative.
2023-05-09gcc: install info files seriallyArnout Engelen1-0/+1
installing info files in parallel is dangerous, because `install-info` will write to a `dir-file` as a side-effect, and it has no protection against multiple `install-info` processes running in parallel and overwriting each others' changes. Local fix until we can fix the `Makefile.in` generation upstream Fixes #229470
2023-04-15gnatboot: rename to gnat-bootstrapManuel Mendez1-3/+3
Most other bootstrap compilers are named -bootstrap so lets follow that pattern.
2023-03-29gcc10: fix build w/glibc-2.36Maximilian Bosch1-0/+1
Failing Hydra build: https://hydra.nixos.org/build/193327405 Same fix as for gcc11.
2023-02-16Merge pull request #212498 from risicle/ris-fortify3Robert Scott1-0/+1
hardening flags: add `FORTIFY_SOURCE=3` support
2023-02-13treewide: use optionalStringFelix Buehler1-4/+4
2023-02-12Merge master into staging-nextgithub-actions[bot]1-79/+77
2023-02-12gcc: add common/meta.nixArtturin1-16/+9
inherit has to be used otherwise makeOverridable attributes are added
2023-02-11gcc: add callFile to make it more convenient to call filesArtturin1-63/+68
inherit generated with 'nix eval --json --impure --expr "with import ./. {}; lib.attrNames (lib.functionArgs gccX.cc.override)" | jq '.[]' --raw-output'
2023-02-09Merge master into staging-nextgithub-actions[bot]1-27/+25
2023-02-08gcc10,gcc11,gcc12: move dependencies to common/dependencies.nixArtturin1-27/+25
2023-02-01gcc: revert "provide both native and cross forms of gcc.libs libraries"Sergei Trofimovich1-1/+0
This reverts commit 2c931bd5f404162c15de10dca8e476e5469b2994. The https://github.com/NixOS/nixpkgs/pull/209153 reverted --sysroot=/ change as it broke other astects of library search paths. While it might still be useful to pull in gcc libraries when non-standard --sysroot= is passed there are no meaningful use cases of it in `nixpkgs` yet. Let's revert it for now.
2023-01-24gcc: mark hardeningUnsupportedFlags fortify3 for all but gcc 12Robert Scott1-0/+1
2023-01-23Merge pull request #212275 from alyssais/libdlJohn Ericson1-1/+1
treewide: remove -ldl linker flags
2023-01-23treewide: remove -ldl linker flagsAlyssa Ross1-1/+1
With all libcs I'm aware of, libdl is now either empty (Glibc, musl, uclibc, illumos), a symlink to libc or equivalent (Apple), or does not exist (FreeBSD, NetBSD). So explicitly linking libdl now does nothing for the former platforms, and breaks the build for the latter platforms. With this patch I've removed -ldl from all overridden linker flags for all free packages in Nixpkgs. Everything still seems to build.
2023-01-20Merge remote-tracking branch 'origin/staging-next' into stagingSergei Trofimovich1-2/+2
Conflicts: pkgs/development/libraries/qt-6/modules/qtbase.nix pkgs/stdenv/linux/make-bootstrap-tools.nix
2023-01-20gcc: use as(1) from binutils with LLVM bintoolsAlyssa Ross1-2/+2
LLVM does not provide a drop-in replacement for as(1). This makes it possible to build a GNU Fortran cross compiler from GNU to LLVM — e.g. buildPackages.gfortran for { system = "aarch64-linux"; useLLVM = true; }
2023-01-17Merge pull request #210816 from obsidiansystems/gcc-fix-bug-80431John Ericson1-2/+8
gcc: Backport fix of GCC Issue 80431 from version 12
2023-01-14gcc: Backport fix of GCC Issue 80431 from version 12John Ericson1-2/+8
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80431 This bug annoys me because I hit it when working on Nix. It causes miscompilations in such a way that I am hard-pressed to think how a program could inadvertainly rely on the bug (such that it would be broken by the fix). The bug is longstanding, and the (quite small) applies without modification to many older GCCs. I have confirmed by running the test in that commit that does indeed fix the bug with the backports too.
2023-01-14Merge remote-tracking branch 'origin/staging-next' into stagingSergei Trofimovich1-1/+1
Conflicts: pkgs/development/libraries/audio/roc-toolkit/default.nix
2023-01-07gnat12: Add support for x86_64-darwinBoey Maun Suang1-1/+1
2023-01-05gcc: provide both native and cross forms of gcc.libs librariesSergei Trofimovich1-0/+1
I would like to use --sysroot=/nix/store/does/not/exist hack for both `gcc` and `clang` drivers to remove default include (and library) search paths when we override them with libc. For `gcc` it works as is. But for `clang` it also drops some of `gcc` search paths`. Let'sconsider 2 lookups. Successful lookup (no `--sysroot`): $ printf "int main(){}" | clang++ -x c++ - -Wl,--verbose |& grep -F stdc++ attempt to open /nix/store/...-gcc-11.3.0/lib/gcc/x86_64-unknown-linux-gnu/11.3.0/libstdc++.so failed attempt to open /nix/store/...-gcc-11.3.0-lib/x86_64-unknown-linux-gnu/lib/libstdc++.so failed attempt to open /nix/store/...-clang-11.1.0-lib/lib/libstdc++.so failed attempt to open /nix/store/...-gcc-11.3.0/lib64/gcc/x86_64-unknown-linux-gnu/11.3.0/libstdc++.so failed attempt to open /nix/store/...-gcc-11.3.0/lib64/gcc/x86_64-unknown-linux-gnu/11.3.0/../../../../lib64/libstdc++.so failed /nix/store/...-gcc-11.3.0/lib64/gcc/x86_64-unknown-linux-gnu/11.3.0/../../../../lib64/libstdc++.a Failed lookup (has `--sysroot`): $ printf "int main(){}" | clang++ --sysroot=/does/not/exist -x c++ - -Wl,--verbose |& grep -F stdc++ attempt to open /nix/store/...-gcc-11.3.0/lib/gcc/x86_64-unknown-linux-gnu/11.3.0/libstdc++.so failed attempt to open /nix/store/...-gcc-11.3.0-lib/x86_64-unknown-linux-gnu/lib/libstdc++.so failed attempt to open /nix/store/...-clang-11.1.0-lib/lib/libstdc++.so failed attempt to open /nix/store/...-gcc-11.3.0/lib64/gcc/x86_64-unknown-linux-gnu/11.3.0/libstdc++.so failed /nix/store/...-binutils-2.39/bin/ld: cannot find -lstdc++: No such file or directory Note how `clang` starts the search roughly from `gcc-11.3.0-lib/x86_64-unknown-linux-gnu/lib` in both cases. I think it's our preferred location for both native and cross cases. The change adds such a symlink: `gcc-11.3.0-lib` -> `gcc-11.3.0-lib/x86_64-unknown-linux-gnu`
2022-11-14cross/mingw: make threading library configureableJörg Thalheim1-4/+4
2022-10-09gcc10: fix build with libxcryptMartin Weinelt1-3/+6
2022-08-20Merge staging-next into staginggithub-actions[bot]1-1/+1
2022-08-20libgccjit: don't try to enter into non-existent $lib outputSergei Trofimovich1-1/+1
Fixes build failure on `staging-next` introduced by commit c817efe6 ("gcc: extend stripping of .a libraries and .o objects"): ...-bootstrap-stage3-stdenv-linux/setup: line 106: pushd: no other directory Build failure happens because `libgccjit` has different `outputs` layout compared to the rest of `gcc` derivations: outputs = [ "out" "man" "info" ] ++ lib.optional (!langJit) "lib"; The change carves out `$lib` lib handling part to avoid `gcc` rebuild in `staging-next`.
2022-08-19Merge pull request #187234 from trofi/drop-libelf-from-gccSergei Trofimovich1-6/+2
gcc: drop unused libelf dependency
2022-08-19Merge pull request #185972 from Artturin/gccstrictdepsArtturi1-4/+4
gcc/: correct gnused conditionals
2022-08-18gcc: drop unused libelf dependencySergei Trofimovich1-6/+2
gcc stopped using libelf in commit 48215350c24 ("re PR lto/46273 (Failed to bootstrap)") around 2010, before gcc-4.6.0.
2022-08-17gcc/: correct gnused conditionals and move to nativeBuildInputsArtturin1-4/+4
hostPlatform changes were done in commits like https://github.com/nixos/nixpkgs/commit/7a134572532323900a6661e5f1fea09b6dea3479 it should have been buildPlatform instead according to the comment
2022-08-05gcc: factor out $linkLib64toLib, move it from bash to nixAdam Joseph1-3/+1
This commit factors out the conditional which creates the `lib64->lib` symlink in the `preInstall` phase, and calculates its value in nix code rather than bash code so touching it doesn't cause a global rebuild on every platform.
2022-08-05gcc: do not create lib64->lib links on mips64n32Adam Joseph1-1/+1
On mips, gcc follows the somewhat awkward IRIX convention of putting mips64 binaries in `lib64` and mips64n32 binaries in `lib32`. So on mips64n32 we do not want the `lib64` symlinks.
2022-07-28Merge pull request #182513 from trofi/strip-for-host-and-targetBernardo Meurer1-9/+7
gcc: enable stripping for cross-compilers
2022-07-25gcc: enable stripping for cross-compilersSergei Trofimovich1-9/+7
With explicit support for distinction between Host and Target strip paths we can now safely strip ELF binaries with their according strip tools without fear of damaging binaries due to architecture mismatch. Closure size change for `pkgsCross.mingwW64.gcc12Stdenv.cc.cc`: # before: $ nix path-info -Sh $(nix-build -A pkgsCross.mingwW64.gcc12Stdenv.cc.cc) | unnix /<<NIX>>/x86_64-w64-mingw32-stage-final-gcc-debug-12.1.0 2.5G # after: $ nix path-info -Sh $(nix-build -A pkgsCross.mingwW64.gcc12Stdenv.cc.cc) | unnix /<<NIX>>/x86_64-w64-mingw32-stage-final-gcc-12.1.0 1.5G
2022-07-24gcc: always enable inhibit_libc=true for --without-headers buildsSergei Trofimovich1-1/+1
It's a follow-up to the breakage caused by 21966e13d2d72b91c ("gcc: pass --with-build-sysroot=/"). It caused `pkgsLLVM` cross-toolchain bootstrap breakage: $ nix build --no-link -f. pkgsLLVM.hello ... failed: /nix/store/...-x86_64-unknown-linux-gnu-stage-static-gcc-13.0.0.drv: ... configure flags: ... --enable-languages=c --disable-multilib \ --disable-shared --enable-plugin ... --disable-libssp --disable-nls \ --without-headers --disable-threads --disable-libgomp --disable-libquadmath \ --disable-shared --disable-libatomic --disable-decimal-float --disable-libmpx \ --disable-bootstrap \ \ --build=x86_64-unknown-linux-gnu \ --host=x86_64-unknown-linux-gnu \ --target=x86_64-unknown-linux-gnu ... The directory that should contain system headers does not exist: /usr/include make[2]: *** [Makefile:3279: stmp-fixinc] Error 1 shuffle=1658621302 rm gfdl.pod gcc.pod gcov-dump.pod gcov-tool.pod fsf-funding.pod gpl.pod cpp.pod gcov.pod lto-dump.pod make[2]: Leaving directory '/build/build/gcc' Note: it's a no-libc build. It's not expected to use any libc headers. But in this case fixincludes tries to run and uses default /usr/include location. Fixinsludes is not normally expected to run during cross-compilation on --without-headers. gcc/configure.ac: : ${inhibit_libc=false} if { { test x$host != x$target && test "x$with_sysroot" = x ; } || test x$with_newlib = xyes ; } && { test "x$with_headers" = xno || test ! -f "$target_header_dir/stdio.h"; } ; then inhibit_libc=true fi The change explicitly passes inhibit_libc=true to configure to disable include fixing on such cases. Fixed `nix build --no-link -f. pkgsLLVM.hello` toolchain bootstrap.
2022-06-29gcc10: 10.3.0 -> 10.4.0Vladimír Čunát1-5/+3
Patches: the two seemed included in the release; I also checked that the conditional patches still all apply.