diff options
author | Randy Eckenrode <randy@largeandhighquality.com> | 2023-11-06 16:44:29 -0500 |
---|---|---|
committer | Adam Joseph <54836058+amjoseph-nixpkgs@users.noreply.github.com> | 2023-11-08 10:50:07 +0000 |
commit | d4f8aac2c57ff594fea2ffa4ed95e84af5036e1d (patch) | |
tree | 5aa22410eb5ceb588a2a7cdddc1a4c87ac16534c /pkgs/development/compilers/gcc | |
parent | e06f05d23c7dfa5d5cb73d416e612dd02b337f7d (diff) | |
download | nixlib-d4f8aac2c57ff594fea2ffa4ed95e84af5036e1d.tar nixlib-d4f8aac2c57ff594fea2ffa4ed95e84af5036e1d.tar.gz nixlib-d4f8aac2c57ff594fea2ffa4ed95e84af5036e1d.tar.bz2 nixlib-d4f8aac2c57ff594fea2ffa4ed95e84af5036e1d.tar.lz nixlib-d4f8aac2c57ff594fea2ffa4ed95e84af5036e1d.tar.xz nixlib-d4f8aac2c57ff594fea2ffa4ed95e84af5036e1d.tar.zst nixlib-d4f8aac2c57ff594fea2ffa4ed95e84af5036e1d.zip |
gcc{48,49,6}: don’t use -pipe with clang assembler
Older versions of GCC use `-pipe` on Darwin due to compatibility problems with older cctools assemblers. Darwin now uses the clang integrated assembler. While it is possible to pipe input into it, the wrapper used in nixpkgs is not set up for it. Fixing the wrapper would cause all of Darwin to rebuild, which is not desirable, so just disable `-pipe` in the bootstrap configuration. The clang integrated assembler doesn’t have the bug anyway.
Diffstat (limited to 'pkgs/development/compilers/gcc')
-rw-r--r-- | pkgs/development/compilers/gcc/patches/4.9/darwin-clang-as.patch | 16 | ||||
-rw-r--r-- | pkgs/development/compilers/gcc/patches/default.nix | 6 |
2 files changed, 22 insertions, 0 deletions
diff --git a/pkgs/development/compilers/gcc/patches/4.9/darwin-clang-as.patch b/pkgs/development/compilers/gcc/patches/4.9/darwin-clang-as.patch new file mode 100644 index 000000000000..095713eb6c8c --- /dev/null +++ b/pkgs/development/compilers/gcc/patches/4.9/darwin-clang-as.patch @@ -0,0 +1,16 @@ +diff -ur a/libgcc/config/t-darwin b/libgcc/config/t-darwin +--- a/libgcc/config/t-darwin 2012-07-14 09:50:59.000000000 -0400 ++++ b/libgcc/config/t-darwin 2023-11-05 21:26:11.696825584 -0500 +@@ -7,12 +7,6 @@ + crttme.o: $(srcdir)/config/darwin-crt-tm.c + $(crt_compile) $(DARWIN_EXTRA_CRT_BUILD_CFLAGS) -DEND -c $< + +-# -pipe because there's an assembler bug, 4077127, which causes +-# it to not properly process the first # directive, causing temporary +-# file names to appear in stabs, causing the bootstrap to fail. Using -pipe +-# works around this by not having any temporary file names. +-HOST_LIBGCC2_CFLAGS += -pipe +- + # Use unwind-dw2-fde-darwin + LIB2ADDEH = $(srcdir)/unwind-dw2.c $(srcdir)/config/unwind-dw2-fde-darwin.c \ + $(srcdir)/unwind-sjlj.c $(srcdir)/unwind-c.c diff --git a/pkgs/development/compilers/gcc/patches/default.nix b/pkgs/development/compilers/gcc/patches/default.nix index 2052d0f674f2..8e295e161869 100644 --- a/pkgs/development/compilers/gcc/patches/default.nix +++ b/pkgs/development/compilers/gcc/patches/default.nix @@ -243,6 +243,12 @@ in ./6/gnat-glibc234.patch ] +# The clang-based assembler used in darwin.cctools-llvm (LLVM >11) does not support piping input. +# Fortunately, it does not exhibit the problem GCC has with the cctools assembler. +# This patch can be dropped should darwin.cctools-llvm ever implement support. +++ optional (!atLeast7 && hostPlatform.isDarwin && lib.versionAtLeast (lib.getVersion stdenv.cc) "12") ./4.9/darwin-clang-as.patch + + ## gcc 4.9 and older ############################################################################## ++ optional (!atLeast6) ./parallel-bconfig.patch |