[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/06: gnu: gcc-static: Remove -lgcc_s from GNU_USER_TARGET_LIB_SPEC.
From: |
Mark H. Weaver |
Subject: |
03/06: gnu: gcc-static: Remove -lgcc_s from GNU_USER_TARGET_LIB_SPEC. |
Date: |
Wed, 07 Jan 2015 17:34:00 +0000 |
mhw pushed a commit to branch core-updates
in repository guix.
commit 270b501ee2b1b4ea4003a60b5568fc4dcb09d9db
Author: Mark H Weaver <address@hidden>
Date: Thu Jan 1 22:53:55 2015 -0500
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.
---
gnu/packages/gcc.scm | 6 ++++++
gnu/packages/make-bootstrap.scm | 14 +++++++++++++-
2 files changed, 19 insertions(+), 1 deletions(-)
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index a510af4..c9f9ab0 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 <address@hidden>
+;;; Copyright © 2014, 2015 Mark H Weaver <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -207,6 +208,11 @@ where the OS part is overloaded to denote a specific
ABI---into GCC
;; 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>.)
+ ;;
+ ;; 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 \
\"-L~a/lib %{!static:-rpath=~a/lib %{!static-libgcc:-rpath=~a/lib64
-rpath=~a/lib -lgcc_s}} \" ~a"
libc libc libdir libdir suffix))
diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm
index f6ef2e3..88fad0e 100644
--- a/gnu/packages/make-bootstrap.scm
+++ b/gnu/packages/make-bootstrap.scm
@@ -430,7 +430,19 @@ for `sh' in $PATH, and without nscd, and with static NSS
modules."
"--disable-libquadmath"
"--disable-decimal-float")
(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
(if (%current-target-system)
`(;; When doing a Canadian cross, we need GMP/MPFR/MPC both
- branch core-updates updated (c9a4655 -> 24aaf2f), Mark H. Weaver, 2015/01/07
- 03/06: gnu: gcc-static: Remove -lgcc_s from GNU_USER_TARGET_LIB_SPEC.,
Mark H. Weaver <=
- 02/06: gnu: bootstrap: Fix egrep and fgrep after unpacking bootstrap binaries., Mark H. Weaver, 2015/01/07
- 04/06: Move 'nix-system->gnu-triplet' to (guix utils) and export it., Mark H. Weaver, 2015/01/07
- 01/06: gnu: bootstrap: Add support for snippets to 'package-from-tarball'., Mark H. Weaver, 2015/01/07
- 05/06: gnu: gcc: Use 'gcc-configure-flags-for-triplet' for native compilers too., Mark H. Weaver, 2015/01/07
- 06/06: gnu: gmp: Apply fixes for armhf., Mark H. Weaver, 2015/01/07