guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: Revert "gnu: gcc: Add '-lgcc_s' only when '-pthread' is given."


From: Mark H. Weaver
Subject: 01/01: Revert "gnu: gcc: Add '-lgcc_s' only when '-pthread' is given."
Date: Wed, 07 Jan 2015 14:54:21 +0000

mhw pushed a commit to branch core-updates
in repository guix.

commit fa1e2f3d0d04a2d8e841c6d77244739c00176e9a
Author: Mark H Weaver <address@hidden>
Date:   Wed Jan 7 09:51:23 2015 -0500

    Revert "gnu: gcc: Add '-lgcc_s' only when '-pthread' is given."
    
    This reverts commit 9097e666d48c9b6c0263dcbe60b5af69ff7689f4.
    
    This turned out not to be a good strategy.  Some build system, e.g. tcl's, 
do
    not pass -pthread on GNU/Linux by default, but merely link with -lpthread.
    Also, Ludovic found other cases where libgcc_s is dlopened by libc that have
    nothing to do with pthreads, e.g. to walk the stack.
---
 gnu/packages/gcc.scm |   14 ++++++--------
 1 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index df16119..a510af4 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -1,6 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <address@hidden>
-;;; Copyright © 2015 Mark H Weaver <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -202,15 +201,14 @@ 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.)  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
+                   ;; 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
                    ;; 
<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 %{pthread:-lgcc_s}}} \" ~a"
+\"-L~a/lib %{!static:-rpath=~a/lib %{!static-libgcc:-rpath=~a/lib64 
-rpath=~a/lib -lgcc_s}} \" ~a"
                            libc libc libdir libdir suffix))
                   (("#define GNU_USER_TARGET_STARTFILE_SPEC.*$" line)
                    (format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib\"



reply via email to

[Prev in Thread] Current Thread [Next in Thread]