mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: gcc: Use 'gcc-configure-flags-for-triplet' for native compilers too.
* gnu/packages/gcc.scm (gcc-configure-flags-for-triplet): Do not export it. (gcc-4.7): Pass the result of 'gcc-configure-flags-for-triplet' to configure for all builds, including native ones. * gnu/packages/cross-base.scm (cross-gcc-arguments): Do not add the result of 'gcc-configure-flags-for-triplet' here, since it is now included in the configure-flags inherited from gcc-4.8.
This commit is contained in:
parent
8eb8048432
commit
76e639a00f
2 changed files with 6 additions and 7 deletions
|
@ -88,7 +88,6 @@ may be either a libc package or #f.)"
|
||||||
(substitute-keyword-arguments (package-arguments gcc-4.8)
|
(substitute-keyword-arguments (package-arguments gcc-4.8)
|
||||||
((#:configure-flags flags)
|
((#:configure-flags flags)
|
||||||
`(append (list ,(string-append "--target=" target)
|
`(append (list ,(string-append "--target=" target)
|
||||||
,@(gcc-configure-flags-for-triplet target)
|
|
||||||
,@(if libc
|
,@(if libc
|
||||||
'()
|
'()
|
||||||
`( ;; Disable features not needed at this stage.
|
`( ;; Disable features not needed at this stage.
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
;; Base URL for GCC's infrastructure.
|
;; Base URL for GCC's infrastructure.
|
||||||
"ftp://gcc.gnu.org/pub/gcc/infrastructure/")
|
"ftp://gcc.gnu.org/pub/gcc/infrastructure/")
|
||||||
|
|
||||||
(define-public (gcc-configure-flags-for-triplet target)
|
(define (gcc-configure-flags-for-triplet target)
|
||||||
"Return a list of additional GCC `configure' flags for TARGET, a GNU triplet.
|
"Return a list of additional GCC `configure' flags for TARGET, a GNU triplet.
|
||||||
|
|
||||||
The purpose of this procedure is to translate extended GNU triplets---e.g.,
|
The purpose of this procedure is to translate extended GNU triplets---e.g.,
|
||||||
|
@ -102,11 +102,11 @@ where the OS part is overloaded to denote a specific ABI---into GCC
|
||||||
"/include")
|
"/include")
|
||||||
"--without-headers")))
|
"--without-headers")))
|
||||||
|
|
||||||
;; When cross-compiling GCC, pass the right options for the
|
;; Pass the right options for the target triplet.
|
||||||
;; target triplet.
|
(let ((triplet
|
||||||
(or (and=> (%current-target-system)
|
(or (%current-target-system)
|
||||||
gcc-configure-flags-for-triplet)
|
(nix-system->gnu-triplet (%current-system)))))
|
||||||
'())
|
(gcc-configure-flags-for-triplet triplet))
|
||||||
|
|
||||||
(maybe-target-tools))))))
|
(maybe-target-tools))))))
|
||||||
(package
|
(package
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue