mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: gcc-4.7: Add gcc-wrapper from gcc-final.
* gnu/packages/commencement.scm (gcc-boot0)[arguments]: Remove CC_FOR_BUILD strictness relaxing from #:make-flags. (gcc-final)[arguments]: Move stage "create-stage-wrapper" and related settings in #:configure-flags and #:make-flags to... * gnu/packages/gcc.scm (gcc-4.7)[arguments]: ...new "relax-gcc-14s-strictness stage here. Change-Id: I0c372a4f372281b54e44dd446b6e5ddac5841c5a
This commit is contained in:
parent
bb9cee6b43
commit
4c98f0d1f4
2 changed files with 32 additions and 34 deletions
|
@ -241,6 +241,33 @@ where the OS part is overloaded to denote a specific ABI---into GCC
|
|||
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-before 'configure 'relax-gcc-14s-strictness
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
(let ((bash (assoc-ref inputs "bash"))
|
||||
(wrapper (string-append (getcwd) "/gcc.sh"))
|
||||
(stage-wrapper (string-append (getcwd) "/stage-gcc.sh")))
|
||||
(with-output-to-file wrapper
|
||||
(lambda _
|
||||
(format #t "#! ~a/bin/bash
|
||||
exec gcc \"$@\" \
|
||||
-Wno-error=implicit-function-declaration"
|
||||
bash)))
|
||||
(chmod wrapper #o555)
|
||||
(with-output-to-file stage-wrapper
|
||||
(lambda _
|
||||
(format #t "#! ~a/bin/bash
|
||||
exec \"$@\" \
|
||||
-Wno-error=implicit-function-declaration"
|
||||
bash)))
|
||||
(chmod stage-wrapper #o555)
|
||||
;; Rather than adding CC to #:configure-flags and
|
||||
;; STAGE_CC_WRAPPER to #:make-flags, we add them to the
|
||||
;; environment in this easily removable stage.
|
||||
(cond (,(%current-target-system) ;cross-build?
|
||||
(setenv "CC_FOR_BUILD" wrapper))
|
||||
(else
|
||||
(setenv "CC" wrapper)
|
||||
(setenv "STAGE_CC_WRAPPER" stage-wrapper))))))
|
||||
(add-before 'configure 'pre-configure
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||
(let ((libdir ,(libdir))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue