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 9C0373861859 for ; Wed, 8 Nov 2023 15:49:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9C0373861859 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 9C0373861859 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=1699458566; cv=none; b=rC+kdDdP7TI/mqOoLTCugu2uDBXBC0Ib/nwJy8vkqoZI6YoVEq92Ik8A3CT//XsOv2MNDCtaKP9M+ABYq+Dj5V87boDBhyJv1yRQIXY4/tS56gnIAl+xVHn54uiio3eIlrROOjIkBp1Ow4O0w6VJDCMPdUb8TyiutIg0HbbGBAs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699458566; c=relaxed/simple; bh=t1dtMbNpzqy5Xy284wgvuJ+NcA1CJNNIOiJnCdgxf60=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=Wji7b25btw9ri52VKNZXrzoUKifpGbII9CB0+gMruF6GRZlI5nRLF1X1qOp3iQsWVopnLLSoLGovaLKVqqc5upSBrXmJZZhtwyMuizqCMxVWgHWQg5e9DsehhxwJOLMwo0k/soK/RveLRR4KhdUxaNavJSRUtnaJEIYWgAjqc0Q= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699458564; 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=yLjlg7Dq8I73lTZg8mUglANx6kOqmL1jNR2AkccgwWM=; b=ZGGdJYV75PNmJZfgeoVWF4DulgjpK7SfY4FyMbaZq6wUzGAXaKeWRPsot12Q0XMmEJ1oZV CFgBx+WXaquVus5eDZMbxgpBFwGDZVklXYMZZ5+/LcCVGHbF1mrctKOZW5hsOjO38Qw4jp +5P2ZnVIq+B9ZndkynHJ9KkMsnJc9RA= Received: from mail-yw1-f198.google.com (mail-yw1-f198.google.com [209.85.128.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-318-fGSX5sL7PtesvAqgz9KBXA-1; Wed, 08 Nov 2023 10:49:20 -0500 X-MC-Unique: fGSX5sL7PtesvAqgz9KBXA-1 Received: by mail-yw1-f198.google.com with SMTP id 00721157ae682-5a8d9dcdd2bso139067407b3.2 for ; Wed, 08 Nov 2023 07:49:20 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699458559; x=1700063359; 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=yLjlg7Dq8I73lTZg8mUglANx6kOqmL1jNR2AkccgwWM=; b=UkutxeXrwBlONzlMZlDnJtdvGQ1ZKu3YeaTwzJIfmnKcCwIBfJYkWEk6UNcI30/A7M 4v4UmN8VNZXGDPenPF8nYEBPPxoRXSYLwWQbk3y3aHryaSuiDR3DQe0VQjaMdL/8P7wE F1qNgXeFEOzgmErd+M0V1nhARhaMnRRhqZVsJbZqdy+9fxvgLXTdpz5aqKKDXUMRfBeB o9amyR8V1pLYt1Io2oFt90eNFcCxClecIgRMwEI7rB2ZxrGf2+Dk9/ns9clwlTYVTLom GHkzx4d2B5/VERheyZMbDlithz+faaqyXH2xTobBkePF2I3eZSrwYHY2Gj7i1Uii26PY N2PQ== X-Gm-Message-State: AOJu0Ywy/sNuxzu9INoLGNtz3S7e2EKGkgGIcoX3DvtbXpNPCBKlKiIy 1BSivMQ4lt+vaXVajwDjh7NiduoGBaG6wkMRDQTIz3Z8PUqW3tby7M2Ob/wDY0m6JVANSGjf+ZV 5IwGIXDVnCOZQbuxLY3C5UNKpnNHF2cndk5imkjC/R25X X-Received: by 2002:a81:7c8b:0:b0:595:be7:a38 with SMTP id x133-20020a817c8b000000b005950be70a38mr1747756ywc.49.1699458559621; Wed, 08 Nov 2023 07:49:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IHL9SNfDOD30jx+nzCIxYgEnwf0eStHwslDl6pfvC3GtIz6PsLC5iHitnSunQs0FoFTLuxtfBztPAnEmx0SOkM= X-Received: by 2002:a81:7c8b:0:b0:595:be7:a38 with SMTP id x133-20020a817c8b000000b005950be70a38mr1747745ywc.49.1699458559371; Wed, 08 Nov 2023 07:49:19 -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:49:08 +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=unavailable 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:48, Jonathan Wakely wrote: > > 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. Which might be as simple as: --- a/libstdc++-v3/src/Makefile.am +++ b/libstdc++-v3/src/Makefile.am @@ -34,14 +34,13 @@ backtrace_dir = libbacktrace else backtrace_dir = endif - -experimental_dir = experimental else filesystem_dir = backtrace_dir = -experimental_dir = endif +experimental_dir = experimental + ## Keep this list sync'd with acinclude.m4:GLIBCXX_CONFIGURE. SUBDIRS = c++98 c++11 c++17 c++20 c++23 \ $(filesystem_dir) $(backtrace_dir) $(experimental_dir)