Mail Archives: pgcc/1999/06/23/12:53:35
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 -