From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io1-xd32.google.com (mail-io1-xd32.google.com [IPv6:2607:f8b0:4864:20::d32]) by sourceware.org (Postfix) with ESMTPS id E29F33858034 for ; Fri, 2 Feb 2024 14:17:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E29F33858034 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 E29F33858034 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::d32 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706883424; cv=none; b=vim1deBx6yRoz432DBSPpvh6iZLPpbyQuGXlCNH4f+5ycK0OgUGiniBLUprqFB7J16iLQIf4BqVUIWkEpJKMqk0YCuVTe4enMir+sAbtMNG6N49/fdDVnXf1K7W43RG0OPnE3QnLbRVpsZXB7M5leIH1zOO1pccdp9C3RWi7So0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706883424; c=relaxed/simple; bh=u3PPfnkLJ9tUj0BU1aWM0MWCSjDs8XwF2FzmDYTEfWw=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=kxtIxXH6pDnWPO9ZXyu5YovBOV4dZEwIvgCOdUeLZhSWYeVXM9qfhO9+wwgkeWeTnWxuh7ngU2T+Ul3sPnGEUVeNHKCYnklUM1TSjqQAj50z+1ml1MWjJzvBNFJgS5/eaC9KIipYtLA1r+iiJXME/oFuXJey21NfiFYhcOgT3VQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-io1-xd32.google.com with SMTP id ca18e2360f4ac-7c03a838730so39807039f.2 for ; Fri, 02 Feb 2024 06:17:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706883422; x=1707488222; 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=jFAKm2M8QuYM4sM7Buw9gqVk9kDNKUb6UkOuCEQb1eA=; b=alIdgPukvamVtolvyb/uLEhXqXK/oXBCiN4xpB7zTLUYLr6HyabuAiK3pLWhWX6u3P oPzUi8fGLjK24D5CB8tUHnBPK4MXnTnKTT5KctL75YeP4e+/RqrYJ/7xIwUACBq+OGzT 9rIW24/Enea5v7MN7BDeGwEDirtf4tMkcLD7kcxHWDbA64aVjhJn27/ElZtVU/P5D9U0 uVJf7ThqxTWEILBWFSRJpDY7YX4QseTO39JP6e3pYi5kd/LUGTcaIgD8S6XOadCkfQRA 7qDhSm4PEbG8t9m9EcFcBzdfrmv6EhSmP8vf4CGTQIgfUTnLW/apnisOi5eu9SKdn++A fwmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706883422; x=1707488222; 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=jFAKm2M8QuYM4sM7Buw9gqVk9kDNKUb6UkOuCEQb1eA=; b=kDheRTIlyj5O7NmxtVM84HhgeUgk4jiYGKQu4hFYhoDxNs/PAwsEWvfPxi/of/BiYz 8Gb8y7wjxeYe5eGwrjkO3iF/vZIA4EjuE/y/qbKaAgACxb2WRRTgNSIs+OQ3pC1xOfD2 +Xe/0WJfDSlMbbiiNQl07f6wLGxeFJveBvbodfE67U/Vh1AiXMA+05JCAZfj2blUltSZ V7vl7Iq4SG1DgpDRx454lftptQthb8NlsLlDCxgud4Cx5mACE19wklWtyZx7i2Qs6GoA GwDBycTuG6hN9qRQKcQNOZhsaa6OD0XaXQc1mr/hxuS15OwD5EakCtbVunlV7BmwB6EE si+Q== X-Gm-Message-State: AOJu0YzdCGSxftszVJHrszE2+794WG41io06wU5b8r7/j/mgeVJ7GLhK fGGlBXHqge9oc6BeKIrf+gdoN1lBorBD5fy/+l9apMBsqSyowson X-Google-Smtp-Source: AGHT+IEuMqu6DLdOuxAJR14IvgYjb8rjnXfW/SG8gbpt8v67Or7OMtqv2IhzyQLP3mVZJ/+TezPQnw== X-Received: by 2002:a6b:7b04:0:b0:7ba:93df:1e2 with SMTP id l4-20020a6b7b04000000b007ba93df01e2mr8027644iop.21.1706883421987; Fri, 02 Feb 2024 06:17:01 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCV2LMT6sA/6Z5lDNXOYpbyXEsHLHqBxbuU/vivrhiYC+/pCDdvTlZVEGATm8Tyn8NbStZacHBMWQ/wOU/cvX3/GV+QevUuqtQ== Received: from [172.31.0.109] ([136.36.72.243]) by smtp.gmail.com with ESMTPSA id bm4-20020a05663842c400b00470b42dfc1csm483773jab.63.2024.02.02.06.17.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 02 Feb 2024 06:17:01 -0800 (PST) Message-ID: <3f39db2b-3af2-4c94-9e91-f505049d091b@gmail.com> Date: Fri, 2 Feb 2024 07:17:01 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] testsuite, ubsan: 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: <20240130103135.2005-1-iain@sandoe.co.uk> From: Jeff Law In-Reply-To: <20240130103135.2005-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:31, Iain Sandoe wrote: > tested on i686, x86_64 (and aarch64) Darwin, x86_64, aarch64 Linux, > OK for trunk? > thanks > Iain > > --- 8< --- > > We use the ubsan tests 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 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. Also OK. jeff