From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa2.hgst.iphmx.com (esa2.hgst.iphmx.com [68.232.143.124]) by sourceware.org (Postfix) with ESMTPS id 43EB4385DC2B for ; Fri, 3 Apr 2020 22:55:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 43EB4385DC2B IronPort-SDR: s8/+c0PaioNnj0ldtc+A/oP8loPcWiY5cXL6GSP9ZEGYHdyCWRTKFvJJOryjqsCg+YAuqvKh9u VpEYndjlGH0YFcbLhMzov+0uZkdWm6dbrYcyy4luXvOINmVAtJxTZ42368Slz70j8gpZhJsStd L++VuB9lzyE+hYgB/0Q/iJX8rSncRC6SxSEMHjOaFpNpoJA1i1qTYjwekW5/Gw29hTir6NkOlQ ThrkHygAI8kkAkToUxrKdXJMMBbMiSW5c+ojIpckkaRHQpuNCVuwYbE/FvEEKeJa8f/ph3AzKk QKo= X-IronPort-AV: E=Sophos;i="5.72,341,1580745600"; d="scan'208";a="236846867" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 04 Apr 2020 06:56:01 +0800 IronPort-SDR: OfWGwmBTO21MqbIC/xFDMjn/d1ed4U6h6QPCKt1FzFocrueH1lW208Y5XowHoQQrNgGlL/Xgz5 TfaYIRkWD10zwmTmfgDaR9c0zqpP1aAKuZkxvF3caxgUbfxldiyMHja9dZ7B1BtUXgCJIY5lhW GhzkbCLchNleG0Gg6mRpAKubpNnVjmafIq7otT8e2Spnh7M0koN+bdzaEhz3kRNV4dSCNr3Gtz Ym1UdaKigejzePUquU6M80iDEhHKpSOIJGFAkQJCCYSB/6+LNSjLEladWGmRo9kHbjMcEqFeYC 5RKLmU9yU+ihsCkT61ezfZd2 Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2020 15:46:45 -0700 IronPort-SDR: YBHxCocqvbwIq2tR3T3upUTXeBMFSJSf8XnJPHUMm/PyXJJEWfFvzxRXZmJzEKpGGOVk5CMHvu YgXTI36aE7QoSz4oTjynRdh3ENqo/0FqTIfsi1U4E/9BJYgwgvSmLoJMcZWqjpkXbyksZ8s4BF PzPv8mERbAUUor9bvIyf/6YkDl3qGI764dm6R8l0p0iRwOz3Pcs+4P+v9zD3CbEy7VA5+Bdc0E EdZIprsVO81oq3kbSPkijnrTI2MQ58xfF5KUGxvFMB0yoYPt1c5XX0ElgvC2y0mnMjDv998pxv /S0= WDCIronportException: Internal Received: from unknown (HELO redsun52) ([10.149.66.28]) by uls-op-cesaip01.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Apr 2020 15:55:56 -0700 Date: Fri, 3 Apr 2020 23:55:53 +0100 (BST) From: "Maciej W. Rozycki" To: libffi-discuss@sourceware.org cc: Anthony Green , Mike Stump , gcc-patches@gcc.gnu.org Subject: [PATCH libffi 2/4] Use a documented way to pass $compiler_vendor to DejaGNU In-Reply-To: Message-ID: References: User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-14.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, RISK_FREE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libffi-discuss@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libffi-discuss mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Apr 2020 22:55:59 -0000 Use Autoconf substitution in the template used for extra DejaGNU site configuration, which is a documented supported way to pass information from the `configure' script, rather than resorting to a hack with extracting an undocumented internal setting from `config.log' to pass the compiler vendor to DejaGNU. No functional change (and no risk of breakage with some Autoconf version anymore). Use AM_SUBST_NOTMAKE with the new substitution so as not to place it in Makefile.in files, where it is not needed, and set the Autmoake version requirement accordingly. --- Hi, I chose to use AM_SUBST_NOTMAKE so as not to clutter Makefile.in files with the new variable as Automake does that by default. That however requires the use of Automake 1.11 or newer. By the look of our sources that shouldn't be an issue as far as I can tell, but the macro invocation can be dropped along with the requirement if it would. Maciej --- Makefile.am | 3 ++- configure.ac | 2 ++ testsuite/lib/libffi.exp | 4 ---- testsuite/local.exp.in | 1 + 4 files changed, 5 insertions(+), 5 deletions(-) libffi-compiler-vendor.diff Index: libffi/Makefile.am =================================================================== --- libffi.orig/Makefile.am +++ libffi/Makefile.am @@ -1,6 +1,7 @@ ## Process this with automake to create Makefile.in -AUTOMAKE_OPTIONS = foreign subdir-objects +# Automake 1.11 needed for AM_SUBST_NOTMAKE. +AUTOMAKE_OPTIONS = 1.11 foreign subdir-objects ACLOCAL_AMFLAGS = -I m4 Index: libffi/configure.ac =================================================================== --- libffi.orig/configure.ac +++ libffi/configure.ac @@ -45,6 +45,8 @@ AC_CONFIG_MACRO_DIR([m4]) AC_CHECK_SIZEOF([size_t]) AX_COMPILER_VENDOR +AC_SUBST([compiler_vendor], [$ax_cv_c_compiler_vendor]) +AM_SUBST_NOTMAKE([compiler_vendor]) AX_CC_MAXOPT # The AX_CFLAGS_WARN_ALL macro doesn't currently work for sunpro # compiler. Index: libffi/testsuite/lib/libffi.exp =================================================================== --- libffi.orig/testsuite/lib/libffi.exp +++ libffi/testsuite/lib/libffi.exp @@ -286,10 +286,6 @@ proc libffi-init { args } { verbose "libffi $blddirffi" - # Which compiler are we building with? - set tmp [grep "$blddirffi/config.log" "^ax_cv_c_compiler_vendor.*$"] - regexp -- {^[^=]*=(.*)$} $tmp nil compiler_vendor - if { [string match $compiler_vendor "gnu"] } { set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a] if {$gccdir != ""} { Index: libffi/testsuite/local.exp.in =================================================================== --- libffi.orig/testsuite/local.exp.in +++ libffi/testsuite/local.exp.in @@ -1,2 +1,3 @@ set CC_FOR_TARGET "@CC@" set CXX_FOR_TARGET "@CXX@" +set compiler_vendor "@compiler_vendor@"