]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++, Darwin: Do not use dev/null as the file for executables.
authorIain Sandoe <iain@sandoe.co.uk>
Tue, 19 Mar 2024 10:40:50 +0000 (10:40 +0000)
committerIain Sandoe <iain@sandoe.co.uk>
Sun, 21 Apr 2024 13:03:09 +0000 (14:03 +0100)
commit678f6bc1655d9bf4ecec06e733122823a512ee4d
treea4f201f0b0fbfdc285ca6cc0b00da29868f958a2
parentd450d2b3d0b36d5f2715f204cb0ad2ff1759d3c8
libstdc++, Darwin: Do not use dev/null as the file for executables.

Darwin has a separate debug linker, which is invoked when the command
line contains source files and debug is enabled.

Using /dev/null as the executable name does not, therefore, work when
debug is enabled, since the debug linker does not accept /dev/null as
a valid executable name.

The leads to incorrectly UNSUPPORTED testcases because of the unintended
error result from the test compilation.

The solution here is to use a temporary file that is deleted at the
end of the test (which is the mechanism used elsewhere)

libstdc++-v3/ChangeLog:

* testsuite/lib/libstdc++.exp (v3_target_compile): Instead of
/dev/null, use a temporary file for test executables on Darwin.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
(cherry picked from commit e47330d0742c985fd8d5fe7089aa381d34967d61)
libstdc++-v3/testsuite/lib/libstdc++.exp