diff options
| author | Efraim Flashner <efraim@flashner.co.il> | 2024-12-17 09:24:12 +0200 |
|---|---|---|
| committer | Janneke Nieuwenhuizen <janneke@gnu.org> | 2026-01-28 21:47:41 +0100 |
| commit | 1edae6eb8a2e6de06606752c5df058fe3c446e45 (patch) | |
| tree | e81b47e4b4b1773431657a5242e42132a0494aec | |
| parent | 157f037e44b9fe3aeffb2d8ae2f3d7f267aa2285 (diff) | |
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
| -rw-r--r-- | gnu/packages/commencement.scm | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 953e1ae26c1..6161979e404 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm | |||
| @@ -2055,6 +2055,19 @@ ac_cv_c_float_format='IEEE (little-endian)' | |||
| 2055 | #$configure-flags)))) | 2055 | #$configure-flags)))) |
| 2056 | ((#:phases phases) | 2056 | ((#:phases phases) |
| 2057 | #~(modify-phases #$phases | 2057 | #~(modify-phases #$phases |
| 2058 | (add-after 'unpack 'adjust-builtin-cplusplus-variable | ||
| 2059 | (lambda _ | ||
| 2060 | ;; These values are backported from later releases of GCC. | ||
| 2061 | ;; See gcc commit 1fb80b0c5359f696aa61d537e25b7901d8b56ff7. | ||
| 2062 | (substitute* "libcpp/init.c" | ||
| 2063 | (("_cpp_define_builtin \\(pfile, \"__cplusplus 1\"\\);") | ||
| 2064 | (string-append "{ | ||
| 2065 | if (CPP_OPTION (pfile, lang) == CLK_CXX0X | ||
| 2066 | || CPP_OPTION (pfile, lang) == CLK_GNUCXX0X) | ||
| 2067 | _cpp_define_builtin (pfile, \"__cplusplus 201103L\"); | ||
| 2068 | else | ||
| 2069 | _cpp_define_builtin (pfile, \"__cplusplus 199711L\"); | ||
| 2070 | }"))))) | ||
| 2058 | (add-after 'apply-riscv64-patch 'apply-second-riscv64-patch | 2071 | (add-after 'apply-riscv64-patch 'apply-second-riscv64-patch |
| 2059 | (lambda* (#:key inputs #:allow-other-keys) | 2072 | (lambda* (#:key inputs #:allow-other-keys) |
| 2060 | (let ((patch-file | 2073 | (let ((patch-file |
