summaryrefslogtreecommitdiff
path: root/sys/arch/hppa/conf/Makefile.hppa
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2017-06-22 16:01:49 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2017-06-22 16:01:49 +0000
commitfa18f6ca6b031524008b883b49f74acaa747c181 (patch)
tree501162ac6c02f29a9d3b25c2a06945726961b4d0 /sys/arch/hppa/conf/Makefile.hppa
parent2877e53dabcef0c0e1b0d6bd80f594148bd8692c (diff)
Generate a gap.link script, and use that to generate gap.o. On multi-ABI
architectures we must also link against a gapdummy.o to repair the ABI of the resulting .o file. Woe is me. Also repair install: target to update the linkkit & hash when a kernel is installed. ok rpe tb mlarkin and tested by others also
Diffstat (limited to 'sys/arch/hppa/conf/Makefile.hppa')
-rw-r--r--sys/arch/hppa/conf/Makefile.hppa36
1 files changed, 13 insertions, 23 deletions
diff --git a/sys/arch/hppa/conf/Makefile.hppa b/sys/arch/hppa/conf/Makefile.hppa
index fa768b4b18b..3e0a0d8788f 100644
--- a/sys/arch/hppa/conf/Makefile.hppa
+++ b/sys/arch/hppa/conf/Makefile.hppa
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.hppa,v 1.95 2017/06/13 16:40:01 deraadt Exp $
+# $OpenBSD: Makefile.hppa,v 1.96 2017/06/22 16:01:48 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -101,12 +101,6 @@ LINKFLAGS+= -S
%LOAD
-newbsd:
- ${SYSTEM_LD_HEAD}
- ${SYSTEM_LD} swapgeneric.o
- ${SYSTEM_LD_TAIL}
- mv -f newbsd bsd
-
# cc's -MD puts the source and output paths in the dependency file;
# since those are temp files here we need to fix it up. It also
# puts the file in /tmp, so we use -MF to put it in the current
@@ -135,19 +129,19 @@ ioconf.o: ioconf.c
ld.script: ${_machdir}/conf/ld.script
cp ${_machdir}/conf/ld.script $@
+makegap.sh: $S/conf/makegap.sh
+ cp $S/conf/makegap.sh $@
+
+gap.o: Makefile makegap.sh
+ sh makegap.sh 0x00000000 # BREAK 0,0 -> trap
+
vers.o: ${SYSTEM_DEP:Ngap.o} ${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 0xcc > 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} \
- gap.S lorder param.c
+ gap.link ld.script lorder makegap.sh param.c
cleandir: clean
rm -f Makefile *.h ioconf.c options machine ${_mach} vers.c
@@ -163,16 +157,12 @@ locore0.o: ${_machdir}/${_mach}/locore0.S assym.h
locore.o: ${_machdir}/${_mach}/locore.S assym.h
fpemu.o spcopy.o: assym.h
-# The install target can be redefined by putting a
-# install-kernel-${MACHINE_NAME} target into /etc/mk.conf
-MACHINE_NAME!= uname -n
-install: install-kernel-${MACHINE_NAME}
-.if !target(install-kernel-${MACHINE_NAME}})
-install-kernel-${MACHINE_NAME}:
+newinstall:
cmp -s bsd /bsd || ln -f /bsd /obsd
- umask 077; cp bsd /nbsd
- mv /nbsd /bsd
-.endif
+ umask 077 && cp bsd /nbsd && mv /nbsd /bsd && \
+ sha256 -h /var/db/kernel.SHA256 /bsd
+
+install: update-link newinstall
# pull in the dependency information
.if !empty(DB_STRUCTINFO) && !exists(${DB_STRUCTINFO})