www.delorie.com/archives/browse.cgi   search  
Mail Archives: pgcc/1999/06/23/12:53:35

Message-ID: <377110F0.A12DDDEB@home.com>
Date: Wed, 23 Jun 1999 12:53:04 -0400
From: Steve Snyder <swsnyder AT home DOT com>
Organization: I usually use a *real* mail client. Honest!
X-Mailer: Mozilla 4.61 [en] (Win98; U)
X-Accept-Language: en
MIME-Version: 1.0
To: pgcc AT delorie DOT com
Subject: Re: pgcc does better, reboot, then does terrible!(SOLVED)
References: <199906230757 DOT JAA16919 AT mail2 DOT it DOT kth DOT se> <3770EBC8 DOT 84BDD15 AT uiuc DOT edu>
Reply-To: pgcc AT delorie DOT com


Jon wrote:
> 
> Janne Johansson wrote:
> >
> > > As to -mpentium.  I'm not sure how -m, -mcpu, -march are different.
> > >
> > > For example, the kernel compiles with -m486 -DCPU=686 (or something like
> > > that), with your CPU set to 686.  Why not use -mpentium at least??
> >
> > The -m<something> tells the compiler to act differently or use instructions
> > and optimizations for the architecture that you specified, while the
> > -Dsomething_else is a #define that affects the source, and makes the source
> > act in different ways.
> >
> > Just because the -D happens to define a constant that has the name "686"
> > doesn't mean anything, it could as easily be -Dmight_have_large_L2_cache,
> > -Dhas_variable_mmu_table_size, -Dimpress_users or whatever.
> >
> > See the difference?
> 
> I never said -D did anything special in particular.
> 
> My question was what's the difference between -m, -mcpu, and -march, not
> -m and -D.

The switches -m and -mcpu are equivalent (I use -mcpu=i686 just because
it's shorter than -mpentiumpro).  Use of -march=xxx (may) make the code
xxx-specific.  That is, "-mcpu=i686" will run on a 386, though not
optimally.  Use of "-mcpu=i686 -march=i686" may generate code that is
incompatible with CPUs prior to the PentiumPro (new instructions, etc.).
 
> Someone already answered why they don't use -mpentium, for compatibility
> with 2.7.x gcc.
> 
> Thanks,
> Jon

-- 
***** Steve Snyder *****

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019