aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/gcc.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-11-18 00:09:45 +0100
committerLudovic Courtès <ludo@gnu.org>2013-11-18 00:09:45 +0100
commit65d3b7c31ddda37fd721cf4ee1e538d3dc9727c7 (patch)
tree1f16fe50cbdc437cb485a0bd01b03d78bf550052 /gnu/packages/gcc.scm
parent9ca8b5ac559735af29ab04c9f0797e6549e6f3d2 (diff)
downloadpatches-65d3b7c31ddda37fd721cf4ee1e538d3dc9727c7.tar
patches-65d3b7c31ddda37fd721cf4ee1e538d3dc9727c7.tar.gz
gnu: gcc: Always link against libgcc_s.so.
* gnu/packages/gcc.scm (gcc-4.7)[pre-configure]: Add snippet to #undef USE_LD_AS_NEEDED.
Diffstat (limited to 'gnu/packages/gcc.scm')
-rw-r--r--gnu/packages/gcc.scm12
1 files changed, 12 insertions, 0 deletions
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index db1984306e..f11e506bc7 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -173,6 +173,18 @@ where the OS part is overloaded to denote a specific ABI---into GCC
~a"
libc line))))
+ ;; Use '-lgcc_s' rather than '--as-needed -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>.)
+ ;; Also, "gcc_cv_ld_as_needed=no" as a configure flag doesn't
+ ;; work.
+ (substitute* "gcc/gcc.c"
+ (("#ifndef USE_LD_AS_NEEDED.*$" line)
+ (string-append "#undef USE_LD_AS_NEEDED\n" line)))
+
;; Don't retain a dependency on the build-time sed.
(substitute* "fixincludes/fixincl.x"
(("static char const sed_cmd_z\\[\\] =.*;")