Re: gcc -mxxx=???
On Fri, Jun 15, 2001 at 01:56:45PM +0200, Michel D?nzer wrote:
>
>
> My $CFLAGS looks like this: -pipe -O2 -Wall -mcpu=750 -fstrict-aliasing
>
> It's not entirely clear from the gcc docs if code generated this way runs on
> older CPUs than G3s though. Should I rather use -mtune=750? What would be
> optimal for -mcpu for all CPUs we support?
>
>
> I wonder if anyone running on something like 604 or 603 has had strange
> problems like illegal instructions with packages I built?
gcc for IA32 uses -march=... to control what instructions it is
allowed to use, and what arch to tune for. You can override the
tuning target with -mcpu=.... Specifying -mcpu=... without -march
still generates code that will run on a 386.
I don't know how things are for PPC, but unless things are way
different, -mcpu=... shouldn't change what instructions gcc restricts
itself to. (i.e. -mcpu shouldn't make it run on any less machines
than it would before. Things aren't quite as simple as IA32, because
I don't remember if the default instruction set is actually the subset
that will work on _all_ ppc machines.)
--
#define X(x,y) x##y
Peter Cordes ; e-mail: X(peter@llama.nslug. , ns.ca)
"The gods confound the man who first found out how to distinguish the hours!
Confound him, too, who in this place set up a sundial, to cut and hack
my day so wretchedly into small pieces!" -- Plautus, 200 BCE
Reply to: