[prev in list] [next in list] [prev in thread] [next in thread] 

List:       netbsd-port-sparc
Subject:    Re: Compiler flags
From:       David Brownlee <abs () netbsd ! org>
Date:       2003-03-16 1:53:28
[Download RAW message or body]

On Sat, 15 Mar 2003, Hauke Fath wrote:

> >Look at pkgsrc/devel/cpuflags.
>
> ...which has its own set of problems. Setting COPTS unconditionally in
> /etc/mk.conf causes it not to be set in the system makefiles, and you may
> end up without any optimization. That in turn can cause 'interesting'
> compile faults.

	That would have been a problem for kernel compiles - cpuflags
	adds ${DEFCOPTS} to ${COPTS} to avoid this. Before august
	'02 it didn't do this which was decidedly suboptimal.

> >From my /etc/mk.conf (for sun4m):
>
> .if ${_HOST_ARCH} == ${MACHINE_ARCH}
> CFLAGS +=               -mcpu=supersparc -mtune=supersparc
> CXXFLAGS +=             -mcpu=supersparc -mtune=supersparc
> COPTS =                 -mcpu=supersparc -mtune=supersparc -O2 -pipe
> .endif

	If cpuflags detects you are cross compiling it avoids setting
	any compiler flags :)

	If anyone finds cpuflags doesn't pick the right flags for any
	situation - just let me know :)

-- 
		David/absolute          -- www.netbsd.org: No hype required --
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic