From patchwork Mon Dec 18 16:58:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 82400 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 C7BE63857C67 for ; Mon, 18 Dec 2023 16:59:28 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 026CA38582AE; Mon, 18 Dec 2023 16:59:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 026CA38582AE Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 026CA38582AE Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=68.232.137.180 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702918750; cv=none; b=Lx9SaO7ngZZdRSSzhUxQwowfteddx+sMTAcY5/mMyqzqyNVPVdej+F6InZxJ0OcLO1R1NClSPS5PR6h6q6WJ92BwJGPA8z2kfqXAe2HAzfL+w7kupt8YrWQArXx0pEm+hYCxi2QOM5/B8eOSF9SernI6U0TF5sbAEiuVBKnZVt8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1702918750; c=relaxed/simple; bh=CeaQWX1FuPgvkJCRtpGP/iptX8TMUfTAsVzX+COegZE=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=PkzpLARZRksQD4YhSpwwG6Yl9jKi/eoZ1ZfCTqD5g0Di0PllxWh5uh41x5KOBRxBgTY6Nf9/0iH3zsNe7JcC5Gnkf6VQK3aSOePmDNt70P/1NJRVIPO3MuFW+xa5tYtTyHHu2vTKLLLOOLf1AhLUaIjfS5MfQ8iClSVoLc1W3aI= ARC-Authentication-Results: i=1; server2.sourceware.org X-CSE-ConnectionGUID: RVAk5/uuSB+gnzIrwFEDdg== X-CSE-MsgGUID: wMeB53SzQ/KCLNXFZ86kSg== X-IronPort-AV: E=Sophos;i="6.04,286,1695715200"; d="scan'208,223";a="25686950" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa3.mentor.iphmx.com with ESMTP; 18 Dec 2023 08:59:06 -0800 IronPort-SDR: 9JCoDfrUrqjZufcNUE/KK+/1gt+ETTSbnqlFYXIzm5ZXfPwOZpdCEjlqhfj+v6EGS9VY7o+ulj 9mGMXmH6LHaDS1wLMj2JAuS00svvciESeYkqbDNJLa/hZwkiQLbSoaf3mNYwqGfMsuYZB4rnA7 J7Q97evi8W1nxZkWhXYSxjUWHAa0qMtOs1RTsk98fPsSTH0XK8RrhZKJpAVQBv5hL/SFpG+Kpg 2ASaCSYJaCCtxbB/h/Sjd4T5nhE3W0M2mJNzg0PClFKb7/YuWTIg2N0+HSImPvFgtqVlcIfnJm ClU= From: Thomas Schwinge To: Arthur Cohen , Pierre-Emmanuel Patry , , CC: Iain Sandoe Subject: libgrust: 'AM_ENABLE_MULTILIB' only for target builds [PR113056] (was: [PATCH v2 2/4] libgrust: Add libproc_macro and build system) In-Reply-To: <0B027199-B2BD-4CC0-9654-695A0316783A@sandoe.co.uk> References: <20231025110658.1232737-1-arthur.cohen@embecosm.com> <20231025110658.1232737-3-arthur.cohen@embecosm.com> <87edhhu741.fsf@euler.schwinge.homeip.net> <0B027199-B2BD-4CC0-9654-695A0316783A@sandoe.co.uk> User-Agent: Notmuch/0.29.3+94~g74c3f1b (https://notmuchmail.org) Emacs/28.2 (x86_64-pc-linux-gnu) Date: Mon, 18 Dec 2023 17:58:58 +0100 Message-ID: <87h6kfsazx.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_SHORT, SPF_HELO_PASS, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Hi! > --- a/libgrust/configure.ac > +++ b/libgrust/configure.ac > -# AM_ENABLE_MULTILIB(, ..) > +AM_ENABLE_MULTILIB(, ..) Such a change was applied eventually, and is necessary for target builds -- but potentially harmful for host builds. OK to push the attached "libgrust: 'AM_ENABLE_MULTILIB' only for target builds [PR113056]"? Grüße Thomas ----------------- Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955 From 71e00b191bd630aa3be66e38069c707ae76a91d3 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Mon, 18 Dec 2023 16:27:39 +0100 Subject: [PATCH] libgrust: 'AM_ENABLE_MULTILIB' only for target builds [PR113056] ..., but not for host builds, which don't need it, and it may cause the build to fail. Use what appears to be the standard pattern for that (see 'libbacktrace/configure.ac', 'zlib/configure.ac'). PR rust/113056 libgrust/ * configure.ac: 'AM_ENABLE_MULTILIB' only for target builds. * configure: Regenerate. --- libgrust/configure | 8 +++++--- libgrust/configure.ac | 4 +++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/libgrust/configure b/libgrust/configure index 5388a0e22a6..e778a253915 100755 --- a/libgrust/configure +++ b/libgrust/configure @@ -2387,7 +2387,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_files="$ac_config_files Makefile" -# Default to --enable-multilib +if test -n "${with_target_subdir}"; then + # Default to --enable-multilib # Check whether --enable-multilib was given. if test "${enable_multilib+set}" = set; then : enableval=$enable_multilib; case "$enableval" in @@ -2424,6 +2425,7 @@ fi ac_config_commands="$ac_config_commands default-1" +fi # Do not delete or change the following two lines. For why, see # http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html @@ -12653,7 +12655,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12656 "configure" +#line 12658 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12759,7 +12761,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12762 "configure" +#line 12764 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/libgrust/configure.ac b/libgrust/configure.ac index 226c42ba649..adfb3500fb3 100644 --- a/libgrust/configure.ac +++ b/libgrust/configure.ac @@ -2,7 +2,9 @@ AC_INIT([libgrust], version-unused,,libgrust) AC_CONFIG_SRCDIR(Makefile.am) AC_CONFIG_FILES([Makefile]) -AM_ENABLE_MULTILIB(, ..) +if test -n "${with_target_subdir}"; then + AM_ENABLE_MULTILIB(, ..) +fi # Do not delete or change the following two lines. For why, see # http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html -- 2.34.1