From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) by sourceware.org (Postfix) with ESMTPS id A8823385DC1B for ; Fri, 3 Apr 2020 22:55:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A8823385DC1B IronPort-SDR: XNRUcD82MuCBp9PpKb3k6uoyd5B5tDgABDyayHV/xKFWcraWgZNrVhICeQeQ7yn9x+e32+yywT FuHx+GJVZF8BqdeAAlK/Ph0acL36EOq35UcbT3w5YDZBRyg0AhpyuKBbGN7kN4RGpXTvXHOZEu TJrs5nP4nPFlNEI2Kqu2mzam3e0gEfKob0S30i9Yf1XzUTrM5Ey6y85qIuKq16tmLLewkMymaQ HjIzwbm9XR/NHm7cT+SjyJ7IUXRBI8uGibI9eqBko8bMIeuejhau1rmR24ixwE7k5wwhznS/B7 LXg= X-IronPort-AV: E=Sophos;i="5.72,341,1580745600"; d="scan'208";a="243063109" 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:55:40 +0800 IronPort-SDR: GMMf0wCI2tUv9ddAwYsq79swX23jmOK03Xtt4NT0BUN0z6jMAvwCR7LpTML9V2ETp3QdOH0dBX hJc24h3S2hNu1ql1UIt5FcXZ1wnHsTcUN9HC+VeqVS8RzyUm7zDgtmXkoKwrpXfAR+aVz6jFoj 6r1hbkFzciWftU9rK2IsbOiCpB/TfWQ44wCTcbd81GkXGyDsrQ/vWeVjknxtxp1HX5pzIZ3Ts4 jim9ZMAKFi1XLtonk8jiyD93vgN8AzUpU/YCAL8C/FyY+ll72+T87YB7FUYlGcYFoGBwGWq/Oe A+mxMvHD7FjOIrWTKkN4PPtf 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:28 -0700 IronPort-SDR: PEfKGOAEAoSj8zuDXdvA3OeRyZHcREMiQABhtsctsOgBqZkjEHlpUqs0WTuEOZH2VCpODKbggp WEYFK91xojDCK0GT3IcDUoYk5px15reIsz6yqq6TI7xs7Emj2gbQFfOUEL47JuRpjjJsPrTJT1 IEqIJudTgZbudhuFn0SZ1/mbWfa69e94BRDAgT5UL/cwHKgIRnWhRSdhyUGR+y7btvZJlqnTJS RG2FytlNyBwfD3RyGeiMLOYLbIDerB+i1khSuAfOCakex4Lsfo9eq62dMI7PjwhLlzZV76sF6d GD0= 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:39 -0700 Date: Fri, 3 Apr 2020 23:55:36 +0100 (BST) From: "Maciej W. Rozycki" To: libffi-discuss@sourceware.org cc: Anthony Green , Mike Stump , gcc-patches@gcc.gnu.org Subject: [PATCH libffi 1/4] Use a template to pass $CC and $CXX 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=-11.1 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, SPF_HELO_NONE, SPF_PASS, TXREP, URIBL_ABUSE_SURBL autolearn=unavailable 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:43 -0000 Use an Autoconf template rather an inline piece of scriptery to set DejaGNU's $CC_FOR_TARGET and $CXX_FOR_TARGET variables from $CC and $CXX respectively, making it easier to maintain and making it take advantage of Automake's dependency and rule generation. Relocate the generated `local.exp' file to within testsuite/ so as to make its regeneration rule to actually work, i.e. (in testsuite/Makefile.in): EXTRA_DEJAGNU_SITE_CONFIG = local.exp site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG) [...] local.exp: $(top_builddir)/config.status $(srcdir)/local.exp.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ It wouldn't work if the regeneration rule was placed in the top-level Makefile.in, which is what Automake would faithfully do if `local.exp' stayed in the top level directory. --- Hi, I think having individual AC_CONFIG_FILES macro invocations for each output file or group of files would make this change (and code itself) more readable, however it hasn't been done before and I decided not to change the style on this occasion. It may make sense as a follow-up clean-up. Maciej --- Makefile.am | 3 --- configure.ac | 7 +------ testsuite/Makefile.am | 2 +- testsuite/local.exp.in | 2 ++ 4 files changed, 4 insertions(+), 10 deletions(-) libffi-test-cc-for-target-template.diff Index: libffi/Makefile.am =================================================================== --- libffi.orig/Makefile.am +++ libffi/Makefile.am @@ -23,9 +23,6 @@ EXTRA_DIST = LICENSE ChangeLog.old \ libtool-ldflags libtool-version configure.host README.md \ libffi.map.in LICENSE-BUILDTOOLS msvc_build make_sunver.pl -# local.exp is generated by configure -DISTCLEANFILES = local.exp - # Subdir rules rely on $(FLAGS_TO_PASS) FLAGS_TO_PASS = $(AM_MAKEFLAGS) Index: libffi/configure.ac =================================================================== --- libffi.orig/configure.ac +++ libffi/configure.ac @@ -56,11 +56,6 @@ if test "x$GCC" = "xyes"; then CFLAGS="$CFLAGS -fexceptions" fi -cat > local.exp <