Mail Archives: pgcc/1999/06/23/11:49:19
At 09:14 AM 6/23/99 , 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.
>
>Someone already answered why they don't use -mpentium, for compatibility
>with 2.7.x gcc.
>
>Thanks,
>Jon
From what I understand, -mpentium just turns-on -mcpu=pentium, and
maybe a few other things. This setup allows code to be optimized for the
P5, yet run on any i386 system.
-march=pentium however makes it so that the code will ONLY run on
a P5 (and probably anything newer?).
-Dustin
- Raw text -