gnu: gcc: Disable RUNPATH validation for native builds.

* gnu/packages/gcc.scm (gcc-4.7)[arguments]: Pass
  #:validate-runpath? #f.
* gnu/packages/commencement.scm (gcc-boot0)[arguments]: Override
  #:validate-runpath? with 'substitute-keyword-arguments'.
  (gcc-final)[arguments]: Likewise.
* gnu/packages/cross-base.scm (cross-gcc-arguments): Likewise.
This commit is contained in:
Ludovic Courtès 2015-04-07 21:24:37 +02:00
parent 71b6716814
commit dfc8bb2071
3 changed files with 14 additions and 5 deletions

View File

@ -158,6 +158,8 @@
(srfi srfi-1) (srfi srfi-1)
(srfi srfi-26)) (srfi srfi-26))
,@(substitute-keyword-arguments (package-arguments gcc-4.8) ,@(substitute-keyword-arguments (package-arguments gcc-4.8)
((#:validate-runpath? _)
#t)
((#:configure-flags flags) ((#:configure-flags flags)
`(append (list ,(string-append "--target=" (boot-triplet)) `(append (list ,(string-append "--target=" (boot-triplet))
@ -500,11 +502,6 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
#:allowed-references ("out" "lib" ,glibc-final) #:allowed-references ("out" "lib" ,glibc-final)
;; Things like libasan.so and libstdc++.so NEED ld.so and/or
;; libgcc_s.so but RUNPATH is empty. This is a false positive, so turn
;; it off.
#:validate-runpath? #f
;; Build again GMP & co. within GCC's build process, because it's hard ;; Build again GMP & co. within GCC's build process, because it's hard
;; to do outside (because GCC-BOOT0 is a cross-compiler, and thus ;; to do outside (because GCC-BOOT0 is a cross-compiler, and thus
;; doesn't honor $LIBRARY_PATH, which breaks `gnu-build-system'.) ;; doesn't honor $LIBRARY_PATH, which breaks `gnu-build-system'.)
@ -529,6 +526,11 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
"/lib") "/lib")
flag)) flag))
,flags))) ,flags)))
((#:validate-runpath? _)
;; Things like libasan.so and libstdc++.so NEED ld.so and/or
;; libgcc_s.so but RUNPATH is empty. This is a false positive, so
;; turn it off.
#f)
((#:phases phases) ((#:phases phases)
`(alist-delete 'symlink-libgcc_eh ,phases))))) `(alist-delete 'symlink-libgcc_eh ,phases)))))

View File

@ -175,6 +175,8 @@ may be either a libc package or #f.)"
#t))) #t)))
,phases) ,phases)
phases))) phases)))
((#:validate-runpath? _)
#t)
((#:strip-binaries? _) ((#:strip-binaries? _)
;; Disable stripping as this can break binaries, with object files of ;; Disable stripping as this can break binaries, with object files of
;; libgcc.a showing up as having an unknown architecture. See ;; libgcc.a showing up as having an unknown architecture. See

View File

@ -189,6 +189,11 @@ where the OS part is overloaded to denote a specific ABI---into GCC
,(if stripped? "-g0" "-g"))))) ,(if stripped? "-g0" "-g")))))
#:tests? #f #:tests? #f
;; libstdc++.so NEEDs libgcc_s.so but somehow it doesn't get
;; $(libdir) in its RUNPATH, so turn it off.
#:validate-runpath? #f
#:phases #:phases
(alist-cons-before (alist-cons-before
'configure 'pre-configure 'configure 'pre-configure