diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2022-03-16 12:09:42 +0200 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2022-03-16 12:09:42 +0200 |
commit | 32f52f82b3206f27669ba89d0f6f657e3f389ec3 (patch) | |
tree | 2809d3b5703d7e1ad06052de5475e91b551d9a6f /gnu/packages/gcc.scm | |
parent | 53370c7b03b1302e7c84781184fe52a8f6c315c5 (diff) | |
download | guix-32f52f82b3206f27669ba89d0f6f657e3f389ec3.tar.gz |
gnu: gcc: For riscv64-linux remove STARTFILE_PREFIX_SPEC.
* gnu/packages/gcc.scm (gcc-4.7)[arguments]: When building for riscv64-linux and the 'gcc/configure/riscv' directory exists adjust the STARTFILE_PREFIX_SPEC so it doesn't do anything.
Diffstat (limited to 'gnu/packages/gcc.scm')
-rw-r--r-- | gnu/packages/gcc.scm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index e00ecd947b..cd1635aff3 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -294,6 +294,16 @@ where the OS part is overloaded to denote a specific ABI---into GCC (substitute* "gcc/config/aarch64/t-aarch64-linux" (("lib64") "lib"))) + ;; TODO: Make this unconditional in core-updates. + ;; The STARTFILE_PREFIX_SPEC prevents gcc from finding the + ;; gcc:lib output, which causes ld to not find -lgcc_s. + ,@(if (target-riscv64?) + `((when (file-exists? "gcc/config/riscv") + (substitute* "gcc/config/riscv/linux.h" + (("define STARTFILE_PREFIX_SPEC") + "define __STARTFILE_PREFIX_SPEC")))) + '()) + (when (file-exists? "libbacktrace") ;; GCC 4.8+ comes with libbacktrace. By default it builds ;; with -Werror, which fails with a -Wcast-qual error in glibc |