mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-01-31 06:46:50 +01:00
gnu: gcc-muslboot: Backport c++ builtin values.
* gnu/packages/commencement.scm (gcc-muslboot)[arguments]: Add a custom phase backporting the correct definitions for __cplusplus. Change-Id: I64a77dc4d4cb5936e650d37585145f171adc8572
This commit is contained in:
parent
741dc04c0c
commit
96c2dacf44
1 changed files with 13 additions and 0 deletions
|
@ -2031,6 +2031,19 @@ (define gcc-muslboot
|
||||||
#$configure-flags))))
|
#$configure-flags))))
|
||||||
((#:phases phases)
|
((#:phases phases)
|
||||||
#~(modify-phases #$phases
|
#~(modify-phases #$phases
|
||||||
|
(add-after 'unpack 'adjust-builtin-cplusplus-variable
|
||||||
|
(lambda _
|
||||||
|
;; These values are backported from later releases of GCC.
|
||||||
|
;; See gcc commit 1fb80b0c5359f696aa61d537e25b7901d8b56ff7.
|
||||||
|
(substitute* "libcpp/init.c"
|
||||||
|
(("_cpp_define_builtin \\(pfile, \"__cplusplus 1\"\\);")
|
||||||
|
(string-append "{
|
||||||
|
if (CPP_OPTION (pfile, lang) == CLK_CXX0X
|
||||||
|
|| CPP_OPTION (pfile, lang) == CLK_GNUCXX0X)
|
||||||
|
_cpp_define_builtin (pfile, \"__cplusplus 201103L\");
|
||||||
|
else
|
||||||
|
_cpp_define_builtin (pfile, \"__cplusplus 199711L\");
|
||||||
|
}")))))
|
||||||
(add-after 'apply-riscv64-patch 'apply-second-riscv64-patch
|
(add-after 'apply-riscv64-patch 'apply-second-riscv64-patch
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(let ((patch-file
|
(let ((patch-file
|
||||||
|
|
Loading…
Reference in a new issue