From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37678 invoked by alias); 20 Apr 2016 14:53:36 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 37667 invoked by uid 89); 20 Apr 2016 14:53:35 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.1 required=5.0 tests=BAYES_00,POKER_BODY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=sk:x$enabl, sparcv7, jiggerypokery, x86_64*linux* 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 20 Apr 2016 14:53:30 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 754FAC01AA25; Wed, 20 Apr 2016 14:53:29 +0000 (UTC) Received: from laptop.zalov.cz (ovpn-116-125.ams2.redhat.com [10.36.116.125]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3KErQFq012708 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 20 Apr 2016 10:53:28 -0400 Received: from laptop.zalov.cz (localhost [127.0.0.1]) by laptop.zalov.cz (8.15.2/8.15.2) with ESMTP id u3KErNLl009395; Wed, 20 Apr 2016 16:53:23 +0200 Received: (from jakub@localhost) by laptop.zalov.cz (8.15.2/8.15.2/Submit) id u3KErKuD009394; Wed, 20 Apr 2016 16:53:20 +0200 Date: Wed, 20 Apr 2016 14:53:00 -0000 From: Jakub Jelinek To: "H.J. Lu" Cc: GCC Patches , Uros Bizjak Subject: Re: [PATCH] Don't build 32-bit libgomp with -march=i486 on x86-64 Message-ID: <20160420145319.GG2850@laptop.zalov.cz> Reply-To: Jakub Jelinek References: <20160419150810.GB7668@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2016-04/txt/msg01082.txt.bz2 On Wed, Apr 20, 2016 at 07:43:27AM -0700, H.J. Lu wrote: > From 12c6ddcf67593ed7137764ca74043f1a9c2d8fda Mon Sep 17 00:00:00 2001 > From: "H.J. Lu" > Date: Wed, 30 Mar 2016 05:56:08 -0700 > Subject: [PATCH 2/3] Don't build 32-bit libgomp with -march=i486 on x86-64 > > Gcc uses the same -march= for both -m32 and -m64 on x86-64 unless > --with-arch-32= is used. There is no need for -march=i486 to compile > 32-bit libgomp on x86-64. > > PR target/70454 > * configure.tgt (XCFLAGS): Don't add -march=i486 to compile > 32-bit target library on x86-64. That is wrong. It could be --with-arch-32=i386 build. If you really want to find out the ISA reliably, just run ${CC} ${CFLAGS} -E -dD -xc /dev/null and get through all the cases, or try to compile a testcase with some __atomic* builtin in it and see if it results in a call or not. > --- > libgomp/configure.tgt | 10 ++-------- > 1 file changed, 2 insertions(+), 8 deletions(-) > > diff --git a/libgomp/configure.tgt b/libgomp/configure.tgt > index 77e73f0..c290080 100644 > --- a/libgomp/configure.tgt > +++ b/libgomp/configure.tgt > @@ -79,16 +79,10 @@ if test x$enable_linux_futex = xyes; then > esac > ;; > > - # Similar jiggery-pokery for x86_64 multilibs, except here we > - # can't rely on the --with-arch configure option, since that > - # applies to the 64-bit side. > x86_64-*-linux*) > config_path="linux/x86 linux posix" > - case " ${CC} ${CFLAGS} " in > - *" -m32 "*) > - XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic" > - ;; > - esac > + # x86_64 compiler passes -march=x86_64 by default when building > + # 32bit target libraries. > ;; > > # Note that sparcv7 and sparcv8 is not included here. We need cas. > -- > 2.5.5 > Jakub