From patchwork Thu Apr 12 20:51:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Malcolm X-Patchwork-Id: 897795 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-476310-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="L+/dYVOg"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40MXv60bwPz9s1r for ; Fri, 13 Apr 2018 06:44:00 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; q=dns; s=default; b=YmQWDpuz386q EJLYfjuaGtj2/mXwmmn9fH0UHoqms3scMQVOA5HmwT76nydHlxSZt+NHiJ8kYW5F 7oPbwWR0WcObp8WQ6GydaR01OjeNW4Wtk3RuUSdS3vhdretb5ryFrVAG0dWtBK21 oP5xPawEhpirZ/xPf8Op0jOb1c7kpM0= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; s=default; bh=3Hjo/xP+cY27sdPHTq ERU98DcxY=; b=L+/dYVOgKztkJWxYZ7aA2Hemv8HeEmDw/Wz9o52rZCqE0Q+fqg 1tSEP4aH51du1o90QyEEl5oWN4T2JA9Z20xz+m1aSGedjVvBnzDjJdftSXbt7E6b U5zYnqqW44akeObQoMrPvada57jCjMovfD0Vxm3LU63G3lebSUVJDFpcM= Received: (qmail 74693 invoked by alias); 12 Apr 2018 20:43:51 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@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-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-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: Thu, 12 Apr 2018 16:51:21 -0400 Message-Id: <1523566281-53547-1-git-send-email-dmalcolm@redhat.com> X-IsSubscribed: yes 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 <