gcc/libstdc++-v3
Torbjörn SVENSSON 1e4664b97d libstdc++: /dev/null is not accessible on Windows
When running the DejaGNU testsuite on a toolchain built for native
Windows, the path /dev/null can't be used to open a stream to void.
On native Windows, the resource is instead named "nul".

In 17_intro/tag_type_explicit_ctor.cc, the following statement would
fail to match when the DejaGNU testsuite is running in cygwin with a
native toolchain.
// dg-error 53 "explicit" "" { target hosted }

The "target hosted"-check is using cpp to verify if _GLIBCXX_HOSTED is
defined and discards the output by simply redirecting it to /dev/null.
In v3_target_compile, it's overridden to "nul" for MinGW targets, but
the same rule applies when host is cygwin, so replace the condition
with a check for Windows.

The error in the log would look like this for the "target hosted" check:
cc1plus.exe: fatal error: opening output file /dev/null: No such file or directory

The tag_type_explicit_ctor.cc test fails with this on Windows:
.../tag_type_explicit_ctor.cc:53: error: converting to 'std::defer_lock_t' from initializer list would use explicit constructor 'constexpr std::defer_lock_t::defer_lock_t()'
.../tag_type_explicit_ctor.cc:54: error: converting to 'std::try_to_lock_t' from initializer list would use explicit constructor 'constexpr std::try_to_lock_t::try_to_lock_t()'
.../tag_type_explicit_ctor.cc:55: error: converting to 'std::try_to_lock_t' from initializer list would use explicit constructor 'constexpr std::try_to_lock_t::try_to_lock_t()'
.../tag_type_explicit_ctor.cc:67: error: converting to 'std::defer_lock_t' from initializer list would use explicit constructor 'constexpr std::defer_lock_t::defer_lock_t()'
.../tag_type_explicit_ctor.cc:68: error: converting to 'std::try_to_lock_t' from initializer list would use explicit constructor 'constexpr std::try_to_lock_t::try_to_lock_t()'
.../tag_type_explicit_ctor.cc:69: error: converting to 'std::adopt_lock_t' from initializer list would use explicit constructor 'constexpr std::adopt_lock_t::adopt_lock_t()'

Patch has been verified on Windows and Linux.

libstdc++-v3:

	* testsuite/lib/libstdc++.exp: Use "nul" for Windows, "/dev/null"
	for other environments.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
2024-02-06 08:22:03 +00:00
..
config Update copyright years. 2024-01-03 12:19:35 +01:00
doc libstdc++: Add all supported headers to lists in the manual 2024-01-31 09:42:38 +00:00
include libstdc++: Replace padding bits with bit-fields in __format::_Spec 2024-02-04 21:42:55 +00:00
libsupc++ libstdc++: use updated type for __unexpected_handler 2024-01-11 19:11:45 +00:00
po Update copyright years. 2024-01-03 12:19:35 +01:00
python libstdc++: Implement C++26 std::text_encoding (P1885R12) [PR113318] 2024-01-17 11:49:11 +00:00
scripts libstdc++: Add copyright and license text to new generated headers 2024-02-04 21:40:23 +00:00
src libstdc++: Fix libstdc++exp.a so it really does contain Filesystem TS symbols 2024-02-04 21:40:23 +00:00
testsuite libstdc++: /dev/null is not accessible on Windows 2024-02-06 08:22:03 +00:00
ChangeLog Daily bump. 2024-02-05 00:17:56 +00:00
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-2016
ChangeLog-2017
ChangeLog-2018
ChangeLog-2019
ChangeLog-2020
ChangeLog-2021
ChangeLog-2022 Rotate ChangeLog files. 2023-01-01 16:20:13 +01:00
ChangeLog-2023 Rotate ChangeLog files. 2024-01-03 11:29:39 +01:00
Makefile.am Update copyright years. 2024-01-03 12:19:35 +01:00
Makefile.in Allow overriding EXPECT 2023-12-22 10:24:56 +00:00
README
acinclude.m4 libstdc++: Enable std::text_encoding for darwin and FreeBSD 2024-01-31 09:42:39 +00:00
aclocal.m4 libstdc++: Don't use gstdint.h anymore 2022-10-29 00:55:42 +01:00
config.h.in libstdc++: Implement C++26 std::text_encoding (P1885R12) [PR113318] 2024-01-17 11:49:11 +00:00
configure libstdc++: Enable std::text_encoding for darwin and FreeBSD 2024-01-31 09:42:39 +00:00
configure.ac libstdc++: Implement C++26 std::text_encoding (P1885R12) [PR113318] 2024-01-17 11:49:11 +00:00
configure.host LoongArch: Adjust C++ multilib header layout. 2023-09-08 17:51:06 +08:00
crossconfig.m4 libstdc++: Allow emergency EH alloc pool size to be tuned [PR68606] 2022-10-11 16:21:48 +01:00
fragment.am
linkage.m4 libstdc++: Remove handling for underscore-prefixed libm functions [PR111638] 2023-11-11 00:41:08 +00:00

README

file: libstdc++-v3/README

New users may wish to point their web browsers to the file
index.html in the 'doc/html' subdirectory.  It contains brief
building instructions and notes on how to configure the library in
interesting ways.