After the "hack" introduced for <https://issues.guix.gnu.org/42392>, all GCCs
are built with the current GCC's libstdc++ headers. This results in subtly
broken C++ headers in older versions, which aren't necessarily compatible with
libstdc++s from other versions.
For example, this test case works with GCC 11:
$ guix shell --container --emulate-fhs --pure -e '(@ (gnu packages gcc) gcc)' binutils -- sh -c 'echo -e "#include <cmath>\nint main() { return std::isnan(0); }" | g++ -x c++ -; echo $?'
0
but fails with GCC 9:
$ guix shell --container --emulate-fhs --pure -e '(@ (gnu packages gcc) gcc-9)' binutils -- sh -c 'echo -e "#include <cmath>\nint main() { return std::isnan(0); }" | g++ -x c++ -; echo $?'
In file included from /gnu/store/gkh2rljdrnj24q1q7baa6bhb119251w4-profile/include/c++/cmath:45,
from <stdin>:1:
<stdin>: In function 'int main()':
<stdin>:2:26: error: '__builtin_isnan' is not a member of 'std'; did you mean '__builtin_isnan'?
<built-in>: note: '__builtin_isnan' declared here
1
This specific error can be traced back to the GCC build, where GCC 10 and 11
are configured with:
checking for ISO C99 support in <math.h> for C++11... yes
but GCC 9 is configured with:
checking for ISO C99 support in <math.h> for C++11... no
The configure check fails due to errors like these due to the mismatched
libstdc++:
configure:17817: checking for ISO C99 support in <math.h> for C++11
[…]
In file included from /gnu/store/y3kk0ybf7hqwndl8xpm61r4a5b3lhwix-libstdc++-11.4.0/include/cmath:41,
from /gnu/store/y3kk0ybf7hqwndl8xpm61r4a5b3lhwix-libstdc++-11.4.0/include/math.h:36,
from conftest.cpp:41:
/gnu/store/y3kk0ybf7hqwndl8xpm61r4a5b3lhwix-libstdc++-11.4.0/include/bits/c++config.h:491:18: error: missing binary operator before token "("
491 | #if __has_builtin(__builtin_is_constant_evaluated)
| ^
Updating libstdc++ to reference each GCC works around this.
* gnu/packages/gcc.scm (libstdc++, libstdc++-headers): Remove variables.
(make-libstdc++-headers): New procedure.
(gcc-6)[native-inputs]: Use it with `this-package'.
Change-Id: Ie05878c83860c4ccc29d66b916d11613e367e142
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Modified-by: Ludovic Courtès <ludo@gnu.org>
* gnu/packages/commencement.scm (gash-utils-boot)[arguments]: Use #:modules
instead of a non-top-level ‘use-modules’. Turn #:phases into a gexp.
Use ‘search-input-file’ in ‘make-echo’ phase.
[inputs, native-inputs]: Remove labels.
Change-Id: Ib0eaa8a9ba4272b423fdb34a0eaf56b3a93ac7d4
* gnu/packages/commencement.scm (gash-boot)[arguments]: Shorten
symlinks created in ‘install-symlinks’.
Change-Id: I1300b31db615ab5fd9674c5a2d2aca1b7f600fcd
* gnu/packages/commencement.scm (gash-boot)[arguments]: Use #:modules
instead of a non-top-level ‘use-modules’. Turn #:phases into a gexp.
[inputs, native-inputs]: Remove labels.
Change-Id: I1e18b3ef76bb681494f76dded0dbd3b88cb9c462
* gnu/packages/commencement.scm (bootar)[arguments]: Use
‘search-input-file’ and use gexps. Remove non-top-level ‘use-modules’
from #:phases and pass #:modules instead.
[inputs]: Remove label.
Change-Id: Idb962dc5f886ec13ef10b90ea6b4d1292b412312
* guix/build/gnu-build-system.scm (configure): Use ‘search-input-file’
instead of ‘assoc-ref’ when looking for bash.
* gnu/packages/commencement.scm (%boot-gash-inputs): Update comment.
Change-Id: Ie95e95cfeb9f004fd304ff2af471ea5840af2b2e
* gnu/packages/base.scm (coreutils): Similarly to
Nix (https://github.com/NixOS/nixpkgs/pull/190211), disable
tests/cp/reflink-auto.sh test as it can fail on Btrfs. This was
discovered by the cuirass.genenetwork.org build farm.
Change-Id: If1cc3d516c5807e580ec64ab93670e30090581a7
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
During the update of glibc from 2.35 to 2.39, the crypt.h header has
been removed from glibc's include path. Packages depending on this
header from minizip have no access to it anymore. Remove this phase.
* gnu/packages/compression.scm (minizip)[arguments]{phases}:
Delete 'remove-crypt-h phase.
Change-Id: I645f3f2e2aac821faa02dd4642071a983185cabf
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* gnu/packages/pciutils.scm (pciutils)[arguments]: Use G-expressions.
Simplify the use of cc-for-target.
[inputs]: Remove labels.
Change-Id: I1d19d2a8c4c01a2ea9a7b75a1fa224734710b43f
* gnu/packages/commencement.scm (gcc-boot0): Use gcc-5 for libstdc++-boot0
when building on i586-gnu.
Change-Id: I17b29192d0496ecefa1e0c0342ace7961bbd67fd
* gnu/packages/hurd.scm (gnumach)[native-inputs]: Replace automake and
texinfo-4 with automake-1.16.5 and texinfo.
Change-Id: I16453207eb45019c0af01f8ef073960651ba6958
* gnu/packages/hurd.scm (gnumach-headers)[native-inputs]: Replace automake and
texinfo-4 with automake-1.16.5 and texinfo.
Change-Id: Id7f0eeb6799e1b34eecb0f7b562507ecdb0632bc
* gnu/packages/base.scm (sed): Update to 4.9.
* gnu/packages/commencement.scm (sed-mesboot): Keep version on 4.8.
Change-Id: I9a279e67c88cbc549d4964af012b50a2b25c04e9
* gnu/packages/patches/binutils-2.41-fix-cross.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register it.
* gnu/packages/base.scm (binutils): Update to 2.44 and use it.
Change-Id: Ia54b0e7a076b1fe162524bf76a1ab4031792bc32
* gnu/packages/bash.scm (bash): Update to 5.2.37.
(patch-url): Update it.
(%patch-series-5.1): Rename to %patch-series-5.2 and update it.
* gnu/packages/patches/bash-linux-pgrp-pipe.patch: Adjust it.
Change-Id: I26c070ea3256e77d3a7658190339dc080fc0bc63
* gnu/packages/readline.scm (readline): Update to 8.2.13.
(%patch-series-8.1): Rename to %patch-series-8.2 and update it.
Change-Id: I9fdf4167084d3894871fd363b3b2122cdefe36fb