From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 117538 invoked by alias); 12 Apr 2018 20:53:08 -0000 Mailing-List: contact jit-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: Sender: jit-owner@gcc.gnu.org Received: (qmail 117371 invoked by uid 89); 12 Apr 2018 20:53:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99.4 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-10.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY autolearn=ham version=3.3.2 spammy=touching X-Spam-Status: No, score=-10.7 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 12 Apr 2018 20:53:05 +0000 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id AA8044075A7D for ; Thu, 12 Apr 2018 20:52:53 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.36.118.110]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4D02310B00AD; Thu, 12 Apr 2018 20:52:45 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id w3CKqg1V030960; Thu, 12 Apr 2018 22:52:42 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id w3CKqf6p029992; Thu, 12 Apr 2018 22:52:41 +0200 Date: Mon, 01 Jan 2018 00:00:00 -0000 From: Jakub Jelinek To: David Malcolm Cc: gcc-patches@gcc.gnu.org, jit@gcc.gnu.org Subject: Re: [PATCH] configure.ac: honor --with-gcc-major-version in gcc-driver-name.h (PR jit/85384) Message-ID: <20180412205241.GS8577@tucnak> Reply-To: Jakub Jelinek References: <1523566281-53547-1-git-send-email-dmalcolm@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1523566281-53547-1-git-send-email-dmalcolm@redhat.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Thu, 12 Apr 2018 20:52:53 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Thu, 12 Apr 2018 20:52:53 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jakub@redhat.com' RCPT:'' X-SW-Source: 2018-q2/txt/msg00003.txt.bz2 On Thu, Apr 12, 2018 at 04:51:21PM -0400, David Malcolm wrote: > Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. > > OK for trunk? > > config/ChangeLog: > PR jit/85384 > * acx.m4 (GCC_BASE_VER): Remove \$\$ from sed expression. > > gcc/ChangeLog: > PR jit/85384 > * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version > by using gcc_base_ver to generate a gcc_driver_version, and use > it when generating GCC_DRIVER_NAME. > * configure.ac: Regenerate. I'd prefer not touching acx.m4 and instead just: gcc_driver_version=$gcc_BASEVER if test x$with_gcc_major_version_only = xyes ; then gcc_driver_version=`echo $gcc_BASEVER | sed -e 's/^\([0-9]*\).*$/\1/'` fi in configure.ac; after all, it is something what is done elsewhere in configure.ac: #define GCCPLUGIN_VERSION_MAJOR `echo $gcc_BASEVER | sed -e 's/^\([0-9]*\).*$/\1/'` #define GCCPLUGIN_VERSION_MINOR `echo $gcc_BASEVER | sed -e 's/^[0-9]*\.\([0-9]*\).*$/\1/'` #define GCCPLUGIN_VERSION_PATCHLEVEL `echo $gcc_BASEVER | sed -e 's/^[0-9]*\.[0-9]*\.\([0-9]*\)$/\1/'` and the $ is used in all similar sed patterns. > --- a/gcc/configure.ac > +++ b/gcc/configure.ac > @@ -6499,8 +6499,10 @@ AC_DEFINE_UNQUOTED(DIAGNOSTICS_COLOR_DEFAULT, $DIAGNOSTICS_COLOR_DEFAULT, > > # Generate gcc-driver-name.h containing GCC_DRIVER_NAME for the benefit > # of jit/jit-playback.c. > +gcc_driver_version=`eval "${get_gcc_base_ver} $srcdir/BASE-VER"` > +echo "gcc_driver_version: ${gcc_driver_version}" > cat > gcc-driver-name.h < -#define GCC_DRIVER_NAME "${target_noncanonical}-gcc-${gcc_BASEVER}${exeext}" > +#define GCC_DRIVER_NAME "${target_noncanonical}-gcc-${gcc_driver_version}${exeext}" > EOF > > # Check whether --enable-default-pie was given. Jakub