From patchwork Tue Jan 11 18:38:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 49882 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3D2E73898C7F for ; Tue, 11 Jan 2022 18:40:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3D2E73898C7F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1641926447; bh=2ed8o8+W8SzdthZIkLmYUwhOzyI4TGHSOL2j7RqK/T4=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=mUm25iGRkQPoLb6BRfUYgMv4CwR387uODh+evOLNnYZnvBTMxkcXMY8oWTTFqAFgD mf+8MtbSV77BK+f7s1NOAq2VC048SHEZkQ9ykMeeEgyZu9h80ElRZg9em69isJ0d2A EXHeO3PMeRdeOFdL68FSozq/z/fvMRndToY8OmbA= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 E433438A941E for ; Tue, 11 Jan 2022 18:38:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E433438A941E Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-434-sZ2EsksBPtmJ2YROHTTj0w-1; Tue, 11 Jan 2022 13:38:14 -0500 X-MC-Unique: sZ2EsksBPtmJ2YROHTTj0w-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4B1A6835E29; Tue, 11 Jan 2022 18:38:13 +0000 (UTC) Received: from localhost (unknown [10.33.36.252]) by smtp.corp.redhat.com (Postfix) with ESMTP id EF4C780320; Tue, 11 Jan 2022 18:38:12 +0000 (UTC) To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Install header for freestanding [PR103726] Date: Tue, 11 Jan 2022 18:38:12 +0000 Message-Id: <20220111183812.2603126-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.9 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=unavailable autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Tested x86_64-linux and freestanding mips-elf. This C++20 header is also supposed to be present for freestanding. libstdc++-v3/ChangeLog: PR libstdc++/103726 * include/Makefile.am: Install for freestanding. * include/Makefile.in: Regenerate. * include/std/version (__cpp_lib_source_location): Define for freestanding. --- libstdc++-v3/include/Makefile.am | 5 +++-- libstdc++-v3/include/Makefile.in | 5 +++-- libstdc++-v3/include/std/version | 6 +++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/libstdc++-v3/include/Makefile.am b/libstdc++-v3/include/Makefile.am index 8f93bf2d7b7..8b1300e0f29 100644 --- a/libstdc++-v3/include/Makefile.am +++ b/libstdc++-v3/include/Makefile.am @@ -1426,7 +1426,7 @@ endif # , , , , , , , # , , , , , , # , , , , , , -# and any files which they include (and which we provide). +# and any files which they include (and which we provide). # , , , and # are installed by libsupc++, so only the others and the sub-includes # are copied here. @@ -1440,7 +1440,8 @@ install-freestanding-headers: ${glibcxx_srcdir}/$(CPU_DEFINES_SRCDIR)/cpu_defines.h; do \ $(INSTALL_DATA) $${file} $(DESTDIR)${host_installdir}; done $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${std_builddir} - for file in limits type_traits atomic bit concepts coroutine version; do \ + for file in limits type_traits atomic bit concepts coroutine \ + source_location version; do \ $(INSTALL_DATA) ${std_builddir}/$${file} $(DESTDIR)${gxx_include_dir}/${std_builddir}; done $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${c_base_builddir} for file in ciso646 cstddef cfloat climits cstdint cstdlib \ diff --git a/libstdc++-v3/include/Makefile.in b/libstdc++-v3/include/Makefile.in index 4ab942ae666..3ff18fec1e8 100644 --- a/libstdc++-v3/include/Makefile.in +++ b/libstdc++-v3/include/Makefile.in @@ -1907,7 +1907,7 @@ ${pch3_output}: ${pch3_source} ${pch2_output} # , , , , , , , # , , , , , , # , , , , , , -# and any files which they include (and which we provide). +# and any files which they include (and which we provide). # , , , and # are installed by libsupc++, so only the others and the sub-includes # are copied here. @@ -1921,7 +1921,8 @@ install-freestanding-headers: ${glibcxx_srcdir}/$(CPU_DEFINES_SRCDIR)/cpu_defines.h; do \ $(INSTALL_DATA) $${file} $(DESTDIR)${host_installdir}; done $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${std_builddir} - for file in limits type_traits atomic bit concepts coroutine version; do \ + for file in limits type_traits atomic bit concepts coroutine \ + source_location version; do \ $(INSTALL_DATA) ${std_builddir}/$${file} $(DESTDIR)${gxx_include_dir}/${std_builddir}; done $(mkinstalldirs) $(DESTDIR)${gxx_include_dir}/${c_base_builddir} for file in ciso646 cstddef cfloat climits cstdint cstdlib \ diff --git a/libstdc++-v3/include/std/version b/libstdc++-v3/include/std/version index 012d78e3b6b..c5d5efb1314 100644 --- a/libstdc++-v3/include/std/version +++ b/libstdc++-v3/include/std/version @@ -201,6 +201,9 @@ #endif #define __cpp_lib_is_nothrow_convertible 201806L #define __cpp_lib_remove_cvref 201711L +#if __has_builtin(__builtin_source_location) +# define __cpp_lib_source_location 201907L +#endif #if __cpp_impl_three_way_comparison >= 201907L && __cpp_lib_concepts # define __cpp_lib_three_way_comparison 201907L #endif @@ -273,9 +276,6 @@ # define __cpp_lib_semaphore 201907L #endif #define __cpp_lib_shift 201806L -#if __has_builtin(__builtin_source_location) -# define __cpp_lib_source_location 201907L -#endif #if __cpp_lib_concepts # define __cpp_lib_span 202002L #endif