Subject: kern/22526: Makefiles in sys/arch/* should use CPUFLAGS
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <skrueger@europe.com>
List: netbsd-bugs
Date: 08/18/2003 08:21:53
>Number:         22526
>Category:       kern
>Synopsis:       Makefiles in sys/arch/* should use CPUFLAGS
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 18 08:22:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Stefan Krüger
>Release:        NetBSD-1.6W
>Organization:
>Environment:
should'n matter
>Description:
run your ./build.sh session and wonder why some output looks like

../bin/i386--netbsdelf-gcc -O2 -pipe [...] -Os -mcpu=i386 [...]
-march=athlon-xp [...] ../sys/arch/i386/stand/lib/pcio.c

seems like the sentence "Make sure we override any optimization options
specified by the user."

in sys/arch/i386/stand/Makefile.booters (and others)

doesn't apply


>How-To-Repeat:
put the following lines in /etc/mk.conf

CFLAGS+= -pipe
CPUFLAGS= -march=athlon-xp

cd /usr/src/sys/arch/i386/stand ; make
>Fix:
replace COPS with CFLAGS, put -mcpu in it's own line (e. g. CPUFLAGS= -mcpu=i386)

in

/sys/arch/i386/stand/Makefile.booters
/sys/arch/i386/stand/boot/Makefile.boot
/sys/arch/i386/stand/bootxx/Makefile.bootxx
>Release-Note:
>Audit-Trail:
>Unformatted: