This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Darwin problem (Re: PATCH: Select the default x86 arch/cpu based on target)
On Fri, Feb 26, 2010 at 6:05 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Fri, Feb 26, 2010 at 06:00:58AM -0800, H.J. Lu wrote:
>> On Fri, Feb 26, 2010 at 5:45 AM, Jason Merrill <jason@redhat.com> wrote:
>> > On 02/25/2010 09:56 PM, H.J. Lu wrote:
>> >>
>> >> 1. in i386/darwin.h, there are
>> >>
>> >> /* For darwin we want to target specific processor features as a minimum,
>> >> ? ?but these unfortunately don't correspond to a specific processor. ?*/
>> >> #undef TARGET_SUBTARGET32_ISA_DEFAULT
>> >> #define TARGET_SUBTARGET32_ISA_DEFAULT (OPTION_MASK_ISA_MMX ? ? ? ? ? ? \
>> >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | OPTION_MASK_ISA_SSE ? ? ? ? ? \
>> >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? | OPTION_MASK_ISA_SSE2)
>> >
>> > Is this still needed? ?Users configuring for Darwin should get that minimum
>> > functionality now because of your patch.
>> >
>>
>> ".../configure i686-darwin" will pass -march=pentiumpro to cc1 and
>> ix86_arch_specified will be set to 1. We want ix86_arch_specified
>> to be 0 in this case. A patch is posted at
>>
>> http://gcc.gnu.org/ml/gcc-patches/2010-02/msg01111.html
>
> That patch is horribly ugly, leaking default_* to what users can use
> in -march= they pass the compiler is a terrible idea.
> I'd say much better would be for i[3456] target_cpu not to do
> --with-arch=i[3456] by default on darwin, unless --with-arch= has been used
> explicitly.
>
I noticed it on Linux/ia32 while testing the --with-fpmath=sse
http://gcc.gnu.org/ml/gcc-patches/2010-02/msg01148.html
which just makes Linux the same as Darwin on FP math. I
can change it to avoid setting arch when --with-fpmath=sse
is used.
--
H.J.