From patchwork Tue Feb 11 20:41:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 319408 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 5ABB92C00A8 for ; Wed, 12 Feb 2014 07:41:57 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; q=dns; s=default; b=y5XVsfLaYunaqMoc5c RGLjOgCakB5OV1QEy3Mxl6QFKPMcPBebvGzMy7hwehzg62GJWeBlENQimJobmU6Q OzzExMnWBE2+OglnnyTgF5JBuk9acyIfQx9LzZ8xQbKKS++2fAJtGEWbse6BIH3x 4sYMvQFhzeGHpoWFTomsVBp2k= 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 :mime-version:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; s=default; bh=vJPcUg4gUiTmw0gREfidi4lu pks=; b=j8OxH4xauWttV/JryYbNZ9ndzoVDjdKaKeHbJS/o47j4RpZV3X+ybeZ4 NNOIsQgHpHwoVqLhDiYYqWjpO7miPlAJKgbFU8WeIKCPKWkO6VuZeEa/MCg5RL0O T5a+qnDXgcidcnbOVTpnhrzHjwP9YWeNU9ogdt9zwUwGV29fwaA= Received: (qmail 2268 invoked by alias); 11 Feb 2014 20:41:50 -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 2256 invoked by uid 89); 11 Feb 2014 20:41:50 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f171.google.com Received: from mail-ob0-f171.google.com (HELO mail-ob0-f171.google.com) (209.85.214.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Tue, 11 Feb 2014 20:41:47 +0000 Received: by mail-ob0-f171.google.com with SMTP id wp4so9460557obc.16 for ; Tue, 11 Feb 2014 12:41:45 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.60.80.137 with SMTP id r9mr34118653oex.30.1392151305153; Tue, 11 Feb 2014 12:41:45 -0800 (PST) Received: by 10.76.3.114 with HTTP; Tue, 11 Feb 2014 12:41:45 -0800 (PST) In-Reply-To: References: <20140211192802.GA26305@intel.com> Date: Tue, 11 Feb 2014 12:41:45 -0800 Message-ID: Subject: Re: PATCH: PR target/60151: HAVE_AS_GOTOFF_IN_DATA is mis-detected on x86-64 From: "H.J. Lu" To: Rainer Orth Cc: GCC Patches , Uros Bizjak X-IsSubscribed: yes On Tue, Feb 11, 2014 at 12:29 PM, Rainer Orth wrote: > "H.J. Lu" writes: > >> On Tue, Feb 11, 2014 at 11:40 AM, Rainer Orth >> wrote: >>> Hi H.J., >>> >>>> HAVE_AS_GOTOFF_IN_DATA defines a 32-bit assembler feature, we need to >>>> pass --32 to assembler. Otherwise, we get the wrong result on x86-64. >>>> We already pass --32 to assembler on x86. It should be OK to do it >>>> in configure. OK for trunk? >>> >>> This would break Solaris/x86 with as configurations, where this test >>> currently passes, but would fail since as doesn't understand --32. >>> >> >> How about passing --32 to as only for Linux? OK to install? > > I'd rather do it for gas instead, which can be used on non-Linux > systems, too. > Sure. Here is the new patch. OK to install? diff --git a/gcc/configure.ac b/gcc/configure.ac index ac3d842..333bca6 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -3867,8 +3867,14 @@ foo: nop # These two are used unconditionally by i386.[ch]; it is to be defined # to 1 if the feature is present, 0 otherwise. + if test x"$gas" = x"yes"; then + as_ix86_gotoff_in_data_opt="--32" + else + as_ix86_gotoff_in_data_opt= + fi gcc_GAS_CHECK_FEATURE([GOTOFF in data], - gcc_cv_as_ix86_gotoff_in_data, [2,11,0],, + gcc_cv_as_ix86_gotoff_in_data, [2,11,0], + $as_ix86_gotoff_in_data_opt, [ .text .L0: nop