Unable to compile anything from ports

Jasvinder S. Bahra bbdl21548 at blueyonder.co.uk
Sun Feb 24 12:03:05 UTC 2008


> Yes. Not many use VIA cpu's, so I think it would help a lot if you'd do a
> send-pr. Include a full dmesg so the CPU flags can be seen. The default on
> FreeBSD is to compile with -O2 now, so either cc should disable the
specific
> optimization for which there is no matching CPU instruction internally, or
> via CPUTYPE or similar constructs, the optimization flag for this should
be
> turned off.
>
> -O2 is a collection of optimizations that can be turned on/off
> individually. -O = -O1 is a smaller set, -O0 turns it off entirely.

I raised a send-pr over the issue, and it was promptly closed *wince*. Guess
I
should have done a more thorough search before I raised it.  For future
reference, as someone else may end up in this same situation, let me
paraphrase...

I used...

CPUTYPE=c3
CFLAGS= -O2 -pipe
COPTFLAGS= -O -pipe

I should have just used...

CPUTYPE=c3-2

That is, I should not have defined CPUTYPE and COPYFLAGS. The default is
"-O2 -fno-strict-aliasing -pipe", and using -O2 without -fno-strict-aliasing
is
unsupported and will cause trouble.  Apparenty, it's best to not override
CFLAGS
and COPTFLAGS at all.





More information about the freebsd-questions mailing list