Subject: Re: Compiler flags
To: Martin Husemann <martin@duskware.de>
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
List: port-sparc
Date: 03/15/2003 21:58:37
At 19:19 Uhr +0100 15.3.2003, Martin Husemann wrote:
>On Sat, Mar 15, 2003 at 11:47:32AM -0500, Bill Meahan wrote:
>> Is anyone here aware of any documentation as to which flags should be
>> set for which machines?
>
>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.

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

-- see 'info gcc' for the possible cou types.

	hauke

--
/~\  The ASCII Ribbon Campaign
\ /    No HTML/RTF in email
 X     No Word docs in email
/ \  Respect for open standards