diff options
author | Mark H Weaver <mhw@netris.org> | 2015-01-01 22:53:55 -0500 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2015-01-06 19:46:48 -0500 |
commit | 9097e666d48c9b6c0263dcbe60b5af69ff7689f4 (patch) | |
tree | a82c682bfb7177d3395df2e5f9b210c13d30e2b1 /gnu | |
parent | 91c47befb889ec2242078776cf58541eba8f938a (diff) | |
download | patches-9097e666d48c9b6c0263dcbe60b5af69ff7689f4.tar patches-9097e666d48c9b6c0263dcbe60b5af69ff7689f4.tar.gz |
gnu: gcc: Add '-lgcc_s' only when '-pthread' is given.
Suggested by Ludovic Courtès <ludo@gnu.org>.
* gnu/packages/gcc.scm (gcc-4.7): In our modified GNU_USER_TARGET_LIB_SPEC,
add '-lgcc_s' only when '-pthread' is given.
Diffstat (limited to 'gnu')
-rw-r--r-- | gnu/packages/gcc.scm | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index a510af48a0..df161193c1 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -201,14 +202,15 @@ where the OS part is overloaded to denote a specific ABI---into GCC (substitute* (find-files "gcc/config" "^gnu-user.*\\.h$") (("#define GNU_USER_TARGET_LIB_SPEC (.*)$" _ suffix) - ;; Help libgcc_s.so be found (see also below.) Always use - ;; '-lgcc_s' so that libgcc_s.so is always found by those - ;; programs that use 'pthread_cancel' (glibc dlopens - ;; libgcc_s.so when pthread_cancel support is needed, but - ;; having it in the application's RUNPATH isn't enough; see + ;; Help libgcc_s.so be found (see also below.) When + ;; -pthread is given, use '-lgcc_s' so that libgcc_s.so is + ;; always found by those programs that use 'pthread_cancel' + ;; (glibc dlopens libgcc_s.so when pthread_cancel support + ;; is needed, but having it in the application's RUNPATH + ;; isn't enough; see ;; <http://sourceware.org/ml/libc-help/2013-11/msg00023.html>.) (format #f "#define GNU_USER_TARGET_LIB_SPEC \ -\"-L~a/lib %{!static:-rpath=~a/lib %{!static-libgcc:-rpath=~a/lib64 -rpath=~a/lib -lgcc_s}} \" ~a" +\"-L~a/lib %{!static:-rpath=~a/lib %{!static-libgcc:-rpath=~a/lib64 -rpath=~a/lib %{pthread:-lgcc_s}}} \" ~a" libc libc libdir libdir suffix)) (("#define GNU_USER_TARGET_STARTFILE_SPEC.*$" line) (format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib\" |