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.129.124]) by sourceware.org (Postfix) with ESMTPS id C59F638515FF for ; Fri, 7 Oct 2022 11:57:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C59F638515FF Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1665143836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SoyqLYWnYrNY6jHoHEfNR7yCkdfQl6Sa8Kn71O3VGO4=; b=J26GkxfCzn+Hp1LKW6UWZJb1hyprr6SkhTVLAigarTgj3vbFUy5p2jhXn4K551V8D3q6fZ 2r7nAWeAd+k+ZiaDMKU0kKT8xaLrGxzoBv8xtpXzch+31I6MAIWGp0DY0g7gWwBj3gr5sT bdaMcTJFrJb8G8uJ69LO860JwuDa+g4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-49-xRrq0aPMMr2d7Xgi2FCgTA-1; Fri, 07 Oct 2022 07:57:15 -0400 X-MC-Unique: xRrq0aPMMr2d7Xgi2FCgTA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BBBEB811E67; Fri, 7 Oct 2022 11:57:14 +0000 (UTC) Received: from localhost (unknown [10.33.36.64]) by smtp.corp.redhat.com (Postfix) with ESMTP id 85EF2C15BA4; Fri, 7 Oct 2022 11:57:14 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Add --disable-libstdcxx-hosted as an alias for hosted-libstdcxx Date: Fri, 7 Oct 2022 12:57:13 +0100 Message-Id: <20221007115713.1226717-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.0 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_NONE,SPF_HELO_NONE,SPF_NONE,TXREP 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: Tested x86_64-linux, Pushed to trunk. -- >8 -- Most libstdc++ configure args are of the form --enable-libstdcxx-xxx but the option to build freestanding is --disable-hosted-libstdcxx. If you accidentally type --disable-libstdcxx-hosted then it will be ignored. This adds --disable-libstdcxx-hosted as an alias for the existing arg, so it works whichever way you say it. If both args are used explicitly and their values do not agree, configure fails with an error. libstdc++-v3/ChangeLog: * acinclude.m4 (GLIBCXX_ENABLE_HOSTED): Add libstdcxx-hosted enable arg as an alias for hosted-libstdcxx enable arg. * configure: Regenerate. --- libstdc++-v3/acinclude.m4 | 22 +++++++++++++++++++++- libstdc++-v3/configure | 37 ++++++++++++++++++++++++++++--------- 2 files changed, 49 insertions(+), 10 deletions(-) diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 1b404d7df22..719eab15c77 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -2962,6 +2962,10 @@ dnl installing only the headers required by [17.4.1.3] and the language dnl support library. More than that will be built (to keep the Makefiles dnl conveniently clean), but not installed. dnl +dnl Also define --disable-libstdcxx-hosted as an alias for +dnl --disable-hosted-libstdcxx but fail if both are given +dnl and their values do not agree. +dnl dnl Sets: dnl is_hosted (yes/no) dnl @@ -2971,7 +2975,8 @@ dnl AC_DEFUN([GLIBCXX_ENABLE_HOSTED], [ AC_ARG_ENABLE([hosted-libstdcxx], AC_HELP_STRING([--disable-hosted-libstdcxx], - [only build freestanding C++ runtime support]),, + [only build freestanding C++ runtime support]), + [enable_hosted_libstdcxx_was_given=yes], [case "$host" in arm*-*-symbianelf*) enable_hosted_libstdcxx=no @@ -2980,6 +2985,21 @@ AC_DEFUN([GLIBCXX_ENABLE_HOSTED], [ enable_hosted_libstdcxx=yes ;; esac]) + + # Because most configure args are --enable-libstdcxx-foo add an alias + # of that form for --enable-hosted-libstdcxx. + AC_ARG_ENABLE([libstdcxx-hosted], + AC_HELP_STRING([--disable-libstdcxx-hosted], + [alias for --disable-hosted-libstdcxx]), + [if test "$enable_hosted_libstdcxx_was_given" = yes; then + if test "$enable_hosted_libstdcxx" != "$enableval"; then + AC_MSG_ERROR([--enable-libstdcxx-hosted=$enableval conflicts with --enable-hosted-libstdcxx=$enable_hosted_libstdcxx]) + fi + else + enable_hosted_libstdcxx=${enableval} + fi + ],) + freestanding_flags= if test "$enable_hosted_libstdcxx" = no; then AC_MSG_NOTICE([Only freestanding libraries will be built])