mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: gcc-4.9: Inherit from gcc-base.
* gnu/packages/gcc.scm (gcc-4.9): Inherit from gcc-base. [arguments]: Add inherited phases. Take the version specific configure-flag from gcc-base. [inputs]: List specifically. [supported-systems]: New field. Change-Id: Iff481ef403faff7047bcb7a27cc13833d98e5de7 Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
This commit is contained in:
parent
926225ec3e
commit
88449118f2
1 changed files with 41 additions and 4 deletions
|
@ -208,8 +208,6 @@ where the OS part is overloaded to denote a specific ABI---into GCC
|
||||||
(cond
|
(cond
|
||||||
((version-prefix? "4.8" version)
|
((version-prefix? "4.8" version)
|
||||||
`(cons "CXX=g++ -std=c++03" ,flags))
|
`(cons "CXX=g++ -std=c++03" ,flags))
|
||||||
((version-prefix? "4.9" version)
|
|
||||||
`(cons "CXX=g++ -std=c++11" ,flags))
|
|
||||||
(else flags)))
|
(else flags)))
|
||||||
|
|
||||||
#:make-flags
|
#:make-flags
|
||||||
|
@ -534,7 +532,7 @@ Go. It also includes runtime support libraries for these languages.")
|
||||||
(prepend isl-0.11 cloog)))))
|
(prepend isl-0.11 cloog)))))
|
||||||
|
|
||||||
(define-public gcc-4.9
|
(define-public gcc-4.9
|
||||||
(package (inherit gcc-4.8)
|
(package (inherit gcc-base)
|
||||||
(version "4.9.4")
|
(version "4.9.4")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
|
@ -561,9 +559,48 @@ Go. It also includes runtime support libraries for these languages.")
|
||||||
(("struct ucontext") "ucontext_t")))
|
(("struct ucontext") "ucontext_t")))
|
||||||
'("aarch64" "alpha" "bfin" "i386" "m68k" "nios2"
|
'("aarch64" "alpha" "bfin" "i386" "m68k" "nios2"
|
||||||
"pa" "sh" "tilepro" "xtensa")))))
|
"pa" "sh" "tilepro" "xtensa")))))
|
||||||
|
(arguments
|
||||||
|
;; Since 'arguments' is a function of the package's version, define
|
||||||
|
;; 'parent' such that the 'arguments' thunk gets to see the right
|
||||||
|
;; version.
|
||||||
|
(let ((parent (package
|
||||||
|
(inherit gcc-base)
|
||||||
|
(version (package-version this-package)))))
|
||||||
|
(substitute-keyword-arguments (package-arguments parent)
|
||||||
|
((#:modules modules %default-gnu-modules)
|
||||||
|
`((srfi srfi-1)
|
||||||
|
,@modules))
|
||||||
|
((#:configure-flags flags '())
|
||||||
|
`(cons "CXX=g++ -std=c++11" ,flags))
|
||||||
|
;; For native builds of some GCC versions the C++ include path needs to
|
||||||
|
;; be adjusted so it does not interfere with GCC's own build processes.
|
||||||
|
((#:phases phases)
|
||||||
|
(if (%current-target-system)
|
||||||
|
phases
|
||||||
|
`(modify-phases ,phases
|
||||||
|
(add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(let ((libc (assoc-ref inputs "libc"))
|
||||||
|
(gcc (assoc-ref inputs "gcc")))
|
||||||
|
(setenv "CPLUS_INCLUDE_PATH"
|
||||||
|
(string-join (fold delete
|
||||||
|
(string-split (getenv "CPLUS_INCLUDE_PATH")
|
||||||
|
#\:)
|
||||||
|
(list (string-append libc "/include")
|
||||||
|
(string-append gcc "/include/c++")))
|
||||||
|
":"))
|
||||||
|
(format #t
|
||||||
|
"environment variable `CPLUS_INCLUDE_PATH' changed to ~a~%"
|
||||||
|
(getenv "CPLUS_INCLUDE_PATH")))))))))))
|
||||||
;; Override inherited texinfo-5 with latest version.
|
;; Override inherited texinfo-5 with latest version.
|
||||||
(native-inputs (list perl ;for manpages
|
(native-inputs (list perl ;for manpages
|
||||||
texinfo))))
|
texinfo))
|
||||||
|
(inputs
|
||||||
|
(modify-inputs (package-inputs gcc-base)
|
||||||
|
(prepend isl-0.11 cloog)))
|
||||||
|
(supported-systems (fold delete %supported-systems
|
||||||
|
'("riscv64-linux" "powerpc64le-linux"
|
||||||
|
"x86_64-gnu")))))
|
||||||
|
|
||||||
(define gcc-canadian-cross-objdump-snippet
|
(define gcc-canadian-cross-objdump-snippet
|
||||||
;; Fix 'libcc1/configure' error when cross-compiling GCC. Without that,
|
;; Fix 'libcc1/configure' error when cross-compiling GCC. Without that,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue