Skip to content
Snippets Groups Projects
Commit 270b501e authored by Mark H Weaver's avatar Mark H Weaver
Browse files

gnu: gcc-static: Remove -lgcc_s from GNU_USER_TARGET_LIB_SPEC.

* gnu/packages/make-bootstrap.scm (%gcc-static): Add 'remove-lgcc_s
  phase.
* gnu/packages/gcc.scm (gcc-4.7): Add comment.
parent 84cbe39c
No related branches found
No related tags found
No related merge requests found
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
...@@ -207,6 +208,11 @@ (define-public gcc-4.7 ...@@ -207,6 +208,11 @@ (define-public gcc-4.7
;; libgcc_s.so when pthread_cancel support is needed, but ;; libgcc_s.so when pthread_cancel support is needed, but
;; having it in the application's RUNPATH isn't enough; see ;; having it in the application's RUNPATH isn't enough; see
;; <http://sourceware.org/ml/libc-help/2013-11/msg00023.html>.) ;; <http://sourceware.org/ml/libc-help/2013-11/msg00023.html>.)
;;
;; NOTE: The '-lgcc_s' added below needs to be removed in a
;; later phase of %gcc-static. If you change the string
;; below, make sure to update the relevant code in
;; %gcc-static package as needed.
(format #f "#define GNU_USER_TARGET_LIB_SPEC \ (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 -lgcc_s}} \" ~a"
libc libc libdir libdir suffix)) libc libc libdir libdir suffix))
......
...@@ -430,7 +430,19 @@ (define %gcc-static ...@@ -430,7 +430,19 @@ (define %gcc-static
"--disable-libquadmath" "--disable-libquadmath"
"--disable-decimal-float") "--disable-decimal-float")
(remove (cut string-match "--(.*plugin|enable-languages)" <>) (remove (cut string-match "--(.*plugin|enable-languages)" <>)
,flags)))))) ,flags)))
((#:phases phases)
`(alist-cons-after
'pre-configure 'remove-lgcc_s
(lambda _
;; Remove the '-lgcc_s' added to GNU_USER_TARGET_LIB_SPEC in
;; the 'pre-configure phase of our main gcc package, because
;; that shared library is not present in this static gcc. See
;; <https://lists.gnu.org/archive/html/guix-devel/2015-01/msg00008.html>.
(substitute* (find-files "gcc/config"
"^gnu-user.*\\.h$")
((" -lgcc_s}}") "}}")))
,phases)))))
(native-inputs (native-inputs
(if (%current-target-system) (if (%current-target-system)
`(;; When doing a Canadian cross, we need GMP/MPFR/MPC both `(;; When doing a Canadian cross, we need GMP/MPFR/MPC both
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment