public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <jeffreyalaw@gmail.com>
To: iain@sandoe.co.uk, gcc-patches@gcc.gnu.org
Cc: ro@CeBiTec.Uni-Bielefeld.DE
Subject: Re: [PATCH] testsuite, asan, hwsan: Add libstdc++ deps where required.
Date: Fri, 2 Feb 2024 07:16:35 -0700	[thread overview]
Message-ID: <ca25c0f3-bcdb-43a0-b84d-663894cccc61@gmail.com> (raw)
In-Reply-To: <20240130103015.1845-1-iain@sandoe.co.uk>



On 1/30/24 03:30, Iain Sandoe wrote:
> tested on i686, x86_64 (and aarch64) Darwin, x86_64, aarch64 Linux,
> OK for trunk?
> thanks
> Iain
> 
> --- 8< ---
> 
> We use the shared asan/hwasan from both C,C++,D and Fortran.
> The 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 single 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/asan/asan.exp: Add a parameter to init to say that
> 	we expect the C++ driver to provide paths for libstdc++.
> 	* g++.dg/hwasan/hwasan.exp: Likewise
> 	* gcc.dg/asan/asan.exp: Add a parameter to init to say that
> 	we need a path added for libstdc++.
> 	* gcc.dg/hwasan/hwasan.exp: Likewise.
> 	* gdc.dg/asan/asan.exp: Likewise.
> 	* gfortran.dg/asan/asan.exp: Likewise.
> 	* lib/asan-dg.exp: Handle a single parameter to init that
> 	requests addition of a path to libstdc++ to link flags.
> 	* lib/hwasan-dg.exp: Likewise.
OK.  I don't think we really need to wait for the sanitizer folks to 
chime in.  This is just getting the link bits right, not twiddling the 
sanitizer itself.

jeff

      parent reply	other threads:[~2024-02-02 14:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-30 10:30 Iain Sandoe
2024-02-02  0:07 ` Mike Stump
2024-02-02 14:16 ` Jeff Law [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ca25c0f3-bcdb-43a0-b84d-663894cccc61@gmail.com \
    --to=jeffreyalaw@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iain@sandoe.co.uk \
    --cc=ro@CeBiTec.Uni-Bielefeld.DE \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).