summaryrefslogtreecommitdiff
path: root/sys/arch/alpha/conf/Makefile.alpha
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch/alpha/conf/Makefile.alpha')
-rw-r--r--sys/arch/alpha/conf/Makefile.alpha25
1 files changed, 19 insertions, 6 deletions
diff --git a/sys/arch/alpha/conf/Makefile.alpha b/sys/arch/alpha/conf/Makefile.alpha
index 468ee699105..fafd19cbf0e 100644
--- a/sys/arch/alpha/conf/Makefile.alpha
+++ b/sys/arch/alpha/conf/Makefile.alpha
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.alpha,v 1.97 2017/06/05 12:43:57 deraadt Exp $
+# $OpenBSD: Makefile.alpha,v 1.98 2017/06/05 17:49:06 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -31,9 +31,13 @@ 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 ${NOPIE_FLAGS}
+SORTR= sort -R
.if ${IDENT:M-DNO_PROPOLICE}
CMACHFLAGS+= -fno-stack-protector
.endif
+.if ${IDENT:M-DSMALL_KERNEL}
+SORTR= cat
+.endif
DEBUG?= -g
COPTS?= -O2
@@ -67,13 +71,14 @@ NORMAL_S= ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
# ${SYSTEM_LD_HEAD}
# ${SYSTEM_LD} swapxxx.o
# ${SYSTEM_LD_TAIL}
-SYSTEM_HEAD= locore.o param.o ioconf.o
-SYSTEM_OBJ= ${SYSTEM_HEAD} ${OBJS}
+SYSTEM_HEAD= locore0.o gap.o
+SYSTEM_OBJ= ${SYSTEM_HEAD} ${OBJS} param.o ioconf.o
SYSTEM_DEP= Makefile ${SYSTEM_OBJ} ld.script
SYSTEM_LD_HEAD= @rm -f $@
SYSTEM_LD= @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_HEAD} vers.o $${OBJS}'; \
umask 007; \
- ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} vers.o ${OBJS}
+ echo ${OBJS} param.o ioconf.o vers.o | tr " " "\n" | ${SORTR} > lorder; \
+ ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_HEAD} `cat lorder`
SYSTEM_LD_TAIL= @${SIZE} $@
.if ${DEBUG} == "-g"
@@ -120,8 +125,15 @@ vers.o: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
sh $S/conf/newvers.sh
${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
+gap.S: ${SYSTEM_SWAP_DEP} Makefile
+ umask 007; sh $S/conf/makegap.sh 0x00 > gap.S
+
+gap.o: gap.S
+ umask 007; ${CC} ${AFLAGS} ${CPPFLAGS} ${PROF} -c gap.S
+
clean:
- rm -f *bsd *bsd.gdb *.[dio] [a-z]*.s assym.* ${DB_STRUCTINFO} param.c
+ rm -f *bsd *bsd.gdb *.[dio] [a-z]*.s assym.* ${DB_STRUCTINFO} \
+ gap.S lorder param.c
cleandir: clean
rm -f Makefile *.h ioconf.c options machine ${_mach} vers.c
@@ -133,6 +145,7 @@ db_structinfo.h: $S/ddb/db_structinfo.c $S/ddb/parse_structinfo.pl
objdump -g db_structinfo.o | perl $S/ddb/parse_structinfo.pl > $@
rm -f db_structinfo.o
+locore0.o: ${_machdir}/${_mach}/locore0.S assym.h
locore.o: ${_machdir}/${_mach}/locore.s assym.h
# The install target can be redefined by putting a
@@ -142,7 +155,7 @@ install: install-kernel-${MACHINE_NAME}
.if !target(install-kernel-${MACHINE_NAME}})
install-kernel-${MACHINE_NAME}:
cmp -s bsd /bsd || ln -f /bsd /obsd
- cp bsd /nbsd
+ cp -p bsd /nbsd
mv /nbsd /bsd
.endif