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 libatomic 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: Uros Bizjak <ubizjak at gmail dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 20 Apr 2016 07:57:21 -0700
- Subject: Re: [PATCH] Don't build 32-bit libatomic with -march=i486 on x86-64
- Authentication-results: sourceware.org; auth=none
- References: <20160419150735 dot GA7668 at intel dot com> <CAFULd4ZV0jkjmgyH5HY_-BExB10YDtkXh4uL4_ObkVABU74PbA at mail dot gmail dot com> <CAMe9rOqZ1=kjTRqoxBJQkeowgo9U1Nqjs212=_1YVNQuWewRWg at mail dot gmail dot com> <CAFULd4YRzFzq96E8pDh4_iake6e-dXoF=aPJqKEeskx0VuoBnw at mail dot gmail dot com> <CAMe9rOpWiPAkMJrYz2fXYE95uUjmH7GTVS-fosn3oEx=-p_94w at mail dot gmail dot com> <CAFULd4bi3P3oGH1-KOHJ4uvPba9QR7t0sCd7Fu1-Yki4BZqs6w at mail dot gmail dot com> <CAMe9rOrD6AS2ZzWrdzjQ2CiFqn-CmM2QfmHFBsdddva2xebh+Q at mail dot gmail dot com> <CAFULd4bXVaCmBaUm5hzjzi_V1WvTvX8hMRrwb7q4GqWt1Z6eYA at mail dot gmail dot com> <CAMe9rOr6mSP3Dv3JUXMBP0ehirUEimGXO_Zcw2avADXHeHQ3mQ at mail dot gmail dot com> <20160420145447 dot GH2850 at laptop dot zalov dot cz>
On Wed, Apr 20, 2016 at 7:54 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Wed, Apr 20, 2016 at 07:45:44AM -0700, H.J. Lu wrote:
>> On Wed, Apr 20, 2016 at 12:02 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
>> >>
>> >> That is why I submitted my patches. Since -m32 passes -march=x86-64
>> >> to cc1 on x86-64, we shouldn't pass -march=i486 to cc1. It is undesirable
>> >> especially when --with-arch= is used. I noticed the issue when 32-bit
>> >> libatomic/libgomp/libitm weren't optimized with -march=haswell when GCC
>> >> was configured with --with-arch=haswell
>> >
>> > OK then. IMO, following comment is more informative:
>> >
>> > # x86_64 compiler passes -march=x86_64 by default when building 32bit
>> > target libraries.
>> >
>> >>>>>>>> + # Since 64-bit arch > i486, we can use the same -march= to build
>> >>>>>>>> + # both 32-bit and 64-bit target libraries.
>> >
>> > OK with the above change.
>> >
>>
>> This is the patch I checked in. I also updated patches for libgomp:
>>
>> https://gcc.gnu.org/ml/gcc-patches/2016-04/msg01079.html
>>
>> and libitm:
>>
>> https://gcc.gnu.org/ml/gcc-patches/2016-04/msg01080.html
>
> This is wrong, see my other comment on the libgomp patch.
>
See my reply to your reply on the libgomp patch.
--
H.J.