gnu: gcc-4.8: Unbreak embedded builds.

* gnu/packages/gcc.scm (gcc-4.8)[arguments]: When cross-compiling don't
adjust the inherited modules.

Change-Id: Idbe1b6c4a3c2e9d1fe0ca5b1e9fa922080e9de86
This commit is contained in:
Efraim Flashner 2025-09-08 12:49:14 +03:00
parent 3614c6d1b5
commit b0333c8b5b
No known key found for this signature in database
GPG key ID: 41AAE7DCCA3D8351

View file

@ -494,17 +494,19 @@ Go. It also includes runtime support libraries for these languages.")
(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++03" ,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
(if (%current-target-system)
(substitute-keyword-arguments (package-arguments parent)
((#:configure-flags flags '())
`(cons "CXX=g++ -std=c++03" ,flags)))
(substitute-keyword-arguments (package-arguments parent)
((#:modules modules %default-gnu-modules)
`((srfi srfi-1)
,@modules))
((#:configure-flags flags '())
`(cons "CXX=g++ -std=c++03" ,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)
`(modify-phases ,phases
(add-after 'set-paths 'adjust-CPLUS_INCLUDE_PATH
(lambda* (#:key inputs #:allow-other-keys)