summaryrefslogtreecommitdiff
path: root/sys/arch/amd64
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-05-24 14:59:17 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-05-24 14:59:17 +0000
commit692ae6fe82dd7e240b408d4ac6bb900a9e450ac0 (patch)
treec99785bbaccc3c8595e5e85bafd04c13fccb569e /sys/arch/amd64
parent49384741ccb14f3d28d08ccd3395dfcabeee2828 (diff)
Reduce differences between the Makefile.* files for all architectures.
ok various people, tested by fewer people, tested by me on 15.
Diffstat (limited to 'sys/arch/amd64')
-rw-r--r--sys/arch/amd64/conf/Makefile.amd6443
1 files changed, 18 insertions, 25 deletions
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'