public inbox for jit@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: David Malcolm <dmalcolm@redhat.com>
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)
Date: Mon, 01 Jan 2018 00:00:00 -0000	[thread overview]
Message-ID: <20180412205241.GS8577@tucnak> (raw)
In-Reply-To: <1523566281-53547-1-git-send-email-dmalcolm@redhat.com>

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 <<EOF
> -#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

      parent reply	other threads:[~2018-04-12 20:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-01  0:00 David Malcolm
2018-01-01  0:00 ` [PATCH] configure.ac: honor --with-gcc-major-version in gcc-driver-name.h (PR jit/85384, variant) Jakub Jelinek
2018-01-01  0:00 ` Jakub Jelinek [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180412205241.GS8577@tucnak \
    --to=jakub@redhat.com \
    --cc=dmalcolm@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jit@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).