From patchwork Fri Apr 13 17:23:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 898028 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-476353-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="G7h76ENZ"; 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 40N4PX34qmz9s0t for ; Sat, 14 Apr 2018 03:23:42 +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:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=AQx70GSDwzfayOIcy kHqup9SfWtUzzeV4tV/S7OMuJ+ZXq9e1jSptljq9JHCun1F64TLlKPs4V1ghlTNX aSRauryuyqOaqvbALpBJT7v7DB294O6ZlnWLqirfNsMFWe2QuJG7nv4pzaMMGdRH tiKcDt7VQzs3ZwFsNxBgJ4h5N4= 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:date :from:to:cc:subject:message-id:reply-to:references:mime-version :content-type:in-reply-to; s=default; bh=Lsd7OudS63plYkfU/tfMOeP ITos=; b=G7h76ENZIErn8V7563Mf9WGSgoX5IopxPPXDC6ElsHGA1/LOfZMf338 BjS02/ypjt6wedsRj3UIyea0fR059LJRmfRda4WzuRGxRrLuBoBcbDM+HacAAKuB qWYqrmOInTYlgVS6Z2UyHnGx1a1zpyLUawiVPFdmghAc2AcbyFhM= Received: (qmail 75098 invoked by alias); 13 Apr 2018 17:23:35 -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 75064 invoked by uid 89); 13 Apr 2018 17:23:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.2 spammy= X-Spam-User: qpsmtpd, 2 recipients 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; Fri, 13 Apr 2018 17:23:32 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7AD67814F0A8; Fri, 13 Apr 2018 17:23:26 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.36.118.110]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2F069D7DED; Fri, 13 Apr 2018 17:23:26 +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 w3DHNNxV024550; Fri, 13 Apr 2018 19:23:24 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id w3DHNNVD024549; Fri, 13 Apr 2018 19:23:23 +0200 Date: Fri, 13 Apr 2018 19:23:23 +0200 From: Jakub Jelinek To: David Malcolm , Jeff Law , DJ Delorie , Alexandre Oliva Cc: gcc-patches@gcc.gnu.org, jit@gcc.gnu.org Subject: [PATCH] configure.ac: honor --with-gcc-major-version in gcc-driver-name.h (PR jit/85384, variant) Message-ID: <20180413172323.GG8577@tucnak> Reply-To: Jakub Jelinek References: <1523566281-53547-1-git-send-email-dmalcolm@redhat.com> MIME-Version: 1.0 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-IsSubscribed: yes On Thu, Apr 12, 2018 at 04:51:21PM -0400, David Malcolm wrote: > 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. Here is the variant I've talked about in patch form. Bootstrapped/regtested on x86_64-linux and i686-linux and tested with --enable-languages=jit --enable-host-shared --disable-bootstrap and --enable-languages=jit --enable-host-shared --disable-bootstrap --with-gcc-major-version-only Ok for trunk? 2018-04-13 Jakub Jelinek PR jit/85384 * configure.ac (GCC_DRIVER_NAME): For --with-gcc-major-version-only use just major version in the driver filename rather than full version. * configure: Regenerated. Jakub --- gcc/configure.ac.jj 2018-04-12 10:22:56.179162225 +0200 +++ gcc/configure.ac 2018-04-13 16:16:02.712459619 +0200 @@ -6499,8 +6499,14 @@ AC_DEFINE_UNQUOTED(DIAGNOSTICS_COLOR_DEF # Generate gcc-driver-name.h containing GCC_DRIVER_NAME for the benefit # of jit/jit-playback.c. +changequote(,)dnl +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 +changequote([,])dnl cat > gcc-driver-name.h < gcc-driver-name.h <