NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/39265: CPUFLAGS is assigned twice into CFLAGS/AFLAGS when building a kernel



>Number:         39265
>Category:       kern
>Synopsis:       CPUFLAGS is assigned twice into CFLAGS/AFLAGS when building a 
>kernel
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Aug 01 17:05:01 +0000 2008
>Originator:     Juan RP
>Release:        Latest and greatest
>Organization:
Not NetBSD
>Environment:
NetBSD sasha 4.99.71 NetBSD 4.99.71 (MASTER) #5: Thu Jul 31 22:05:45 CEST 2008  
juan@sasha:/home/juan/build/obj/sys/arch/amd64/compile/MASTER amd64
>Description:
When building a kernel (x86), I noticed that CPUFLAGS is assigned twice in the 
arguments passed to the compiler.

sys/conf/Makefile.kern.inc does this:

CFLAGS+=       ${CPUFLAGS} ${DEBUG} ${COPTS} ${CWARNFLAGS}
AFLAGS+=       ${CPUFLAGS} -D_LOCORE -Wa,-fatal-warnings

but share/mk/bsd.sys.mk already contains:

CFLAGS+=        ${CPUFLAGS}
AFLAGS+=        ${CPUFLAGS}
>How-To-Repeat:

>Fix:
On my tree I applied the following patch to Makefile.kern.inc and does what is 
expected:


 CFLAGS+=       -ffreestanding -fno-zero-initialized-in-bss
-CFLAGS+=       ${CPUFLAGS} ${DEBUG} ${COPTS} ${CWARNFLAGS}
-AFLAGS+=       ${CPUFLAGS} -D_LOCORE -Wa,-fatal-warnings
+CFLAGS+=       ${DEBUG} ${COPTS} ${CWARNFLAGS}
+AFLAGS+=       -D_LOCORE -Wa,-fatal-warnings



Home | Main Index | Thread Index | Old Index