summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/alpha/conf/Makefile.alpha31
-rw-r--r--sys/arch/amd64/conf/Makefile.amd6443
-rw-r--r--sys/arch/armish/conf/Makefile.armish41
-rw-r--r--sys/arch/aviion/conf/Makefile.aviion42
-rw-r--r--sys/arch/beagle/conf/Makefile.beagle41
-rw-r--r--sys/arch/gumstix/conf/Makefile.gumstix41
-rw-r--r--sys/arch/hp300/conf/Makefile.hp30036
-rw-r--r--sys/arch/hppa/conf/Makefile.hppa30
-rw-r--r--sys/arch/hppa64/conf/Makefile.hppa6433
-rw-r--r--sys/arch/i386/conf/Makefile.i38646
-rw-r--r--sys/arch/landisk/conf/Makefile.landisk33
-rw-r--r--sys/arch/loongson/conf/Makefile.loongson56
-rw-r--r--sys/arch/luna88k/conf/Makefile.luna88k38
-rw-r--r--sys/arch/mac68k/conf/Makefile.mac68k34
-rw-r--r--sys/arch/macppc/conf/Makefile.macppc36
-rw-r--r--sys/arch/moko/conf/Makefile.moko41
-rw-r--r--sys/arch/mvme68k/conf/Makefile.mvme68k35
-rw-r--r--sys/arch/mvme88k/conf/Makefile.mvme88k41
-rw-r--r--sys/arch/mvmeppc/conf/Makefile.mvmeppc41
-rw-r--r--sys/arch/palm/conf/Makefile.palm41
-rw-r--r--sys/arch/sgi/conf/Makefile.sgi59
-rw-r--r--sys/arch/socppc/conf/Makefile.socppc42
-rw-r--r--sys/arch/solbourne/conf/Makefile.solbourne37
-rw-r--r--sys/arch/sparc/conf/Makefile.sparc43
-rw-r--r--sys/arch/sparc64/conf/Makefile.sparc6431
-rw-r--r--sys/arch/vax/conf/Makefile.vax31
-rw-r--r--sys/arch/zaurus/conf/Makefile.zaurus41
27 files changed, 472 insertions, 592 deletions
diff --git a/sys/arch/alpha/conf/Makefile.alpha b/sys/arch/alpha/conf/Makefile.alpha
index 7a3c7c408d2..dd3f07d3fc2 100644
--- a/sys/arch/alpha/conf/Makefile.alpha
+++ b/sys/arch/alpha/conf/Makefile.alpha
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.alpha,v 1.62 2010/05/23 15:30:54 deraadt Exp $
+# $OpenBSD: Makefile.alpha,v 1.63 2010/05/24 14:59:14 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -26,18 +26,21 @@ _archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL
-CDIAGFLAGS?= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main \
+CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
+ -Wno-main -Wno-uninitialized -Wno-format \
-Wstack-larger-than-2047 -Wvariable-decl
-CMACHFLAGS= -mno-fp-regs -fno-builtin-printf -fno-builtin-log \
- -fno-builtin-log2 -fno-builtin-malloc -Wa,-mev56
+CMACHFLAGS= -mno-fp-regs -Wa,-mev56
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
+
COPTS?= -O2
-CFLAGS= ${DEBUG} ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
-AFLAGS= -traditional -D_LOCORE
+CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+AFLAGS= -D_LOCORE -x assembler-with-cpp -traditional-cpp ${CMACHFLAGS}
LINKFLAGS= -T ${_machdir}/conf/ld.script -X -N -G 4
STRIPFLAGS= -g -x
@@ -47,18 +50,14 @@ DB_STRUCTINFO= db_structinfo.h
DB_STRUCTINFO=
.endif
-HOSTED_CC= ${CC}
+HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
-
-# compile rules: rules are named ${TYPE}_${SUFFIX} where TYPE is NORMAL or
-# HOSTED}, and SUFFIX is the file suffix, capitalized (e.g. C for a .c file).
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
-NORMAL_S= ${CC} -xassembler-with-cpp ${AFLAGS} ${CPPFLAGS} -c $<
-
-HOSTED_C= ${HOSTED_CC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
+NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
%OBJS
@@ -116,11 +115,11 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
clean::
- rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
+ rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} -UKGDB \
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
diff --git a/sys/arch/amd64/conf/Makefile.amd64 b/sys/arch/amd64/conf/Makefile.amd64
index 29eacc33e0b..9e3c00e822d 100644
--- a/sys/arch/amd64/conf/Makefile.amd64
+++ b/sys/arch/amd64/conf/Makefile.amd64
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.amd64,v 1.35 2010/05/23 15:32:18 deraadt Exp $
+# $OpenBSD: Makefile.amd64,v 1.36 2010/05/24 14:59:15 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -26,22 +26,23 @@ _archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL
-CDIAGFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main -Wno-sign-compare \
- -Wstack-larger-than-2047
-
-CMACHFLAGS+= -mcmodel=kernel -mno-red-zone -fno-strict-aliasing \
- -mno-sse2 -mno-sse -mno-3dnow -mno-mmx -msoft-float \
- -fno-builtin-printf -fno-builtin-log -fno-builtin-log2 \
- -fno-builtin-malloc -fno-omit-frame-pointer
+CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
+ -Wno-main -Wno-uninitialized -Wno-format \
+ -Wstack-larger-than-2047 -Wvariable-decl
+
+CMACHFLAGS= -mcmodel=kernel -mno-red-zone -mno-sse2 -mno-sse -mno-3dnow \
+ -mno-mmx -msoft-float
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
COPTS?= -O2
-CFLAGS= ${DEBUG} ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
-AFLAGS= -x assembler-with-cpp -D_LOCORE
-LINKFLAGS= -Ttext 0xffffffff801001e0 -e start -X
+CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+AFLAGS= -D_LOCORE -x assembler-with-cpp ${CMACHFLAGS}
+LINKFLAGS= -Ttext 0xffffffff801001e0 -e start # -X bug?
STRIPFLAGS= -g -x
.if ${IDENT:M-DDDB_STRUCT}
@@ -50,22 +51,14 @@ DB_STRUCTINFO= db_structinfo.h
DB_STRUCTINFO=
.endif
-HOSTCC= ${CC}
+HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
-
-# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
-# where TYPE is NORMAL, or PROFILE; SUFFIX is the file suffix,
-# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
-# is marked as config-dependent.
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
-
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-NORMAL_S_C= ${CC} ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $<
-
-HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
%OBJS
@@ -80,7 +73,7 @@ HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
# ${SYSTEM_LD_TAIL}
SYSTEM_OBJ= locore.o vector.o copy.o spl.o param.o ioconf.o ${OBJS}
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
-SYSTEM_LD_HEAD= rm -f $@
+SYSTEM_LD_HEAD= @rm -f $@
SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \
${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o
SYSTEM_LD_TAIL= @${SIZE} $@; chmod 755 $@
@@ -124,11 +117,11 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
clean::
- rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
+ rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxncez -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
diff --git a/sys/arch/armish/conf/Makefile.armish b/sys/arch/armish/conf/Makefile.armish
index acb73750872..b5ac247f546 100644
--- a/sys/arch/armish/conf/Makefile.armish
+++ b/sys/arch/armish/conf/Makefile.armish
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.armish,v 1.26 2010/04/28 15:31:32 deraadt Exp $
+# $OpenBSD: Makefile.armish,v 1.27 2010/05/24 14:59:15 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -25,22 +25,22 @@ _machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
-CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D__${_mach}__
-CDIAGFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main \
+CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__
+CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
+ -Wno-main -Wno-uninitialized -Wno-format \
-Wstack-larger-than-2047 -Wvariable-decl
-CMACHFLAGS= -ffreestanding
-#CMACHFLAGS= -march=armv4 -mtune=strongarm -ffreestanding
+CMACHFLAGS= -ffreestanding -msoft-float # -march=armv4 -mtune=strongarm
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
-CMACHFLAGS+= -msoft-float -fno-builtin-printf -fno-builtin-log \
- -fno-builtin-log2 -fno-builtin-malloc
COPTS?= -O2
-CFLAGS= ${DEBUG} ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
-AFLAGS= -x assembler-with-cpp -D_LOCORE ${CMACHFLAGS}
+CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+AFLAGS= -D_LOCORE -x assembler-with-cpp ${CMACHFLAGS}
LINKFLAGS= -T ldscript
LINKFLAGS+= --warn-common
STRIPFLAGS= -g -X -x
@@ -51,23 +51,14 @@ DB_STRUCTINFO= db_structinfo.h
DB_STRUCTINFO=
.endif
-HOSTCC= ${CC}
+HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
-
-# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
-# where TYPE is NORMAL, or PROFILE; SUFFIX is the file suffix,
-# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
-# is marked as config-dependent.
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
-NORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
-
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-NORMAL_S_C= ${CC} ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $<
-
-HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
%OBJS
@@ -82,7 +73,7 @@ HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
# ${SYSTEM_LD_TAIL}
SYSTEM_OBJ= ${_mach}_start.o locore.o param.o ioconf.o ${OBJS}
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
-SYSTEM_LD_HEAD= rm -f $@
+SYSTEM_LD_HEAD= @rm -f $@
SYSTEM_LD_HEAD+=; \
cat ${_archdir}/conf/ldscript.head ${_archdir}/conf/ldscript.tail | \
sed -e 's/@KERNEL_BASE_PHYS@/${KERNEL_BASE_PHYS}/' \
@@ -120,7 +111,7 @@ param.c: $S/conf/param.c
cp $S/conf/param.c .
param.o: param.c Makefile
- ${NORMAL_C_C}
+ ${NORMAL_C}
mcount.o: $S/lib/libkern/mcount.c Makefile
${NORMAL_C_NOP}
@@ -134,11 +125,11 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
clean::
- rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
+ rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxncez -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
diff --git a/sys/arch/aviion/conf/Makefile.aviion b/sys/arch/aviion/conf/Makefile.aviion
index 811560cc900..04d0c1fff15 100644
--- a/sys/arch/aviion/conf/Makefile.aviion
+++ b/sys/arch/aviion/conf/Makefile.aviion
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.aviion,v 1.21 2010/04/28 15:31:32 deraadt Exp $
+# $OpenBSD: Makefile.aviion,v 1.22 2010/05/24 14:59:15 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -12,7 +12,7 @@
MKDEP?= mkdep
SIZE?= size
-STRIP?= strip
+STRIP?= strip
# source tree is located via $S relative to the compilation directory
.ifndef S
@@ -25,18 +25,22 @@ _machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
-CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D${_mach} -Dm88k
-CWARNFLAGS= -Wall -Werror -Wmissing-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main -Wstrict-prototypes \
+CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__
+CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
+ -Wno-main -Wno-uninitialized -Wno-format \
-Wstack-larger-than-2047 -Wvariable-decl
-CMACHFLAGS= -mno-check-zero-division -mmemcpy \
- -fno-builtin-printf -fno-builtin-log
+
+CMACHFLAGS= -mno-check-zero-division -mmemcpy
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
+
COPTS?= -O2
CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
-AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE ${CMACHFLAGS}
+AFLAGS= -D_LOCORE -x assembler-with-cpp -traditional-cpp ${CMACHFLAGS}
# Kernel is linked as a ZMAGIC executable, with start at 10020
#LINKFLAGS= -N -Ttext 0x1000 -e start
LINKFLAGS= -Ttext 0x1000 -e start
@@ -49,22 +53,13 @@ DB_STRUCTINFO=
.endif
HOSTCC?= ${CC}
-HOSTED_CPPFLAGS?=${CPPFLAGS:S/^-nostdinc$//}
-HOSTED_CFLAGS?= ${CFLAGS}
-
-### CPU configuration
-
-# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
-# where TYPE is NORMAL, or PROFILE}; SUFFIX is the file suffix,
-# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
-# is marked as config-dependent.
+HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
+HOSTED_CFLAGS= ${CFLAGS}
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-
-HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
-
PROFILE_C= ${CC} -S -c ${CFLAGS} ${CPPFLAGS} $<; \
sed -e s/_mcount/mcount/ -e s/subrmcount/subr_mcount/ <$*.s | \
${AS} -o $@; \
@@ -125,14 +120,13 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
clean::
- rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
+ rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
${CFILES} ioconf.c param.c | \
- grep -v 'struct/union .* never defined' | \
- grep -v 'possible pointer alignment problem'
+ grep -v 'static function .* unused'
tags:
@echo "see $S/kern/Makefile for tags"
diff --git a/sys/arch/beagle/conf/Makefile.beagle b/sys/arch/beagle/conf/Makefile.beagle
index c9cdfef8742..ce31fcbbd82 100644
--- a/sys/arch/beagle/conf/Makefile.beagle
+++ b/sys/arch/beagle/conf/Makefile.beagle
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.beagle,v 1.21 2010/04/28 15:31:32 deraadt Exp $
+# $OpenBSD: Makefile.beagle,v 1.22 2010/05/24 14:59:15 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -25,22 +25,22 @@ _machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
-CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D__${_mach}__
-CDIAGFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main \
+CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__
+CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
+ -Wno-main -Wno-uninitialized -Wno-format \
-Wstack-larger-than-2047 -Wvariable-decl
-CMACHFLAGS= -ffreestanding
-#CMACHFLAGS= -march=armv4 -mtune=strongarm -ffreestanding
+CMACHFLAGS= -ffreestanding -msoft-float # -march=armv4 -mtune=strongarm
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
-CMACHFLAGS+= -msoft-float -fno-builtin-printf -fno-builtin-log \
- -fno-builtin-log2 -fno-builtin-malloc
COPTS?= -O2
-CFLAGS= ${DEBUG} ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
-AFLAGS= -x assembler-with-cpp -D_LOCORE ${CMACHFLAGS}
+CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+AFLAGS= -D_LOCORE -x assembler-with-cpp ${CMACHFLAGS}
LINKFLAGS= -T ldscript
LINKFLAGS+= --warn-common
STRIPFLAGS= -g -X -x
@@ -51,23 +51,14 @@ DB_STRUCTINFO= db_structinfo.h
DB_STRUCTINFO=
.endif
-HOSTCC= ${CC}
+HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
-
-# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
-# where TYPE is NORMAL, or PROFILE; SUFFIX is the file suffix,
-# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
-# is marked as config-dependent.
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
-NORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
-
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-NORMAL_S_C= ${CC} ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $<
-
-HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
%OBJS
@@ -82,7 +73,7 @@ HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
# ${SYSTEM_LD_TAIL}
SYSTEM_OBJ= ${_mach}_start.o locore.o param.o ioconf.o ${OBJS}
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
-SYSTEM_LD_HEAD= rm -f $@
+SYSTEM_LD_HEAD= @rm -f $@
SYSTEM_LD_HEAD+=; \
cat ${_archdir}/conf/ldscript.head ${_archdir}/conf/ldscript.tail | \
sed -e 's/@KERNEL_BASE_PHYS@/${KERNEL_BASE_PHYS}/' \
@@ -117,7 +108,7 @@ param.c: $S/conf/param.c
cp $S/conf/param.c .
param.o: param.c Makefile
- ${NORMAL_C_C}
+ ${NORMAL_C}
mcount.o: $S/lib/libkern/mcount.c Makefile
${NORMAL_C_NOP}
@@ -131,11 +122,11 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
clean::
- rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
+ rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxncez -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
diff --git a/sys/arch/gumstix/conf/Makefile.gumstix b/sys/arch/gumstix/conf/Makefile.gumstix
index 5e0381d4229..807e33a48d8 100644
--- a/sys/arch/gumstix/conf/Makefile.gumstix
+++ b/sys/arch/gumstix/conf/Makefile.gumstix
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.gumstix,v 1.19 2010/04/28 15:31:32 deraadt Exp $
+# $OpenBSD: Makefile.gumstix,v 1.20 2010/05/24 14:59:15 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -25,22 +25,22 @@ _machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
-CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D__${_mach}__
-CDIAGFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main \
+CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__
+CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
+ -Wno-main -Wno-uninitialized -Wno-format \
-Wstack-larger-than-2047 -Wvariable-decl
-CMACHFLAGS= -ffreestanding
-#CMACHFLAGS= -march=armv4 -mtune=strongarm -ffreestanding
+CMACHFLAGS= -ffreestanding -msoft-float # -march=armv4 -mtune=strongarm
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
-CMACHFLAGS+= -msoft-float -fno-builtin-printf -fno-builtin-log \
- -fno-builtin-log2 -fno-builtin-malloc
COPTS?= -O2
-CFLAGS= ${DEBUG} ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
-AFLAGS= -x assembler-with-cpp -D_LOCORE ${CMACHFLAGS}
+CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+AFLAGS= -D_LOCORE -x assembler-with-cpp ${CMACHFLAGS}
LINKFLAGS= -T ldscript
LINKFLAGS+= --warn-common
STRIPFLAGS= -g -X -x
@@ -51,23 +51,14 @@ DB_STRUCTINFO= db_structinfo.h
DB_STRUCTINFO=
.endif
-HOSTCC= ${CC}
+HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
-
-# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
-# where TYPE is NORMAL, or PROFILE; SUFFIX is the file suffix,
-# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
-# is marked as config-dependent.
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
-NORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
-
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-NORMAL_S_C= ${CC} ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $<
-
-HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
%OBJS
@@ -82,7 +73,7 @@ HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
# ${SYSTEM_LD_TAIL}
SYSTEM_OBJ= ${_mach}_start.o locore.o param.o ioconf.o ${OBJS}
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
-SYSTEM_LD_HEAD= rm -f $@
+SYSTEM_LD_HEAD= @rm -f $@
SYSTEM_LD_HEAD+=; \
cat ${_archdir}/conf/ldscript.head ${_archdir}/conf/ldscript.tail | \
sed -e 's/@KERNEL_BASE_PHYS@/${KERNEL_BASE_PHYS}/' \
@@ -117,7 +108,7 @@ param.c: $S/conf/param.c
cp $S/conf/param.c .
param.o: param.c Makefile
- ${NORMAL_C_C}
+ ${NORMAL_C}
mcount.o: $S/lib/libkern/mcount.c Makefile
${NORMAL_C_NOP}
@@ -131,11 +122,11 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
clean::
- rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
+ rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxncez -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
diff --git a/sys/arch/hp300/conf/Makefile.hp300 b/sys/arch/hp300/conf/Makefile.hp300
index a58f9f7a9e9..de4b186a236 100644
--- a/sys/arch/hp300/conf/Makefile.hp300
+++ b/sys/arch/hp300/conf/Makefile.hp300
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.hp300,v 1.61 2010/05/23 15:10:38 deraadt Exp $
+# $OpenBSD: Makefile.hp300,v 1.62 2010/05/24 14:59:15 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -27,15 +27,20 @@ _archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__
CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main \
+ -Wno-main -Wno-uninitialized -Wno-format \
-Wstack-larger-than-2047 -Wvariable-decl
-CMACHFLAGS= -msoft-float -fno-builtin-printf -fno-builtin-log
+
+CMACHFLAGS= -msoft-float
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
+
COPTS?= -O2
-CFLAGS= ${DEBUG} ${COPTS} ${CWARNFLAGS} ${CMACHFLAGS} ${PIPE}
-AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
+CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+AFLAGS= -D_LOCORE -x assembler-with-cpp -traditional-cpp ${CMACHFLAGS}
LINKFLAGS= -n -Ttext 0 -e start
STRIPFLAGS= -d
@@ -45,12 +50,6 @@ DB_STRUCTINFO= db_structinfo.h
DB_STRUCTINFO=
.endif
-HOSTCC?= ${CC}
-HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
-HOSTED_CFLAGS= ${CFLAGS}
-
-### CPU and MMU configuration
-
.if (${IDENT:M-DHP320} != "" || ${IDENT:M-DHP350} != "")
_OPTIONS+= -DM68020 -DM68K_MMU_HP
CPPFLAGS+= -DCACHE_HAVE_VAC
@@ -86,23 +85,22 @@ CPPFLAGS+= -DM68K_MMU_HP
CPPFLAGS+= -DM68K_MMU_MOTOROLA
.endif
-### for the Motorola 68040 Floating Point Software Product
.include "${_archdir}/fpsp/Makefile.inc"
-# compile rules: rules are named ${TYPE}_${SUFFIX} where TYPE is NORMAL or
-# HOSTED}, and SUFFIX is the file suffix, capitalized (e.g. C for a .c file).
+HOSTCC?= ${CC}
+HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
+HOSTED_CFLAGS= ${CFLAGS}
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
-
%OBJS
%CFILES
-#%SFILES
+%SFILES
# load lines for config "xxx" will be emitted as:
# xxx: ${SYSTEM_DEP} swapxxx.o
@@ -154,11 +152,11 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
clean::
- rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
+ rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} -UKGDB \
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
diff --git a/sys/arch/hppa/conf/Makefile.hppa b/sys/arch/hppa/conf/Makefile.hppa
index c929768a3e4..f8991d8dc4b 100644
--- a/sys/arch/hppa/conf/Makefile.hppa
+++ b/sys/arch/hppa/conf/Makefile.hppa
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.hppa,v 1.51 2010/05/23 16:43:54 deraadt Exp $
+# $OpenBSD: Makefile.hppa,v 1.52 2010/05/24 14:59:15 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -26,15 +26,19 @@ _archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL
-CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wno-uninitialized \
- -Wno-format -Wno-main \
+CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
+ -Wno-main -Wno-uninitialized -Wno-format \
-Wstack-larger-than-2047 -Wvariable-decl
-CMACHFLAGS= -mfast-indirect-calls -mportable-runtime -mno-space-regs \
- -fno-stack-protector -fno-builtin-printf -fno-builtin-log \
- -fno-builtin-log2 -fno-builtin-malloc
+
+CMACHFLAGS= -mfast-indirect-calls -mportable-runtime -mno-space-regs
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
+CMACHFLAGS+= -fno-stack-protector
+
COPTS?= -Os
-CFLAGS= ${DEBUG} ${COPTS} ${CWARNFLAGS} ${CMACHFLAGS} ${PIPE}
-AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
+CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+AFLAGS= -D_LOCORE -x assembler-with-cpp -traditional-cpp ${CMACHFLAGS}
LINKFLAGS= -X -T ${_machdir}/conf/ld.script -Ttext 80000 --warn-common
STRIPFLAGS= -g -x
@@ -70,16 +74,12 @@ DB_STRUCTINFO=
HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
-
-# compile rules: rules are named ${TYPE}_${SUFFIX} where TYPE is NORMAL or
-# HOSTED}, and SUFFIX is the file suffix, capitalized (e.g. C for a .c file).
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
-
%OBJS
%CFILES
@@ -136,11 +136,11 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
clean::
- rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
+ rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} -UKGDB \
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
diff --git a/sys/arch/hppa64/conf/Makefile.hppa64 b/sys/arch/hppa64/conf/Makefile.hppa64
index f85e725b363..ad1ef3d5cc9 100644
--- a/sys/arch/hppa64/conf/Makefile.hppa64
+++ b/sys/arch/hppa64/conf/Makefile.hppa64
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.hppa64,v 1.25 2010/05/23 16:43:54 deraadt Exp $
+# $OpenBSD: Makefile.hppa64,v 1.26 2010/05/24 14:59:15 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -26,15 +26,19 @@ _archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL
-CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wno-uninitialized \
- -Wno-format -Wno-main \
+CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
+ -Wno-main -Wno-uninitialized -Wno-format \
-Wstack-larger-than-2047 -Wvariable-decl
-CMACHFLAGS= -fno-stack-protector -fno-builtin-log -fno-builtin-log2 \
- -fno-builtin-printf -fno-builtin-snprintf \
- -fno-builtin-vsnprintf -fno-builtin-malloc
-COPTS?= -Os -mpa-risc-2-0 -mno-space-regs -mdisable-fpregs
-CFLAGS= ${DEBUG} ${COPTS} ${CWARNFLAGS} ${CMACHFLAGS} ${PIPE}
-AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
+
+CMACHFLAGS= -mpa-risc-2-0 -mno-space-regs -mdisable-fpregs
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
+CMACHFLAGS+= -fno-stack-protector
+
+COPTS?= -Os
+CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+AFLAGS= -D_LOCORE -x assembler-with-cpp -traditional-cpp ${CMACHFLAGS}
LINKFLAGS= -X -T ${_machdir}/conf/ld.script -Ttext 80000 --warn-common
STRIPFLAGS= -g -x
@@ -51,15 +55,12 @@ DB_STRUCTINFO=
HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
-# compile rules: rules are named ${TYPE}_${SUFFIX} where TYPE is NORMAL or
-# HOSTED}, and SUFFIX is the file suffix, capitalized (e.g. C for a .c file).
-
+NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
-
%OBJS
%CFILES
@@ -116,11 +117,11 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
clean::
- rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
+ rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} -UKGDB \
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
diff --git a/sys/arch/i386/conf/Makefile.i386 b/sys/arch/i386/conf/Makefile.i386
index 24373b76749..be460265b7e 100644
--- a/sys/arch/i386/conf/Makefile.i386
+++ b/sys/arch/i386/conf/Makefile.i386
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.i386,v 1.67 2010/05/23 15:32:50 deraadt Exp $
+# $OpenBSD: Makefile.i386,v 1.68 2010/05/24 14:59:15 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -26,26 +26,28 @@ _archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL
-CDIAGFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main \
- -Wstack-larger-than-2047
-
+CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
+ -Wno-main -Wno-uninitialized -Wno-format \
+ -Wstack-larger-than-2047 -Wvariable-decl
+
+CMACHFLAGS=
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
-.endif
-CMACHFLAGS+= -fno-builtin-printf -fno-builtin-log -fno-builtin-log2 \
- -fno-builtin-malloc
+.endifw
COPTS?= -O2
-CFLAGS= ${DEBUG} ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
-AFLAGS= -x assembler-with-cpp -D_LOCORE
+CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+AFLAGS= -D_LOCORE -x assembler-with-cpp ${CMACHFLAGS}
LINKFLAGS= -Ttext 0xD0200120 -e start -N --warn-common
STRIPFLAGS= -g -X -x
.if ${MACHINE} == "amd64"
-CFLAGS+=-m32
-AFLAGS+=-m32
-LINKFLAGS+=-melf_i386_obsd
+CFLAGS+= -m32
+AFLAGS+= -m32
+LINKFLAGS+= -melf_i386_obsd
.endif
.if ${IDENT:M-DDDB_STRUCT}
@@ -54,22 +56,14 @@ DB_STRUCTINFO= db_structinfo.h
DB_STRUCTINFO=
.endif
-HOSTCC= ${CC}
+HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
-
-# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
-# where TYPE is NORMAL, or PROFILE; SUFFIX is the file suffix,
-# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
-# is marked as config-dependent.
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
-
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-NORMAL_S_C= ${CC} ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $<
-
-HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
%OBJS
@@ -84,7 +78,7 @@ HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
# ${SYSTEM_LD_TAIL}
SYSTEM_OBJ= locore.o param.o ioconf.o ${OBJS}
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
-SYSTEM_LD_HEAD= rm -f $@
+SYSTEM_LD_HEAD= @rm -f $@
SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \
${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o
SYSTEM_LD_TAIL= @${SIZE} $@; chmod 755 $@
@@ -128,11 +122,11 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
clean::
- rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
+ rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxncez -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
diff --git a/sys/arch/landisk/conf/Makefile.landisk b/sys/arch/landisk/conf/Makefile.landisk
index f6a0c792766..a24f9849985 100644
--- a/sys/arch/landisk/conf/Makefile.landisk
+++ b/sys/arch/landisk/conf/Makefile.landisk
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.landisk,v 1.28 2010/05/23 16:55:12 deraadt Exp $
+# $OpenBSD: Makefile.landisk,v 1.29 2010/05/24 14:59:15 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -11,11 +11,11 @@
.include <bsd.own.mk>
MKDEP?= mkdep
-STRIP?= strip
SIZE?= size
+STRIP?= strip
# source tree is located via $S relative to the compilation directory
-.ifndef S
+.ifndef S
S!= cd ../../../..; pwd
.endif
@@ -27,17 +27,20 @@ _archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__
CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main \
+ -Wno-main -Wno-uninitialized -Wno-format \
-Wstack-larger-than-2047 -Wvariable-decl
-CMACHFLAGS= -m4-nofpu \
- -fno-builtin-printf -fno-builtin-log -fno-builtin-log2 \
- -fno-builtin-main -fno-builtin-malloc
+
+CMACHFLAGS= -m4-nofpu
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
+
COPTS?= -O2
CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
-AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE -Wa,-little
+AFLAGS= -D_LOCORE -x assembler-with-cpp -traditional-cpp ${CMACHFLAGS}
LINKFLAGS= -N -Ttext 0x8c002000 -e start --warn-common
STRIPFLAGS= -g -X -x
@@ -50,17 +53,11 @@ DB_STRUCTINFO=
HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
-
-# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
-# where TYPE is NORMAL, or PROFILE}; SUFFIX is the file suffix,
-# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
-# is marked as config-dependent.
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
-
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-NORMAL_S_C= ${AS} ${COPTS} ${PARAM} $< -o $@
%OBJS
@@ -75,7 +72,7 @@ NORMAL_S_C= ${AS} ${COPTS} ${PARAM} $< -o $@
# ${SYSTEM_LD_TAIL}
SYSTEM_OBJ= locore.o param.o ioconf.o ${OBJS}
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
-SYSTEM_LD_HEAD= rm -f $@
+SYSTEM_LD_HEAD= @rm -f $@
SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \
${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o
SYSTEM_LD_TAIL= @${SIZE} $@; chmod 755 $@
@@ -118,11 +115,11 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
clean::
- rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
+ rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} -UKGDB \
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
diff --git a/sys/arch/loongson/conf/Makefile.loongson b/sys/arch/loongson/conf/Makefile.loongson
index d980b9b3a37..9cef0bebbaf 100644
--- a/sys/arch/loongson/conf/Makefile.loongson
+++ b/sys/arch/loongson/conf/Makefile.loongson
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.loongson,v 1.18 2010/05/23 16:56:07 deraadt Exp $
+# $OpenBSD: Makefile.loongson,v 1.19 2010/05/24 14:59:15 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -10,13 +10,13 @@
.include <bsd.own.mk>
-AS?= as
-CC?= cc
MKDEP?= mkdep
SIZE?= size
+STRIP?= strip
+AS?= as
+CC?= cc
CPP?= cpp
LD?= ld ${ENDIAN}
-STRIP?= strip
TOUCH?= touch
CPP+=${ENDIAN}
@@ -36,19 +36,22 @@ _archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__
-CDIAGFLAGS= -Werror -Wall -Wmissing-prototypes -Wstrict-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main \
+CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
+ -Wno-main -Wno-uninitialized -Wno-format \
-Wstack-larger-than-2047 -Wvariable-decl
-CMACHFLAGS+= -mno-abicalls ${ABI} -msoft-float \
- -Wa,-mfix-loongson2f-btb \
- -fno-builtin-printf -fno-builtin-log -fno-builtin-log2 \
- -fno-builtin-malloc
+
+CMACHFLAGS= -mno-abicalls ${ABI} -msoft-float -Wa,-mfix-loongson2f-btb
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
+
COPTS?= -O2
-CFLAGS= ${DEBUG} ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
-AFLAGS= -x assembler-with-cpp -D_LOCORE ${CMACHFLAGS}
+CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+AFLAGS= -D_LOCORE -x assembler-with-cpp ${CMACHFLAGS}
+LINKFLAGS= -e start -T ${_machdir}/conf/ld.script -Ttext=${LINK_ADDRESS}
STRIPFLAGS= -g -X -x
.if ${IDENT:M-DDDB_STRUCT}
@@ -57,11 +60,14 @@ DB_STRUCTINFO= db_structinfo.h
DB_STRUCTINFO=
.endif
+HOSTCC?= ${CC}
+HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
+HOSTED_CFLAGS= ${CFLAGS}
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
+
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
-
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-NORMAL_S_C= ${AS} ${COPTS} ${PARAM} $< -o $@
%OBJS
@@ -76,34 +82,32 @@ NORMAL_S_C= ${AS} ${COPTS} ${PARAM} $< -o $@
# ${SYSTEM_LD_TAIL}
SYSTEM_OBJ= locore.o param.o ioconf.o ${OBJS}
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
-SYSTEM_LD_HEAD= rm -f $@
-SYSTEM_LD= @if [ X${DEBUG} = X-g ]; \
- then strip=-X; \
- else strip=-x; \
- fi; \
- echo ${LD} $$strip -o $@ -e start -T ${_machdir}/conf/ld.script \
- -Ttext=${LINK_ADDRESS} '$${SYSTEM_OBJ}' vers.o; \
- ${LD} $$strip -o $@ -e start -T ${_machdir}/conf/ld.script \
- -Ttext=${LINK_ADDRESS} ${SYSTEM_OBJ} vers.o
+SYSTEM_LD_HEAD= @rm -f $@
+SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \
+ ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o
SYSTEM_LD_TAIL= @${SIZE} $@; chmod 755 $@
DEBUG?=
.if ${DEBUG} == "-g"
+LINKFLAGS+= -X
SYSTEM_LD_TAIL+=; \
echo mv $@ $@.gdb; rm -f $@.gdb; mv $@ $@.gdb; \
echo ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb; \
${STRIP} ${STRIPFLAGS} -o $@ $@.gdb
+.else
+LINKFLAGS+= -x
.endif
%LOAD
clean::
- rm -f eddep bsd bsd.gdb bsd.ecoff tags *.o [a-z]*.s \
+ rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} ${PARAM} -UKGDB \
- ${CFILES} ioconf.c param.c
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
+ ${CFILES} ioconf.c param.c | \
+ grep -v 'static function .* unused'
symbols.sort: ${_machdir}/${_mach}/symbols.raw
grep -v '^#' ${_machdir}/${_mach}/symbols.raw \
diff --git a/sys/arch/luna88k/conf/Makefile.luna88k b/sys/arch/luna88k/conf/Makefile.luna88k
index 8befb0b9232..77f7e1374d4 100644
--- a/sys/arch/luna88k/conf/Makefile.luna88k
+++ b/sys/arch/luna88k/conf/Makefile.luna88k
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.luna88k,v 1.28 2010/05/23 15:04:19 deraadt Exp $
+# $OpenBSD: Makefile.luna88k,v 1.29 2010/05/24 14:59:16 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -12,7 +12,7 @@
MKDEP?= mkdep
SIZE?= size
-STRIP?= strip
+STRIP?= strip
# source tree is located via $S relative to the compilation directory
.ifndef S
@@ -26,17 +26,21 @@ _archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__
-CWARNFLAGS= -Wall -Werror -Wmissing-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main -Wstrict-prototypes \
+CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
+ -Wno-main -Wno-uninitialized -Wno-format \
-Wstack-larger-than-2047 -Wvariable-decl
-CMACHFLAGS= -mno-check-zero-division -mmemcpy \
- -fno-builtin-printf -fno-builtin-log
+
+CMACHFLAGS= -mno-check-zero-division -mmemcpy
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
+
COPTS?= -O2
CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
-AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE ${CMACHFLAGS}
+AFLAGS= -D_LOCORE -x assembler-with-cpp -traditional-cpp ${CMACHFLAGS}
LINKFLAGS= -N -Ttext 0x20000 -e start
STRIPFLAGS= -d
@@ -47,20 +51,13 @@ DB_STRUCTINFO=
.endif
HOSTCC?= ${CC}
-HOSTED_CPPFLAGS?=${CPPFLAGS:S/^-nostdinc$//}
-HOSTED_CFLAGS?= ${CFLAGS}
-
-# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
-# where TYPE is NORMAL, or PROFILE}; SUFFIX is the file suffix,
-# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
-# is marked as config-dependent.
+HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
+HOSTED_CFLAGS= ${CFLAGS}
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-
-HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
-
PROFILE_C= ${CC} -S -c ${CFLAGS} ${CPPFLAGS} $<; \
sed -e s/_mcount/mcount/ -e s/subrmcount/subr_mcount/ <$*.s | \
${AS} -o $@; \
@@ -121,14 +118,13 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
clean::
- rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
+ rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
${CFILES} ioconf.c param.c | \
- grep -v 'struct/union .* never defined' | \
- grep -v 'possible pointer alignment problem'
+ grep -v 'static function .* unused'
tags:
@echo "see $S/kern/Makefile for tags"
diff --git a/sys/arch/mac68k/conf/Makefile.mac68k b/sys/arch/mac68k/conf/Makefile.mac68k
index 7093c7c2a52..732c495fb95 100644
--- a/sys/arch/mac68k/conf/Makefile.mac68k
+++ b/sys/arch/mac68k/conf/Makefile.mac68k
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.mac68k,v 1.57 2010/05/23 15:09:38 deraadt Exp $
+# $OpenBSD: Makefile.mac68k,v 1.58 2010/05/24 14:59:16 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -27,15 +27,20 @@ _archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D_-${_mach}__
CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main \
+ -Wno-main -Wno-uninitialized -Wno-format \
-Wstack-larger-than-2047 -Wvariable-decl
-CMACHFLAGS= -msoft-float -fno-builtin-printf -fno-builtin-log
+
+CMACHFLAGS= -msoft-float
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
+
COPTS?= -O2
-CFLAGS= ${DEBUG} ${COPTS} ${CWARNFLAGS} ${CMACHFLAGS} ${PIPE}
-AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
+CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+AFLAGS= -D_LOCORE -x assembler-with-cpp -traditional-cpp ${CMACHFLAGS}
LINKFLAGS= -n -Ttext 0 -e start
STRIPFLAGS= -d
@@ -45,25 +50,16 @@ DB_STRUCTINFO= db_structinfo.h
DB_STRUCTINFO=
.endif
+.include "${_archdir}/fpsp/Makefile.inc"
+
HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
-
-### for the Motorola 68040 Floating Point Software Product
-.include "${_archdir}/fpsp/Makefile.inc"
-
-# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
-# where TYPE is NORMAL, or PROFILE}; SUFFIX is the file suffix,
-# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
-# is marked as config-dependent.
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
-
-HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
-
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-NORMAL_S_C= ${CC} ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $<
%OBJS
@@ -121,11 +117,11 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
clean::
- rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
+ rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
diff --git a/sys/arch/macppc/conf/Makefile.macppc b/sys/arch/macppc/conf/Makefile.macppc
index 9ffc8040f6f..968650e98ef 100644
--- a/sys/arch/macppc/conf/Makefile.macppc
+++ b/sys/arch/macppc/conf/Makefile.macppc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.macppc,v 1.48 2010/05/23 16:12:56 deraadt Exp $
+# $OpenBSD: Makefile.macppc,v 1.49 2010/05/24 14:59:16 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -11,11 +11,11 @@
.include <bsd.own.mk>
MKDEP?= mkdep
-STRIP?= strip
SIZE?= size
+STRIP?= strip
# source tree is located via $S relative to the compilation directory
-.ifndef S
+.ifndef S
S!= cd ../../../..; pwd
.endif
@@ -27,16 +27,20 @@ _archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__
CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main \
+ -Wno-main -Wno-uninitialized -Wno-format \
-Wstack-larger-than-2047 -Wvariable-decl
-CMACHFLAGS= -msoft-float -Wa,-many -fno-builtin-printf -fno-builtin-log \
- -fno-builtin-log2 -fno-builtin-malloc
+
+CMACHFLAGS= -msoft-float -Wa,-many
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
+
COPTS?= -O2
CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
-AFLAGS= -D_LOCORE -Wa,-many
+AFLAGS= -D_LOCORE ${CMACHFLAGS}
LINKFLAGS= -N -Ttext 100114 -e start --warn-common
STRIPFLAGS= -g -X -x
@@ -49,17 +53,11 @@ DB_STRUCTINFO=
HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
-
-# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
-# where TYPE is NORMAL, or PROFILE}; SUFFIX is the file suffix,
-# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
-# is marked as config-dependent.
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
-
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-NORMAL_S_C= ${AS} ${COPTS} ${PARAM} $< -o $@
%OBJS
@@ -74,7 +72,7 @@ NORMAL_S_C= ${AS} ${COPTS} ${PARAM} $< -o $@
# ${SYSTEM_LD_TAIL}
SYSTEM_OBJ= locore.o param.o ioconf.o ${OBJS}
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
-SYSTEM_LD_HEAD= rm -f $@
+SYSTEM_LD_HEAD= @rm -f $@
SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \
${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o
SYSTEM_LD_TAIL= @${SIZE} $@; chmod 755 $@
@@ -117,13 +115,13 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
clean::
- rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
+ rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} -UKGDB ${CFILES} \
- ioconf.c param.c | \
- grep -v 'static function .* unused'
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
+ ${CFILES} ioconf.c param.c | \
+ grep -v 'static function .* unused'
tags:
@echo "see $S/kern/Makefile for tags"
diff --git a/sys/arch/moko/conf/Makefile.moko b/sys/arch/moko/conf/Makefile.moko
index 360dfd1b86b..311b0b495b2 100644
--- a/sys/arch/moko/conf/Makefile.moko
+++ b/sys/arch/moko/conf/Makefile.moko
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.moko,v 1.19 2010/04/28 15:31:33 deraadt Exp $
+# $OpenBSD: Makefile.moko,v 1.20 2010/05/24 14:59:16 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -25,22 +25,22 @@ _machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
-CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D__${_mach}__
-CDIAGFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main \
+CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__
+CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
+ -Wno-main -Wno-uninitialized -Wno-format \
-Wstack-larger-than-2047 -Wvariable-decl
-CMACHFLAGS= -ffreestanding
-#CMACHFLAGS= -march=armv4 -mtune=strongarm -ffreestanding
+CMACHFLAGS= -ffreestanding -msoft-float # -march=armv4 -mtune=strongarm
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
-CMACHFLAGS+= -msoft-float -fno-builtin-printf -fno-builtin-log \
- -fno-builtin-log2 -fno-builtin-malloc
COPTS?= -O2
-CFLAGS= ${DEBUG} ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
-AFLAGS= -x assembler-with-cpp -D_LOCORE ${CMACHFLAGS}
+CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+AFLAGS= -D_LOCORE -x assembler-with-cpp ${CMACHFLAGS}
LINKFLAGS= -T ldscript
LINKFLAGS+= --warn-common
STRIPFLAGS= -g -X -x
@@ -51,23 +51,14 @@ DB_STRUCTINFO= db_structinfo.h
DB_STRUCTINFO=
.endif
-HOSTCC= ${CC}
+HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
-
-# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
-# where TYPE is NORMAL, or PROFILE; SUFFIX is the file suffix,
-# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
-# is marked as config-dependent.
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
-NORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
-
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-NORMAL_S_C= ${CC} ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $<
-
-HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
%OBJS
@@ -82,7 +73,7 @@ HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
# ${SYSTEM_LD_TAIL}
SYSTEM_OBJ= ${_mach}_start.o locore.o param.o ioconf.o ${OBJS}
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
-SYSTEM_LD_HEAD= rm -f $@
+SYSTEM_LD_HEAD= @rm -f $@
SYSTEM_LD_HEAD+=; \
cat ${_archdir}/conf/ldscript.head ${_archdir}/conf/ldscript.tail | \
sed -e 's/@KERNEL_BASE_PHYS@/${KERNEL_BASE_PHYS}/' \
@@ -117,7 +108,7 @@ param.c: $S/conf/param.c
cp $S/conf/param.c .
param.o: param.c Makefile
- ${NORMAL_C_C}
+ ${NORMAL_C}
mcount.o: $S/lib/libkern/mcount.c Makefile
${NORMAL_C_NOP}
@@ -131,11 +122,11 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
clean::
- rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
+ rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxncez -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
diff --git a/sys/arch/mvme68k/conf/Makefile.mvme68k b/sys/arch/mvme68k/conf/Makefile.mvme68k
index 71364cdd371..1b34b8582e2 100644
--- a/sys/arch/mvme68k/conf/Makefile.mvme68k
+++ b/sys/arch/mvme68k/conf/Makefile.mvme68k
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.mvme68k,v 1.49 2010/05/23 15:10:38 deraadt Exp $
+# $OpenBSD: Makefile.mvme68k,v 1.50 2010/05/24 14:59:16 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -27,17 +27,20 @@ _archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__
CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main \
+ -Wno-main -Wno-uninitialized -Wno-format \
-Wstack-larger-than-2047 -Wvariable-decl
-CMACHFLAGS+= -msoft-float -fno-builtin-printf -fno-builtin-log
+CMACHFLAGS= -msoft-float
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
COPTS?= -O2
-CFLAGS= ${DEBUG} ${COPTS} ${CWARNFLAGS} ${CMACHFLAGS} ${PIPE}
-AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
+CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+AFLAGS= -D_LOCORE -x assembler-with-cpp -traditional-cpp ${CMACHFLAGS}
LINKFLAGS= -Ttext 0x10000 -z -e start
STRIPFLAGS= -d
@@ -47,25 +50,18 @@ DB_STRUCTINFO= db_structinfo.h
DB_STRUCTINFO=
.endif
-HOSTCC= ${CC}
-HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
-HOSTED_CFLAGS= ${CFLAGS}
-
-### for the Motorola 68040 Floating Point Software Product
.include "${_archdir}/fpsp/Makefile.inc"
-
-### for the Motorola 68060 Support Package
.include "${_archdir}/060sp/Makefile.inc"
-# compile rules: rules are named ${TYPE}_${SUFFIX} where TYPE is NORMAL or
-# HOSTED}, and SUFFIX is the file suffix, capitalized (e.g. C for a .c file).
+HOSTCC?= ${CC}
+HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
+HOSTED_CFLAGS= ${CFLAGS}
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
-
%OBJS
%CFILES
@@ -122,14 +118,13 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
clean::
- rm -f eddep bsd bsd.gdb tags *.[io] [a-z]*.s \
+ rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} ${PARAM} -UKGDB \
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
${CFILES} ioconf.c param.c | \
- grep -v 'struct/union .* never defined' | \
- grep -v 'possible pointer alignment problem'
+ grep -v 'static function .* unused'
tags:
@echo "see $S/kern/Makefile for tags"
diff --git a/sys/arch/mvme88k/conf/Makefile.mvme88k b/sys/arch/mvme88k/conf/Makefile.mvme88k
index 30908e3f3c7..f83839bb8fe 100644
--- a/sys/arch/mvme88k/conf/Makefile.mvme88k
+++ b/sys/arch/mvme88k/conf/Makefile.mvme88k
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.mvme88k,v 1.58 2010/04/28 15:31:33 deraadt Exp $
+# $OpenBSD: Makefile.mvme88k,v 1.59 2010/05/24 14:59:16 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -12,7 +12,7 @@
MKDEP?= mkdep
SIZE?= size
-STRIP?= strip
+STRIP?= strip
# source tree is located via $S relative to the compilation directory
.ifndef S
@@ -25,18 +25,22 @@ _machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
-CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D${_mach} -Dm88k
-CWARNFLAGS= -Wall -Werror -Wmissing-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main -Wstrict-prototypes \
+CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__
+CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
+ -Wno-main -Wno-uninitialized -Wno-format \
-Wstack-larger-than-2047 -Wvariable-decl
-CMACHFLAGS= -mno-check-zero-division -mmemcpy \
- -fno-builtin-printf -fno-builtin-log
+
+CMACHFLAGS= -mno-check-zero-division -mmemcpy
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
+
COPTS?= -O2
CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
-AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE ${CMACHFLAGS}
+AFLAGS= -D_LOCORE -x assembler-with-cpp -traditional-cpp ${CMACHFLAGS}
LINKFLAGS= -Ttext 0x10000 -e start
STRIPFLAGS= -d
@@ -47,22 +51,14 @@ DB_STRUCTINFO=
.endif
HOSTCC?= ${CC}
-HOSTED_CPPFLAGS?=${CPPFLAGS:S/^-nostdinc$//}
-HOSTED_CFLAGS?= ${CFLAGS}
-
-### CPU configuration
-
-# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
-# where TYPE is NORMAL, or PROFILE}; SUFFIX is the file suffix,
-# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
-# is marked as config-dependent.
+HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
+HOSTED_CFLAGS= ${CFLAGS}
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
-
PROFILE_C= ${CC} -S -c ${CFLAGS} ${CPPFLAGS} $<; \
sed -e s/_mcount/mcount/ -e s/subrmcount/subr_mcount/ <$*.s | \
${AS} -o $@; \
@@ -124,14 +120,13 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
clean::
- rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
+ rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
${CFILES} ioconf.c param.c | \
- grep -v 'struct/union .* never defined' | \
- grep -v 'possible pointer alignment problem'
+ grep -v 'static function .* unused'
tags:
@echo "see $S/kern/Makefile for tags"
diff --git a/sys/arch/mvmeppc/conf/Makefile.mvmeppc b/sys/arch/mvmeppc/conf/Makefile.mvmeppc
index 2554d4a406c..6bc1033c257 100644
--- a/sys/arch/mvmeppc/conf/Makefile.mvmeppc
+++ b/sys/arch/mvmeppc/conf/Makefile.mvmeppc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.mvmeppc,v 1.45 2010/04/28 15:31:33 deraadt Exp $
+# $OpenBSD: Makefile.mvmeppc,v 1.46 2010/05/24 14:59:16 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -11,11 +11,11 @@
.include <bsd.own.mk>
MKDEP?= mkdep
-STRIP?= strip
SIZE?= size
+STRIP?= strip
# source tree is located via $S relative to the compilation directory
-.ifndef S
+.ifndef S
S!= cd ../../../..; pwd
.endif
@@ -25,18 +25,22 @@ _machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
-CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D__${_mach}__
+CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__
CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main \
+ -Wno-main -Wno-uninitialized -Wno-format \
-Wstack-larger-than-2047 -Wvariable-decl
-CMACHFLAGS= -msoft-float -Wa,-m7400 -fno-builtin-printf -fno-builtin-log \
- -fno-builtin-log2 -fno-builtin-malloc
+
+CMACHFLAGS= -msoft-float -Wa,-m7400
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
+
COPTS?= -O2
CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
-AFLAGS= -D_LOCORE
+AFLAGS= -D_LOCORE ${CMACHFLAGS}
LINKFLAGS= -N -Ttext 100114 -e start --warn-common
STRIPFLAGS= -g -X -x
@@ -49,18 +53,11 @@ DB_STRUCTINFO=
HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
-
-# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
-# where TYPE is NORMAL, or PROFILE}; SUFFIX is the file suffix,
-# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
-# is marked as config-dependent.
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
-NORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
-
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-NORMAL_S_C= ${AS} ${COPTS} ${PARAM} $< -o $@
%OBJS
@@ -75,7 +72,7 @@ NORMAL_S_C= ${AS} ${COPTS} ${PARAM} $< -o $@
# ${SYSTEM_LD_TAIL}
SYSTEM_OBJ= locore.o param.o ioconf.o ${OBJS}
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
-SYSTEM_LD_HEAD= rm -f $@
+SYSTEM_LD_HEAD= @rm -f $@
SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \
${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o
SYSTEM_LD_TAIL= @${SIZE} $@; chmod 755 $@
@@ -105,7 +102,7 @@ param.c: $S/conf/param.c
cp $S/conf/param.c .
param.o: param.c Makefile
- ${NORMAL_C_C}
+ ${NORMAL_C}
mcount.o: $S/lib/libkern/mcount.c Makefile
${NORMAL_C_NOP}
@@ -118,13 +115,13 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
clean::
- rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
+ rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} -UKGDB ${CFILES} \
- ioconf.c param.c | \
- grep -v 'static function .* unused'
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
+ ${CFILES} ioconf.c param.c | \
+ grep -v 'static function .* unused'
tags:
@echo "see $S/kern/Makefile for tags"
diff --git a/sys/arch/palm/conf/Makefile.palm b/sys/arch/palm/conf/Makefile.palm
index ac7c471d837..8ac86143ae0 100644
--- a/sys/arch/palm/conf/Makefile.palm
+++ b/sys/arch/palm/conf/Makefile.palm
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.palm,v 1.16 2010/04/28 15:31:33 deraadt Exp $
+# $OpenBSD: Makefile.palm,v 1.17 2010/05/24 14:59:16 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -25,22 +25,22 @@ _machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
-CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D__${_mach}__
-CDIAGFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main \
+CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__
+CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
+ -Wno-main -Wno-uninitialized -Wno-format \
-Wstack-larger-than-2047 -Wvariable-decl
-CMACHFLAGS= -ffreestanding
-#CMACHFLAGS= -march=armv4 -mtune=strongarm -ffreestanding
+CMACHFLAGS= -ffreestanding -msoft-float # -march=armv4 -mtune=strongarm
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
-CMACHFLAGS+= -msoft-float -fno-builtin-printf -fno-builtin-log \
- -fno-builtin-log2 -fno-builtin-malloc
COPTS?= -O2
-CFLAGS= ${DEBUG} ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
-AFLAGS= -x assembler-with-cpp -D_LOCORE ${CMACHFLAGS}
+CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+AFLAGS= -D_LOCORE -x assembler-with-cpp ${CMACHFLAGS}
LINKFLAGS= -T ldscript
LINKFLAGS+= --warn-common
STRIPFLAGS= -g -X -x
@@ -51,23 +51,14 @@ DB_STRUCTINFO= db_structinfo.h
DB_STRUCTINFO=
.endif
-HOSTCC= ${CC}
+HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
-
-# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
-# where TYPE is NORMAL, or PROFILE; SUFFIX is the file suffix,
-# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
-# is marked as config-dependent.
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
-NORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
-
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-NORMAL_S_C= ${CC} ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $<
-
-HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
%OBJS
@@ -82,7 +73,7 @@ HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
# ${SYSTEM_LD_TAIL}
SYSTEM_OBJ= ${_mach}_start.o locore.o param.o ioconf.o ${OBJS}
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
-SYSTEM_LD_HEAD= rm -f $@
+SYSTEM_LD_HEAD= @rm -f $@
SYSTEM_LD_HEAD+=; \
cat ${_archdir}/conf/ldscript.head ${_archdir}/conf/ldscript.tail | \
sed -e 's/@KERNEL_BASE_PHYS@/${KERNEL_BASE_PHYS}/' \
@@ -117,7 +108,7 @@ param.c: $S/conf/param.c
cp $S/conf/param.c .
param.o: param.c Makefile
- ${NORMAL_C_C}
+ ${NORMAL_C}
mcount.o: $S/lib/libkern/mcount.c Makefile
${NORMAL_C_NOP}
@@ -131,11 +122,11 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
clean::
- rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
+ rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxncez -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
diff --git a/sys/arch/sgi/conf/Makefile.sgi b/sys/arch/sgi/conf/Makefile.sgi
index 25e7b3e62c5..864e4c5c128 100644
--- a/sys/arch/sgi/conf/Makefile.sgi
+++ b/sys/arch/sgi/conf/Makefile.sgi
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.sgi,v 1.39 2010/04/28 15:31:33 deraadt Exp $
+# $OpenBSD: Makefile.sgi,v 1.40 2010/05/24 14:59:16 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -10,13 +10,13 @@
.include <bsd.own.mk>
-AS?= as
-CC?= cc
MKDEP?= mkdep
SIZE?= size
+STRIP?= strip
+AS?= as
+CC?= cc
CPP?= cpp
LD?= ld ${ENDIAN}
-STRIP?= strip
TOUCH?= touch
CPP+=${ENDIAN}
@@ -35,19 +35,23 @@ _machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
-CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D__${_mach}__
-CDIAGFLAGS= -Werror -Wall -Wmissing-prototypes -Wstrict-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main \
+CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__
+CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
+ -Wno-main -Wno-uninitialized -Wno-format \
-Wstack-larger-than-2047 -Wvariable-decl
-CMACHFLAGS+= -mno-abicalls ${ABI} -msoft-float \
- -fno-builtin-printf -fno-builtin-log -fno-builtin-log2 \
- -fno-builtin-malloc
+
+CMACHFLAGS= -mno-abicalls ${ABI} -msoft-float
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
+
COPTS?= -O2
-CFLAGS= ${DEBUG} ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
-AFLAGS= -x assembler-with-cpp -mno-abicalls ${ABI} -D_LOCORE
+CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+AFLAGS= -D_LOCORE -x assembler-with-cpp ${CMACHFLAGS}
+LINKFLAGS= -e start -T ${_machdir}/conf/ld.script -Ttext=${LINK_ADDRESS}
STRIPFLAGS= -g -X -x
.if ${IDENT:M-DDDB_STRUCT}
@@ -56,11 +60,14 @@ DB_STRUCTINFO= db_structinfo.h
DB_STRUCTINFO=
.endif
+HOSTCC?= ${CC}
+HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
+HOSTED_CFLAGS= ${CFLAGS}
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
+
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
-NORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-NORMAL_S_C= ${AS} ${COPTS} ${PARAM} $< -o $@
%OBJS
@@ -75,34 +82,32 @@ NORMAL_S_C= ${AS} ${COPTS} ${PARAM} $< -o $@
# ${SYSTEM_LD_TAIL}
SYSTEM_OBJ= locore.o param.o ioconf.o ${OBJS}
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
-SYSTEM_LD_HEAD= rm -f $@
-SYSTEM_LD= @if [ X${DEBUG} = X-g ]; \
- then strip=-X; \
- else strip=-x; \
- fi; \
- echo ${LD} $$strip -o $@ -e start -T ${_machdir}/conf/ld.script \
- -Ttext=${LINK_ADDRESS} '$${SYSTEM_OBJ}' vers.o; \
- ${LD} $$strip -o $@ -e start -T ${_machdir}/conf/ld.script \
- -Ttext=${LINK_ADDRESS} ${SYSTEM_OBJ} vers.o
+SYSTEM_LD_HEAD= @rm -f $@
+SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \
+ ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o
SYSTEM_LD_TAIL= @${SIZE} $@; chmod 755 $@
DEBUG?=
.if ${DEBUG} == "-g"
+LINKFLAGS+= -X
SYSTEM_LD_TAIL+=; \
echo mv $@ $@.gdb; rm -f $@.gdb; mv $@ $@.gdb; \
echo ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb; \
${STRIP} ${STRIPFLAGS} -o $@ $@.gdb
+.else
+LINKFLAGS+= -x
.endif
%LOAD
clean::
- rm -f eddep bsd bsd.gdb tags *.[io] [a-z]*.s \
+ rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} ${PARAM} -UKGDB \
- ${CFILES} ioconf.c param.c
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
+ ${CFILES} ioconf.c param.c | \
+ grep -v 'static function .* unused'
symbols.sort: ${_machdir}/${_mach}/symbols.raw
grep -v '^#' ${_machdir}/${_mach}/symbols.raw \
@@ -134,7 +139,7 @@ param.c: $S/conf/param.c
cp $S/conf/param.c .
param.o: param.c Makefile
- ${NORMAL_C_C}
+ ${NORMAL_C}
mcount.o: $S/lib/libkern/mcount.c Makefile
${NORMAL_C_NOP}
diff --git a/sys/arch/socppc/conf/Makefile.socppc b/sys/arch/socppc/conf/Makefile.socppc
index 26a855d4982..af2547b2df4 100644
--- a/sys/arch/socppc/conf/Makefile.socppc
+++ b/sys/arch/socppc/conf/Makefile.socppc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.socppc,v 1.19 2010/04/28 15:31:33 deraadt Exp $
+# $OpenBSD: Makefile.socppc,v 1.20 2010/05/24 14:59:16 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -11,11 +11,11 @@
.include <bsd.own.mk>
MKDEP?= mkdep
-STRIP?= strip
SIZE?= size
+STRIP?= strip
# source tree is located via $S relative to the compilation directory
-.ifndef S
+.ifndef S
S!= cd ../../../..; pwd
.endif
@@ -25,18 +25,22 @@ _machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
-CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D__${_mach}__
+CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__
CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main \
+ -Wno-main -Wno-uninitialized -Wno-format \
-Wstack-larger-than-2047 -Wvariable-decl
-CMACHFLAGS= -msoft-float -Wa,-many -fno-builtin-printf -fno-builtin-log \
- -fno-builtin-log2 -fno-builtin-malloc
+
+CMACHFLAGS= -msoft-float -Wa,-many
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
+
COPTS?= -O2
CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
-AFLAGS= -D_LOCORE -Wa,-many
+AFLAGS= -D_LOCORE ${CMACHFLAGS}
LINKFLAGS= -N -Ttext 200000 -e start --warn-common
STRIPFLAGS= -g -X -x
@@ -49,19 +53,11 @@ DB_STRUCTINFO=
HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
-
-# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
-# where TYPE is NORMAL, or PROFILE}; SUFFIX is the file suffix,
-# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
-# is marked as config-dependent.
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
-NORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
-
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-NORMAL_S_C= ${AS} ${COPTS} ${PARAM} $< -o $@
-
%OBJS
@@ -76,7 +72,7 @@ NORMAL_S_C= ${AS} ${COPTS} ${PARAM} $< -o $@
# ${SYSTEM_LD_TAIL}
SYSTEM_OBJ= locore.o param.o ioconf.o ${OBJS}
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
-SYSTEM_LD_HEAD= rm -f $@
+SYSTEM_LD_HEAD= @rm -f $@
SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \
${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o
SYSTEM_LD_TAIL= @${SIZE} $@; chmod 755 $@
@@ -106,7 +102,7 @@ param.c: $S/conf/param.c
cp $S/conf/param.c .
param.o: param.c Makefile
- ${NORMAL_C_C}
+ ${NORMAL_C}
mcount.o: $S/lib/libkern/mcount.c Makefile
${NORMAL_C_NOP}
@@ -119,13 +115,13 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
clean::
- rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
+ rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} -UKGDB ${CFILES} \
- ioconf.c param.c | \
- grep -v 'static function .* unused'
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
+ ${CFILES} ioconf.c param.c | \
+ grep -v 'static function .* unused'
tags:
@echo "see $S/kern/Makefile for tags"
diff --git a/sys/arch/solbourne/conf/Makefile.solbourne b/sys/arch/solbourne/conf/Makefile.solbourne
index 62d1e81aff6..20fdc45c45f 100644
--- a/sys/arch/solbourne/conf/Makefile.solbourne
+++ b/sys/arch/solbourne/conf/Makefile.solbourne
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.solbourne,v 1.22 2010/04/28 15:31:34 deraadt Exp $
+# $OpenBSD: Makefile.solbourne,v 1.23 2010/05/24 14:59:16 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -25,20 +25,22 @@ _machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
-CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D${_mach} -Dsparc
-CDIAGFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main \
+CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__
+CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
+ -Wno-main -Wno-uninitialized -Wno-format \
-Wstack-larger-than-2047 -Wvariable-decl
-CMACHFLAGS= -fno-builtin-printf -fno-builtin-log
+CMACHFLAGS= -mno-fpu
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
-CFLAGS= ${DEBUG} -O2 ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
-# add `-mno-fpu' to work around gcc (last noticed in v2.7.2) bug
-CFLAGS+= -mno-fpu
-AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
+COPTS?= -O2
+CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+AFLAGS= -D_LOCORE -x assembler-with-cpp -traditional-cpp ${CMACHFLAGS}
LINKFLAGS= -N -e start -T ${_machdir}/conf/ld.script -Ttext FD084000
STRIPFLAGS= -g -X -x
@@ -48,23 +50,14 @@ DB_STRUCTINFO= db_structinfo.h
DB_STRUCTINFO=
.endif
-HOSTCC= ${CC}
+HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
-
-# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
-# where TYPE is NORMAL, or PROFILE}; SUFFIX is the file suffix,
-# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
-# is marked as config-dependent.
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
-NORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
-
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-NORMAL_S_C= ${CC} ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $<
-
-HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
%OBJS
@@ -109,7 +102,7 @@ param.c: $S/conf/param.c
cp $S/conf/param.c .
param.o: param.c Makefile
- ${NORMAL_C_C}
+ ${NORMAL_C}
mcount.o: $S/lib/libkern/mcount.c Makefile
${NORMAL_C_NOP}
@@ -127,7 +120,7 @@ clean::
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
diff --git a/sys/arch/sparc/conf/Makefile.sparc b/sys/arch/sparc/conf/Makefile.sparc
index a8d7f1bef4b..51a733bb915 100644
--- a/sys/arch/sparc/conf/Makefile.sparc
+++ b/sys/arch/sparc/conf/Makefile.sparc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.sparc,v 1.59 2010/04/28 15:31:34 deraadt Exp $
+# $OpenBSD: Makefile.sparc,v 1.60 2010/05/24 14:59:16 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -25,25 +25,25 @@ _machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
-CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D${_mach}
-CDIAGFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main \
- -Wstack-larger-than-2047
+CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL
+CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
+ -Wno-main -Wno-uninitialized -Wno-format \
+ -Wstack-larger-than-2047 # -Wvariable-decl
+CMACHFLAGS= -mno-fpu
.if ${IDENT:M-DSUN*} == ${IDENT:M-DSUN4M}
-CMACHFLAGS= -mcpu=supersparc
-.else
-CMACHFLAGS=
+CMACHFLAGS+= -mcpu=supersparc
.endif
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
-CMACHFLAGS+= -fno-builtin-printf -fno-builtin-log
-CFLAGS= ${DEBUG} -O2 ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
-# add `-mno-fpu' to work around gcc (last noticed in v2.7.2) bug
-CFLAGS+= -mno-fpu
-AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
+COPTS?= -O2
+CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+AFLAGS= -D_LOCORE -x assembler-with-cpp -traditional-cpp ${CMACHFLAGS}
LINKFLAGS= -N -e start -Ttext F8004000
STRIPFLAGS= -g -X -x
@@ -53,23 +53,14 @@ DB_STRUCTINFO= db_structinfo.h
DB_STRUCTINFO=
.endif
-HOSTCC= ${CC}
+HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
-
-# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
-# where TYPE is NORMAL, or PROFILE}; SUFFIX is the file suffix,
-# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
-# is marked as config-dependent.
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
-NORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
-
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-NORMAL_S_C= ${CC} ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $<
-
-HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
%OBJS
@@ -114,7 +105,7 @@ param.c: $S/conf/param.c
cp $S/conf/param.c .
param.o: param.c Makefile
- ${NORMAL_C_C}
+ ${NORMAL_C}
mcount.o: $S/lib/libkern/mcount.c Makefile
${NORMAL_C_NOP}
@@ -132,7 +123,7 @@ clean::
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
diff --git a/sys/arch/sparc64/conf/Makefile.sparc64 b/sys/arch/sparc64/conf/Makefile.sparc64
index cb7f1cadc0f..2447653c1a2 100644
--- a/sys/arch/sparc64/conf/Makefile.sparc64
+++ b/sys/arch/sparc64/conf/Makefile.sparc64
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.sparc64,v 1.46 2010/05/23 16:50:44 deraadt Exp $
+# $OpenBSD: Makefile.sparc64,v 1.47 2010/05/24 14:59:16 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -26,18 +26,21 @@ _archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL
-CDIAGFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main \
+CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
+ -Wno-main -Wno-uninitialized -Wno-format \
-Wstack-larger-than-2047 -Wvariable-decl
-CMACHFLAGS= -Wa,-Av9b, -mno-fpu -fno-builtin-printf -fno-builtin-log \
- -fno-builtin-log2 -fno-builtin-malloc
+CMACHFLAGS= -Wa,-Av9b, -mno-fpu
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
-CFLAGS= ${DEBUG} -O2 ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
-AFLAGS= -x assembler-with-cpp -D_LOCORE -Wa,-Av9b
+COPTS?= -O2
+CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+AFLAGS= -D_LOCORE -x assembler-with-cpp ${CMACHFLAGS}
LINKFLAGS= -n -Ttext 01000000 -Tdata 01800000 -e start -N
STRIPFLAGS= -g -X -x
@@ -47,22 +50,14 @@ DB_STRUCTINFO= db_structinfo.h
DB_STRUCTINFO=
.endif
-HOSTCC= ${CC}
+HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
-
-# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
-# where TYPE is NORMAL, or PROFILE}; SUFFIX is the file suffix,
-# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
-# is marked as config-dependent.
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
-
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-NORMAL_S_C= ${CC} ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $<
-
-HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
%OBJS
@@ -125,7 +120,7 @@ clean::
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'
diff --git a/sys/arch/vax/conf/Makefile.vax b/sys/arch/vax/conf/Makefile.vax
index 460f593c204..aacbab50ebf 100644
--- a/sys/arch/vax/conf/Makefile.vax
+++ b/sys/arch/vax/conf/Makefile.vax
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.vax,v 1.47 2010/04/28 15:31:34 deraadt Exp $
+# $OpenBSD: Makefile.vax,v 1.48 2010/05/24 14:59:16 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -25,19 +25,22 @@ _machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
-CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D_VAX_INLINE_
-CWARNFLAGS?= -Werror -Wall -Wmissing-prototypes -Wstrict-prototypes \
- -Wno-main -Wno-format -Wno-uninitialized \
+CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL
+CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
+ -Wno-main -Wno-uninitialized -Wno-format \
-Wstack-larger-than-2047 -Wvariable-decl
+CMACHFLAGS=
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
-CMACHFLAGS+= -fno-builtin-printf -fno-builtin-log
COPTS?= -O2
-CFLAGS= ${DEBUG} ${COPTS} ${CWARNFLAGS} ${CMACHFLAGS} ${PIPE}
-AFLAGS= -x assembler-with-cpp -traditional-cpp -D_LOCORE
+CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+AFLAGS= -D_LOCORE -x assembler-with-cpp -traditional-cpp ${CMACHFLAGS}
LINKFLAGS= -N -Ttext 80000000 -e start
STRIPFLAGS= -d
@@ -47,20 +50,15 @@ DB_STRUCTINFO= db_structinfo.h
DB_STRUCTINFO=
.endif
-HOSTED_CC= ${CC}
+HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
-
-# compile rules: rules are named ${TYPE}_${SUFFIX} where TYPE is NORMAL or
-# HOSTED}, and SUFFIX is the file suffix, capitalized (e.g. C for a .c file).
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
-NOPROF_C= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-HOSTED_C= ${HOSTED_CC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
-
%OBJS
%CFILES
@@ -117,13 +115,12 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
clean::
- rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
+ rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
@lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
- ${_machdir}/${_mach}/Locore.c ${CFILES} \
- ioconf.c param.c | \
+ ${CFILES} ioconf.c param.c ${_machdir}/${_mach}/Locore.c | \
grep -v 'static function .* unused'
tags:
diff --git a/sys/arch/zaurus/conf/Makefile.zaurus b/sys/arch/zaurus/conf/Makefile.zaurus
index 09690ebb263..586cd29957c 100644
--- a/sys/arch/zaurus/conf/Makefile.zaurus
+++ b/sys/arch/zaurus/conf/Makefile.zaurus
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.zaurus,v 1.29 2010/04/28 15:31:34 deraadt Exp $
+# $OpenBSD: Makefile.zaurus,v 1.30 2010/05/24 14:59:16 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -25,22 +25,22 @@ _machdir?= $S/arch/${_mach}
_archdir?= $S/arch/${_arch}
INCLUDES= -nostdinc -I. -I$S -I$S/arch
-CPPFLAGS= ${INCLUDES} ${IDENT} -D_KERNEL -D__${_mach}__
-CDIAGFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
- -Wno-uninitialized -Wno-format -Wno-main \
+CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D__${_mach}__
+CWARNFLAGS= -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
+ -Wno-main -Wno-uninitialized -Wno-format \
-Wstack-larger-than-2047 -Wvariable-decl
-CMACHFLAGS= -ffreestanding
-#CMACHFLAGS= -march=armv4 -mtune=strongarm -ffreestanding
+CMACHFLAGS= -ffreestanding -msoft-float # -march=armv4 -mtune=strongarm
+CMACHFLAGS+= -fno-builtin-printf -fno-builtin-snprintf \
+ -fno-builtin-vsnprintf -fno-builtin-log \
+ -fno-builtin-log2 -fno-builtin-malloc
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
-CMACHFLAGS+= -msoft-float -fno-builtin-printf -fno-builtin-log \
- -fno-builtin-log2 -fno-builtin-malloc
COPTS?= -O2
-CFLAGS= ${DEBUG} ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
-AFLAGS= -x assembler-with-cpp -D_LOCORE ${CMACHFLAGS}
+CFLAGS= ${DEBUG} ${CWARNFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
+AFLAGS= -D_LOCORE -x assembler-with-cpp ${CMACHFLAGS}
LINKFLAGS= -T ldscript
LINKFLAGS+= --warn-common
STRIPFLAGS= -g -X -x
@@ -51,23 +51,14 @@ DB_STRUCTINFO= db_structinfo.h
DB_STRUCTINFO=
.endif
-HOSTCC= ${CC}
+HOSTCC?= ${CC}
HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
HOSTED_CFLAGS= ${CFLAGS}
-
-# compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
-# where TYPE is NORMAL, or PROFILE; SUFFIX is the file suffix,
-# capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
-# is marked as config-dependent.
+HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
NORMAL_C_NOP= ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
NORMAL_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
-NORMAL_C_C= ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
-
NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
-NORMAL_S_C= ${CC} ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $<
-
-HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
%OBJS
@@ -82,7 +73,7 @@ HOSTED_C= ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
# ${SYSTEM_LD_TAIL}
SYSTEM_OBJ= ${_mach}_start.o locore.o param.o ioconf.o ${OBJS}
SYSTEM_DEP= Makefile ${SYSTEM_OBJ}
-SYSTEM_LD_HEAD= rm -f $@
+SYSTEM_LD_HEAD= @rm -f $@
SYSTEM_LD_HEAD+=; \
cat ${_archdir}/conf/ldscript.head ${_archdir}/conf/ldscript.tail | \
sed -e 's/@KERNEL_BASE_PHYS@/${KERNEL_BASE_PHYS}/' \
@@ -117,7 +108,7 @@ param.c: $S/conf/param.c
cp $S/conf/param.c .
param.o: param.c Makefile
- ${NORMAL_C_C}
+ ${NORMAL_C}
mcount.o: $S/lib/libkern/mcount.c Makefile
${NORMAL_C_NOP}
@@ -131,11 +122,11 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
clean::
- rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
+ rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
[Ee]rrs linterrs makelinks assym.h ${DB_STRUCTINFO}
lint:
- @lint -hbxncez -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
+ @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
${CFILES} ioconf.c param.c | \
grep -v 'static function .* unused'