From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 74692 invoked by alias); 12 Apr 2018 20:43:51 -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 74662 invoked by uid 89); 12 Apr 2018 20:43:50 -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=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3 autolearn=ham version=3.3.2 spammy=UD:m4, Hx-languages-length:2329 X-Spam-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3 autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 12 Apr 2018 20:43:43 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B7FFC3136317; Thu, 12 Apr 2018 20:43:42 +0000 (UTC) Received: from c64.redhat.com (ovpn-112-12.phx2.redhat.com [10.3.112.12]) by smtp.corp.redhat.com (Postfix) with ESMTP id 779E116904; Thu, 12 Apr 2018 20:43:41 +0000 (UTC) From: David Malcolm To: jakub@redhat.com Cc: gcc-patches@gcc.gnu.org, jit@gcc.gnu.org, David Malcolm Subject: [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 Message-Id: <1523566281-53547-1-git-send-email-dmalcolm@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.45]); Thu, 12 Apr 2018 20:43:42 +0000 (UTC) X-IsSubscribed: yes X-SW-Source: 2018-q2/txt/msg00002.txt.bz2 This patch updates gcc/configure.ac to use gcc_base_ver. I had to drop the \$\$ from the sed expression to get it to work within the configure script; I'm not entirely sure what their purpose is. Without them, it's still matching on the first group of numeric characters in BASE-VER. Tested with and without --with-gcc-major-version; in each case, gcc-driver-name.h is correctly determined. Fixes the linker issue reported downstream in https://bugzilla.redhat.com/show_bug.cgi?id=1566178 and fixes the driver not found issue with: gcc_jit_context_set_bool_use_external_driver (ctxt, 1); 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. --- config/acx.m4 | 2 +- gcc/configure.ac | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/config/acx.m4 b/config/acx.m4 index aa1d34b..87c1b5e 100644 --- a/config/acx.m4 +++ b/config/acx.m4 @@ -246,7 +246,7 @@ AC_DEFUN([GCC_BASE_VER], [AS_HELP_STRING([--with-gcc-major-version-only], [use only GCC major number in filesystem paths])], [if test x$with_gcc_major_version_only = xyes ; then changequote(,)dnl - get_gcc_base_ver="sed -e 's/^\([0-9]*\).*\$\$/\1/'" + get_gcc_base_ver="sed -e 's/^\([0-9]*\).*/\1/'" changequote([,])dnl fi ]) diff --git a/gcc/configure.ac b/gcc/configure.ac index 67e1682..b066cc6 100644 --- 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 <