Hello,

On Sun, 2016-05-29 at 21:12 +0200, Uros Bizjak wrote:
> Hello!
> 
> > 
> > When trying to compile using -march=native on a VIA nano CPU, gcc
> > selects "-march=core2" "-mtune=i386" then is unable to compile, as
> > this
> > creates a conflicts between 32 bits and 64 bits compilation modes,
> > as
> > show by the following test:
> [...]
> 
> > 
> > --- gcc/config/i386/driver-i386.c.origÂÂ2015-02-02
> > 05:20:49.000000000
> > +0100
> > +++ gcc/config/i386/driver-i386.cÂÂÂÂÂÂÂ2015-08-23
> > 01:11:03.000000000
> > +0200
> > @@ -601,15 +601,20 @@
> > ÂÂÂÂÂÂÂÂÂÂswitch (family)
> > ÂÂÂÂÂÂÂÂÂÂÂÂ{
> > ÂÂÂÂÂÂÂÂÂÂÂÂcase 6:
> > -ÂÂÂÂÂÂÂÂÂÂÂÂÂif (model > 9)
> The patch was corrupted by your mailer. But - can you please open a
> bugreport, and refer reposted patch to this bugreport? This way, the
> problem (and the patch) won't get forgotten.
> 
> Uros.
> 

Sorry for that, might be because of UTF-8 encoding.
I already opened a bug many monthes ago, ID 67310:
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67310>
I just updated the patch against current git repository, the only
difference between previous versions are diff offsets.

Jocelyn

---

diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-
i386.c
index b121466..662709e 100644
--- a/gcc/config/i386/driver-i386.c
+++ b/gcc/config/i386/driver-i386.c
@@ -642,15 +642,20 @@ const char *host_detect_local_cpu (int argc,
const char **argv)
          switch (family)
            {
            case 6:
-             if (model > 9)
-               /* Use the default detection procedure.  */
+             if (has_longmode)
                processor = PROCESSOR_GENERIC;
-             else if (model == 9)
-               cpu = "c3-2";
-             else if (model >= 6)
-               cpu = "c3";
              else
-               processor = PROCESSOR_GENERIC;
+               {
+                 if (model > 9)
+                   /* Use the default detection procedure.  */
+                   processor = PROCESSOR_GENERIC;
+                 else if (model == 9)
+                   cpu = "c3-2";
+                 else if (model >= 6)
+                   cpu = "c3";
+                 else
+                   processor = PROCESSOR_GENERIC;
+               }
              break;
            case 5:
              if (has_3dnow)
@@ -664,6 +669,8 @@ const char *host_detect_local_cpu (int argc, const
char **argv)
              /* We have no idea.  */
              processor = PROCESSOR_GENERIC;
            }
+       } else {
+         processor = PROCESSOR_GENERIC;
        }
     }
   else
@@ -894,7 +901,12 @@ const char *host_detect_local_cpu (int argc, const
char **argv)
       if (arch)
        {
          if (has_ssse3)
-           cpu = "core2";
+           {
+             if (vendor == signature_CENTAUR_ebx)
+               cpu = "x86-64";
+             else
+               cpu = "core2";
+           }
          else if (has_sse3)
            {
              if (has_longmode)

Reply via email to