From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 7368D3858D33 for ; Wed, 8 Nov 2023 15:48:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7368D3858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7368D3858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699458510; cv=none; b=Mw1EymU9UlPtSJdHHzzpPryiY7aC+9wVgdDScslW0+YcF+kbhAhLBYv9SroqsxMZsUZfFZxM3G/SfH/bdJVHw5PRDMg+GbmSekb1kFGb8+J02W4GqaOhbqSAiR/53/VPSGdFBm59TF5Cte8CfZcqCpqqaVs/LpH1Q//6ITgsc8k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699458510; c=relaxed/simple; bh=K8ysWFb6df5TnPKGwQkPgrQQdCpO3wsjHCMjPgdxJzM=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=IbyABR6RxqdCdiKhuZajcxhITy69tL+vP0vjFvGmhe1LyNO4GeQsJ+iQl54SpXjQTa4wlW0ic3EIg+j06m87TtsL8sM6CfLQoESTCGN3DMmDOBGs+hPXqEsaLICa/6EQ3RXwbDpzfiowofwgVNf2FChgQ1+JtxC6Fue3K9JI6Wk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699458507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2ok0k9esc4mywoVFzjvLHoZc659fEGeosrSBywesC8E=; b=ZgmtS0y3TP7WjYugcZBcnc3ZOYm5CQ2fNvC39oxDjZ8FK9Rs37I9fV6VFGhTMZJ5kh9DkB c7WnmW6lYQiL4MHBN2oRTRFizkVGatzu8pUps3cvksEWO1p20OWq2p2jmTa5RYIpMuDgF4 MC/XkMI89ii76WCIT5atQMEHn1q8Yzg= Received: from mail-yw1-f199.google.com (mail-yw1-f199.google.com [209.85.128.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-530-MIJIv214O_W7ezqZ8xB3TA-1; Wed, 08 Nov 2023 10:48:25 -0500 X-MC-Unique: MIJIv214O_W7ezqZ8xB3TA-1 Received: by mail-yw1-f199.google.com with SMTP id 00721157ae682-5b1ff96d5b9so94637837b3.1 for ; Wed, 08 Nov 2023 07:48:25 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699458505; x=1700063305; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=2ok0k9esc4mywoVFzjvLHoZc659fEGeosrSBywesC8E=; b=Zn34CnvPZajhx+zgNGyeh/G7MjkjRhmKN55l7CDBFAAgZkDtdrjPLwNqDObzGs62oK 8dHzj92okTVwQ10hwjyj/65q7aPkKc4DCGvYRDNVtSdYLsPnn35fPyeKmoZXAlXFGdSA uaK0MB8gbOVrx2VXOEzcXJKVFwkaYUqeIfkdELx3kEjNkCyCku97wIY2Fmkyz1gjW+gg aAbg/QluaqDpfVFGxVFj4Ymh65Ie8TamJqtk1/lsJT1/ZMJ3fYaseYBi62Wma5cg/UCF oUm1Ozid8Hn/10RyFudaliYx813QkwDFlxTcI3q9qe5IMBI6qjTPgZZjdpeHYpAMYwp9 9Bbw== X-Gm-Message-State: AOJu0YxUgA7Qgl9A/DtBzwMoEI+pjVkSFigjL6HgLHD7cVtjfTlSCpJw Oj1Zh25J9DSxY2VP3KKDk2k7IhQtxrNfrJRJffocqWHXnyhXzmS61MkbYzsriHXzNLR9JLohlbe VCM3yIdLIj7uxBD1roX+VwBp5VJALqQX81Q== X-Received: by 2002:a0d:ff07:0:b0:5a7:da0d:e4ee with SMTP id p7-20020a0dff07000000b005a7da0de4eemr2193682ywf.16.1699458505418; Wed, 08 Nov 2023 07:48:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IHYL5brIvjB9cFW+wdD/3aTUbdfDsUX0am7l9JPFxwk8LGAJHd9ZUNf0DfP8YZSrcvcQBYHnvfs58Q+5f7UgxE= X-Received: by 2002:a0d:ff07:0:b0:5a7:da0d:e4ee with SMTP id p7-20020a0dff07000000b005a7da0de4eemr2193671ywf.16.1699458505222; Wed, 08 Nov 2023 07:48:25 -0800 (PST) MIME-Version: 1.0 References: <600FDF8F-67C5-408F-BD24-9A3964A8BFA1@comcast.net> In-Reply-To: From: Jonathan Wakely Date: Wed, 8 Nov 2023 15:48:14 +0000 Message-ID: Subject: Re: testsuite: introduce hostedlib effective target To: Alexandre Oliva Cc: Mike Stump , gcc-patches@gcc.gnu.org, Rainer Orth , libstdc++@gcc.gnu.org, =?UTF-8?Q?Arsen_Arsenovi=C4=87?= X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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 Wed, 8 Nov 2023 at 15:30, Alexandre Oliva wrote: > > On Nov 7, 2023, Jonathan Wakely wrote: > > > An alternative approach for the g++ testsuite would be to provide a > > set of dummy headers for the non-freestanding ones, so that all the > > hosted-only headers are provided by the testsuite itself, but consist > > of a single line: > > > #error not available in freestanding > > > Then match on that and XFAIL. So the individual tests themselves > > wouldn't need the dg-skip-if added to them, they would just > > automatically XFAIL if they use a hosted-only header. > > *nod*. That wouldn't cover all the circumstances, alas: there are tests > that fail in freestanding mode not because of headers, but because > -fcontracts (currently?) links libstdc++exp in, and that library is not > even built in freestanding mode. Hmm, yes, that seems like a bug. Either we should provide libstdc++exp.a for freestanding builds (with a simplified contract violation handler that doesn't print to stdout), or the front end should not add -lstdc++exp when -ffreestanding is used (which would require teh user, or the testsuite in your case, to provide a custom contract violation handler), or it should be an error to use -fcontracts and -ffreestanding together. The libstdc++-v3/src/experimental/contract.cc file *already* supports freestanding, we just don't actually build it for freestanding. We can do that.