This is the mail archive of the
mailing list for the GCC project.
Re: [RFC PATCH, i386]: Remove special PIC related __cpuid definitions from config/i386/cpuid.h
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 16 Oct 2014 11:36:25 +0200
- Subject: Re: [RFC PATCH, i386]: Remove special PIC related __cpuid definitions from config/i386/cpuid.h
- Authentication-results: sourceware.org; auth=none
- References: <CAFULd4Ze8=Y5vB7oqcOvHZfpu8B9nY4kA1jXMT4hmOsuZoqrtQ at mail dot gmail dot com> <20141016092451 dot GB10376 at tucnak dot redhat dot com> <CAFULd4aZyT-MnwuvPZm7tCz+RK72Zs-DGezuKhLKCZsUFVsJAQ at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Oct 16, 2014 at 11:28:20AM +0200, Uros Bizjak wrote:
> On Thu, Oct 16, 2014 at 11:24 AM, Jakub Jelinek <email@example.com> wrote:
> >> Now that %ebx is also allocatable in PIC modes, we can cleanup
> >> config/i386/cpuid considerably. I propose to remove all PIC related
> >> specializations of __cpuid and __cpuid_count and protect the
> >> compilation with "#if __GNUC__ >= 5".
> >> The only drawback would be that non-bootstrapped build with gcc < 5.0
> >> will ignore -march=native, but I think this should be acceptable.
> > I'm worried about that.
> > Can't you instead keep the current cpuid.h stuff as is, just add
> > && __GNUC__ < 5
> > to that, so it treats GCC 5+ PIC as if __PIC__ wasn't defined?
> > Or, at least use cpuid.h even for older GCC if __PIC__ is not defined
> > (or __x86_64__ is defined and not medium/large PIC model)?
> Do we really care that much about non-bootstrapped build? I don't see
At least on Linux, driver-i386.c should not be built with PIC normally,
so at least changing
#if __GNUC__ >= 5
#if defined(__GNUC__) && (__GNUC__ >= 5 || !defined(__PIC__))
would limit the -march=native change for non-bootstrapped compilers to
Darwin only (or what other targets use PIC by default?).