From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd36.google.com (mail-io1-xd36.google.com [IPv6:2607:f8b0:4864:20::d36]) by sourceware.org (Postfix) with ESMTPS id 1776F3858403 for ; Fri, 2 Feb 2024 14:16:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 1776F3858403 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 1776F3858403 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::d36 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706883400; cv=none; b=X2VtiO57AE+H+yLM9XI+vxWJn1zOjzKTmmtYbq2h0e3E9TWS0ANyW+96a9hU9pTVXnRUiTEyKbDT1PvLDnC+P0Uvg2aBkSzE0SprpXQmVl5RdlV52jljarS10aUW0px5pA0zRnYHSDvIrdGU7ROzSFucPLcmyzxn4keoHxfQGQM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706883400; c=relaxed/simple; bh=kLj2oi7if/w2sMEMqS7kOefg9GltjuwtyofqbYcqKLw=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=GJDNIp17xEnOGUsaZxzuzY2f/ORPBSQFP7jVZjWNEWOU1ho57deegTfeY+iniqfh/x/AL+5VNodpU93b0ZY7qJRI2rF60Bc6qs0ryeYscieeywxvk8j7R6J0YROSsbOM4VpsDqF1UNnM2srgAFZViLPyCC9xg40u1aGNyZm8urQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-io1-xd36.google.com with SMTP id ca18e2360f4ac-7bffface817so90249839f.3 for ; Fri, 02 Feb 2024 06:16:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706883397; x=1707488197; darn=gcc.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=96R/N0ASFJQifG+BekVpIM0v8dxRq1E4RwAJ2WRfQQA=; b=mFqxT5NwBHwBypYyEapSIPSBs51GPb7CdaCGW99/Ii6N/EDyhoXX8uFuSx1ERasd2u SvsgU4sULhPQxbFDdnNA6dD5d3PMcvhw62SSJId4bOpo5ML/1FhhYPzSedy5SrU+RWIF hhIqN7xO2N+Lsy/OTj987T5u8BC4cEPhGvb4YAYEdpAloq5nJwb3FyleNqsEXfKCsPou +dG4PZ8IHlQBU+tCjsQ30pa/ChAtW2Wo0qfzDpb8HLwejAdUMEMR+zgvD/iklnIsqPRb z59aDcR56R26vwo5R3ysCTjLU5KMAtN6AavrXUgSexr3be3KcYmWgkSWbLP/Fg3naCmO iHKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706883397; x=1707488197; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=96R/N0ASFJQifG+BekVpIM0v8dxRq1E4RwAJ2WRfQQA=; b=eDTMcRWgfzZCMndq8YEXb/LYp49+EtLWfUPZpqJeK8syoHMvjhCgHF+9k7uASeI7BO sPJA9GCY0jwrmLSbqVRQhvrZ5gyeHgku19Ioe0Tp1RJhFpeZ7CeN9+7jhxBmXPKwQJuD UpHNOj8WiQNsAnToz4dZ++yUKD1wEAOmvSQcSmlJP4AI5pUl2CG7zTEXdSyFjv3Bx7rG /PvdyPOahHQd8GoOU6qhHHTxOG4tkwdjPJ5/47AsW5BmoBk6lWYH0QE9BVh9tZJE1Ey4 c1TE5U4zCCPctaJ35a2hbWayHVsia7LT3qM4mXlEaBaCvpEK1X2AgzUlOxlm5aTJerDz 2vgw== X-Gm-Message-State: AOJu0YxdMLpRB4zR2fzU6J5Zi70ycN7sHToi+OafE9wyCOGaS1pqz4gw gAPZaWyvG4j6nby9l6GKsz5JjIPyue46+TljYSBrfrMQNaAtMqxBMQuF32s5 X-Google-Smtp-Source: AGHT+IHku5BwgJBZdxIRNWaREBtbjL5ZoOON7LoBBYQHpdFwfHfROfQBxCjz9FxELhmPC+kETUJbrQ== X-Received: by 2002:a05:6602:81b:b0:7bf:2bb8:17e1 with SMTP id z27-20020a056602081b00b007bf2bb817e1mr2029549iow.15.1706883397068; Fri, 02 Feb 2024 06:16:37 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCUBgil8ENxmaOTRRT4hx4IsJ8Asth96YoOSxC1ebfxz1OakG0ej4kOLDsVm3vXq66tzTHMtURRFzT24q8k/QZC680mqq+i8eA== Received: from [172.31.0.109] ([136.36.72.243]) by smtp.gmail.com with ESMTPSA id bm4-20020a05663842c400b00470b42dfc1csm483773jab.63.2024.02.02.06.16.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Feb 2024 06:16:36 -0800 (PST) Message-ID: Date: Fri, 2 Feb 2024 07:16:35 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] testsuite, asan, hwsan: Add libstdc++ deps where required. Content-Language: en-US To: iain@sandoe.co.uk, gcc-patches@gcc.gnu.org Cc: ro@CeBiTec.Uni-Bielefeld.DE References: <20240130103015.1845-1-iain@sandoe.co.uk> From: Jeff Law In-Reply-To: <20240130103015.1845-1-iain@sandoe.co.uk> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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