Skip to content
Snippets Groups Projects
Commit ae061a17 authored by Iain Sandoe's avatar Iain Sandoe
Browse files

testsuite, ubsan: Add libstdc++ deps where required.

We use the ubsan tests from both C, C++, D and Fortran.
thee sanitizer libraries link to libstdc++.

When we are using the C/gdc/gfortran driver, and the target might
require a path to the libstdc++ (e.g. for handing -static-xxxx or
for embedded runpaths), we need to add a suitable option (or we get
fails at execution time because of the missing paths).

Conversely, we do not want to add multiple instances of these
paths (since that leads to failures on tools that report warnings
for duplicate runpaths).

This patch modifies the _init function to allow a sigle parameter
that determines whether the *asan_init should add a path for
libstdc++ (yes for C driver, no for C++ driver).
gcc/testsuite/ChangeLog:

	* g++.dg/ubsan/ubsan.exp:Add a parameter to init to say that
	we expect the C++ driver to provide paths for libstdc++.
	* gcc.dg/ubsan/ubsan.exp: Add a parameter to init to say that
	we need a path added for libstdc++.
	* gdc.dg/ubsan/ubsan.exp: Likewise.
	* gfortran.dg/ubsan/ubsan.exp: Likewise.
	* lib/ubsan-dg.exp: Handle a single parameter to init that
	requests addition of a path to libstdc++ to link flags.
parent a6afa0d0
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment