This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Don't build 32-bit libgomp with -march=i486 on x86-64
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Uros Bizjak <ubizjak at gmail dot com>
- Date: Wed, 20 Apr 2016 08:16:19 -0700
- Subject: Re: [PATCH] Don't build 32-bit libgomp with -march=i486 on x86-64
- Authentication-results: sourceware.org; auth=none
- References: <20160419150810 dot GB7668 at intel dot com> <CAMe9rOp8wNWFEv34WTYrP2AUGyicVKUhzsfiQZU+Uu4d0SmCvQ at mail dot gmail dot com> <20160420145319 dot GG2850 at laptop dot zalov dot cz>
On Wed, Apr 20, 2016 at 7:53 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> 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" <hjl.tools@gmail.com>
>> 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.
>
That is a better approach. However it isn't how it is handled for
Linux/x86. Should we rewrite the whole -march= stuff for 32-bit
Linux/x86 run-time, independent of Linux/x86 or Linux/x86-64?
--
H.J.