diff options
author | 2012-09-25 09:01:03 +0000 | |
---|---|---|
committer | 2012-09-25 09:01:03 +0000 | |
commit | 879e6e33411d99aa783a891c0ce982a8d7f51fba (patch) | |
tree | 351be040e6652bae2c152821aad610f6255d862a | |
parent | Add notification for input from a pane, from George Nachman. (diff) | |
download | wireguard-openbsd-879e6e33411d99aa783a891c0ce982a8d7f51fba.tar.xz wireguard-openbsd-879e6e33411d99aa783a891c0ce982a8d7f51fba.zip |
Reduce the diff between amd64/stand and i386/stand, requested by deraadt@.
These create essentially the same bootblocks, so the build system should not be
diverging too much, or at least easily diffable.
There is still a lot of work to be done here, but this is the low-hanging fruit.
ok jsing@
-rw-r--r-- | sys/arch/amd64/stand/biosboot/Makefile | 6 | ||||
-rw-r--r-- | sys/arch/amd64/stand/boot/Makefile | 8 | ||||
-rw-r--r-- | sys/arch/amd64/stand/cdboot/Makefile | 12 | ||||
-rw-r--r-- | sys/arch/amd64/stand/cdbr/Makefile | 9 | ||||
-rw-r--r-- | sys/arch/amd64/stand/installboot/Makefile | 3 | ||||
-rw-r--r-- | sys/arch/amd64/stand/mbr/Makefile | 9 | ||||
-rw-r--r-- | sys/arch/amd64/stand/pxeboot/Makefile | 11 | ||||
-rw-r--r-- | sys/arch/i386/stand/boot/Makefile | 4 | ||||
-rw-r--r-- | sys/arch/i386/stand/cdboot/Makefile | 15 | ||||
-rw-r--r-- | sys/arch/i386/stand/pxeboot/Makefile | 16 |
10 files changed, 47 insertions, 46 deletions
diff --git a/sys/arch/amd64/stand/biosboot/Makefile b/sys/arch/amd64/stand/biosboot/Makefile index 9c344feccef..6c88c12e65d 100644 --- a/sys/arch/amd64/stand/biosboot/Makefile +++ b/sys/arch/amd64/stand/biosboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.5 2012/08/29 17:45:00 pascal Exp $ +# $OpenBSD: Makefile,v 1.6 2012/09/25 09:01:03 pascal Exp $ MAN= biosboot.8 @@ -6,8 +6,8 @@ MAN= biosboot.8 PROG= biosboot SRCS= biosboot.S LD=ld -LDFLAGS=-melf_i386 -nostdlib -Ttext 0 -N -x -Bstatic -nopie -LDFLAGS+=-L/usr/libdata +LDFLAGS=-nostdlib -Ttext 0 -N -x -Bstatic -nopie +LDFLAGS+=-melf_i386 -L/usr/libdata INSTALL_STRIP= SADIR= ${.CURDIR}/.. diff --git a/sys/arch/amd64/stand/boot/Makefile b/sys/arch/amd64/stand/boot/Makefile index 8005b060068..d6aec91d035 100644 --- a/sys/arch/amd64/stand/boot/Makefile +++ b/sys/arch/amd64/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.10 2012/08/29 17:45:00 pascal Exp $ +# $OpenBSD: Makefile,v 1.11 2012/09/25 09:01:03 pascal Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -13,8 +13,8 @@ PROG= boot SRCS= srt0.S conf.c LD?= ld SIZE?= size -LDFLAGS+=-melf_i386 -nostdlib -Bstatic -Ttext $(LINKADDR) -N -x -noinhibit-exec -LDFLAGS+=-nopie -L/usr/libdata +LDFLAGS+=-nostdlib -Bstatic -Ttext $(LINKADDR) -N -x -noinhibit-exec -nopie +LDFLAGS+=-melf_i386 -L/usr/libdata .PATH: ${SADIR}/libsa # i386 stuff (so, it will possibly load in the same 64k) @@ -58,5 +58,5 @@ CPPFLAGS+=-DSLOW -DSMALL -DNOBYFOUR -DNO_GZIP -DDYNAMIC_CRC_TABLE CPPFLAGS+=-DHEAP_LIMIT=${HEAP_LIMIT} -I${S}/stand/boot #-DCOMPAT_UFS CFLAGS+=-m32 $(SACFLAGS) -D__INTERNAL_LIBSA_CREAD -fno-pie AFLAGS+=-m32 # -Wa,-R -AFLAGS+=-fno-pie # AFLAGS+=-Wa,-a +AFLAGS+=-fno-pie diff --git a/sys/arch/amd64/stand/cdboot/Makefile b/sys/arch/amd64/stand/cdboot/Makefile index 44cdd798b15..3b9857cd3e2 100644 --- a/sys/arch/amd64/stand/cdboot/Makefile +++ b/sys/arch/amd64/stand/cdboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.13 2012/08/29 17:45:00 pascal Exp $ +# $OpenBSD: Makefile,v 1.14 2012/09/25 09:01:03 pascal Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -12,8 +12,8 @@ PROG= cdboot SRCS= srt0.S boot.c conf.c LD?= ld SIZE?= size -LDFLAGS+=-melf_i386 -nostdlib -Bstatic -Ttext $(LINKADDR) -N -x -noinhibit-exec -LDFLAGS+=-nopie -L/usr/libdata +LDFLAGS+=-nostdlib -Bstatic -Ttext $(LINKADDR) -N -x -noinhibit-exec -nopie +LDFLAGS+=-melf_i386 -L/usr/libdata INSTALL_STRIP= .PATH: ${SADIR}/libsa @@ -59,9 +59,11 @@ NOPROG= .include <bsd.prog.mk> CPPFLAGS+=-DBOOTMAGIC=$(BOOTMAGIC) ${DEBUGFLAGS} +CPPFLAGS+=-DLINKADDR=${LINKADDR} CPPFLAGS+=-DSLOW -DSMALL -DNOBYFOUR -DNO_GZIP -DDYNAMIC_CRC_TABLE -CPPFLAGS+=-DLINKADDR=${LINKADDR} -I${S}/stand/boot -CFLAGS+=-m32 ${SACFLAGS} -D__INTERNAL_LIBSA_CREAD +CPPFLAGS+=-I${S}/stand/boot +CFLAGS+=-m32 +CFLAGS+=${SACFLAGS} -D__INTERNAL_LIBSA_CREAD CFLAGS+=-DOSREV=\"${OSREV}\" -DMACHINE=\"${MACHINE}\" CFLAGS+=-DKERNEL=\"/${OSREV}/${MACHINE}/bsd.rd\" CFLAGS+=-fno-pie diff --git a/sys/arch/amd64/stand/cdbr/Makefile b/sys/arch/amd64/stand/cdbr/Makefile index 9770d3fb362..4027d67bf58 100644 --- a/sys/arch/amd64/stand/cdbr/Makefile +++ b/sys/arch/amd64/stand/cdbr/Makefile @@ -1,16 +1,17 @@ -# $OpenBSD: Makefile,v 1.5 2012/08/29 17:45:00 pascal Exp $ +# $OpenBSD: Makefile,v 1.6 2012/09/25 09:01:03 pascal Exp $ # PROG= cdbr SRCS= cdbr.S -AFLAGS+=-m32 -I${.CURDIR} -I${.CURDIR}/../../.. #-Wa,-a +AFLAGS+=-m32 +AFLAGS+=-I${.CURDIR} -I${.CURDIR}/../../.. #-Wa,-a AFLAGS+=-DOSREV=\"${OSREV}\" AFLAGS+=-DMACH=\"${MACHINE}\" -DMACH_U=\"${MACHINE:U}\" AFLAGS+=-fno-pie LD=ld ORG= 0x0000 -LDFLAGS=-melf_i386 -nostdlib -Ttext ${ORG} -x -N -s -Bstatic -e start -LDFLAGS+=-nopie -L/usr/libdata +LDFLAGS=-nostdlib -Ttext ${ORG} -x -N -s -Bstatic -e start -nopie +LDFLAGS+=-melf_i386 -L/usr/libdata NOMAN= #MAN+= cdbr.8 diff --git a/sys/arch/amd64/stand/installboot/Makefile b/sys/arch/amd64/stand/installboot/Makefile index 400dd87b217..8933fdf6730 100644 --- a/sys/arch/amd64/stand/installboot/Makefile +++ b/sys/arch/amd64/stand/installboot/Makefile @@ -1,10 +1,9 @@ -# $OpenBSD: Makefile,v 1.1 2004/02/03 12:09:47 mickey Exp $ +# $OpenBSD: Makefile,v 1.2 2012/09/25 09:01:03 pascal Exp $ MAN= installboot.8 .if ${MACHINE} == "amd64" PROG= installboot -CPPFLAGFS+=-I${.CURDIR} LDADD= -lutil DPADD= ${LIBUTIL} diff --git a/sys/arch/amd64/stand/mbr/Makefile b/sys/arch/amd64/stand/mbr/Makefile index f2a8b480fa9..5a16064c8ff 100644 --- a/sys/arch/amd64/stand/mbr/Makefile +++ b/sys/arch/amd64/stand/mbr/Makefile @@ -1,13 +1,14 @@ -# $OpenBSD: Makefile,v 1.5 2012/08/29 17:45:00 pascal Exp $ +# $OpenBSD: Makefile,v 1.6 2012/09/25 09:01:03 pascal Exp $ # PROG= mbr SRCS= mbr.S -AFLAGS+=-m32 -I${.CURDIR} -I${.CURDIR}/../../.. #-Wa,-a +AFLAGS+=-m32 +AFLAGS+=-I${.CURDIR} -I${.CURDIR}/../../.. #-Wa,-a AFLAGS+=-fno-pie LD=ld -LDFLAGS=-melf_i386 -nostdlib -Ttext 0 -x -N -s -Bstatic -e start -LDFLAGS+=-nopie -L/usr/libdata +LDFLAGS=-nostdlib -Ttext 0 -x -N -s -Bstatic -e start -nopie +LDFLAGS+=-melf_i386 -L/usr/libdata NOMAN= #MAN+= mbr.8 diff --git a/sys/arch/amd64/stand/pxeboot/Makefile b/sys/arch/amd64/stand/pxeboot/Makefile index f550a311c27..b9d7ac538b0 100644 --- a/sys/arch/amd64/stand/pxeboot/Makefile +++ b/sys/arch/amd64/stand/pxeboot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.10 2012/08/29 17:45:00 pascal Exp $ +# $OpenBSD: Makefile,v 1.11 2012/09/25 09:01:03 pascal Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -12,8 +12,8 @@ PROG= pxeboot SRCS= srt0.S conf.c devopen.c net.c open.c LD?= ld SIZE?= size -LDFLAGS+=-melf_i386 -nostdlib -Bstatic -Ttext $(LINKADDR) -N -x -noinhibit-exec -LDFLAGS+=-nopie -L/usr/libdata +LDFLAGS+=-nostdlib -Bstatic -Ttext $(LINKADDR) -N -x -noinhibit-exec -nopie +LDFLAGS+=-melf_i386 -L/usr/libdata INSTALL_STRIP= .PATH: ${SADIR}/libsa @@ -62,7 +62,8 @@ NOPROG= CPPFLAGS+=-DBOOTMAGIC=$(BOOTMAGIC) ${DEBUGFLAGS} -DLINKADDR=${LINKADDR} CPPFLAGS+=-DSLOW -DSMALL -DNOBYFOUR -DNO_GZIP -DDYNAMIC_CRC_TABLE CPPFLAGS+=-DHEAP_LIMIT=${HEAP_LIMIT} -I${S}/stand/boot #-DCOMPAT_UFS -CFLAGS+=-m32 $(SACFLAGS) -D__INTERNAL_LIBSA_CREAD -fno-pie +CFLAGS+=-m32 +CFLAGS+=$(SACFLAGS) -D__INTERNAL_LIBSA_CREAD -fno-pie +# AFLAGS+=-Wa,-a AFLAGS+=-m32 # -Wa,-R AFLAGS+=-fno-pie -# AFLAGS+=-Wa,-a diff --git a/sys/arch/i386/stand/boot/Makefile b/sys/arch/i386/stand/boot/Makefile index 2ae36be8f06..ed97ba30cb6 100644 --- a/sys/arch/i386/stand/boot/Makefile +++ b/sys/arch/i386/stand/boot/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.38 2012/08/29 22:23:07 pascal Exp $ +# $OpenBSD: Makefile,v 1.39 2012/09/25 09:01:03 pascal Exp $ .include "${.CURDIR}/../Makefile.inc" @@ -45,7 +45,7 @@ SRCS+= ufs.c SRCS+= strlcpy.c .PATH: ${S}/lib/libkern/arch/i386 -SRCS+= moddi3.c divdi3.c qdivrem.c +SRCS+= divdi3.c moddi3.c qdivrem.c .PATH: ${S}/lib/libz SRCS+= adler32.c crc32.c inflate.c inftrees.c diff --git a/sys/arch/i386/stand/cdboot/Makefile b/sys/arch/i386/stand/cdboot/Makefile index 4bbabc7b17c..e3e72201560 100644 --- a/sys/arch/i386/stand/cdboot/Makefile +++ b/sys/arch/i386/stand/cdboot/Makefile @@ -1,24 +1,23 @@ -# $OpenBSD: Makefile,v 1.10 2012/08/29 22:23:08 pascal Exp $ +# $OpenBSD: Makefile,v 1.11 2012/09/25 09:01:03 pascal Exp $ .include "${.CURDIR}/../Makefile.inc" MAN= cdboot.8 .if ${MACHINE} == "i386" +S =${.CURDIR}/../../../.. +SADIR= ${.CURDIR}/.. + PROG= cdboot +SRCS= srt0.S LD?= ld SIZE?= size -LDFLAGS+=-nostdlib -Bstatic +LDFLAGS+=-nostdlib -Bstatic -Ttext $(LINKADDR) -N -x -noinhibit-exec -nopie INSTALL_STRIP= -LDFLAGS+=-Ttext $(LINKADDR) -N -x -noinhibit-exec -nopie CLEANFILES+= crt0.o ${PROG}.whole -SRCS= srt0.S SRCS+= boot.c cmd.c vars.c bootarg.c conf.c -S =${.CURDIR}/../../../.. -SADIR= ${.CURDIR}/.. - LDADD= ${LIBSA} ${LIBZ} DPADD= ${LIBSA} ${LIBZ} @@ -31,7 +30,7 @@ ${PROG}: $(OBJS) $(DPADD) $(LD) $(LDFLAGS) -o ${PROG} $(OBJS) $(LDADD) @$(SIZE) ${PROG} cp ${PROG} ${PROG}.whole - if [ -x ${.OBJDIR}/${PROG} ]; then \ + @if [ -x ${.OBJDIR}/${PROG} ]; then \ objcopy -O binary ${PROG} ${.OBJDIR}/.tmp;\ mv -f ${.OBJDIR}/.tmp ${.OBJDIR}/${PROG}; \ ls -l ${.OBJDIR}/${PROG}; \ diff --git a/sys/arch/i386/stand/pxeboot/Makefile b/sys/arch/i386/stand/pxeboot/Makefile index 3c6f42b368e..2455d65205d 100644 --- a/sys/arch/i386/stand/pxeboot/Makefile +++ b/sys/arch/i386/stand/pxeboot/Makefile @@ -1,24 +1,23 @@ -# $OpenBSD: Makefile,v 1.7 2012/08/29 22:23:08 pascal Exp $ +# $OpenBSD: Makefile,v 1.8 2012/09/25 09:01:03 pascal Exp $ .include "${.CURDIR}/../Makefile.inc" MAN= pxeboot.8 .if ${MACHINE} == "i386" +S =${.CURDIR}/../../../.. +SADIR= ${.CURDIR}/.. + PROG= pxeboot LD?= ld SIZE?= size -LDFLAGS+=-nostdlib -Bstatic -nopie +LDFLAGS+=-nostdlib -Bstatic -Ttext $(LINKADDR) -N -x -noinhibit-exec -nopie INSTALL_STRIP= -LDFLAGS+=-Ttext $(LINKADDR) -N -x -noinhibit-exec CLEANFILES+= crt0.o ${PROG}.whole SRCS= srt0.S SRCS+= boot.c cmd.c vars.c bootarg.c conf.c devopen.c net.c open.c -S =${.CURDIR}/../../../.. -SADIR= ${.CURDIR}/.. - LDADD= ${LIBSA} ${LIBZ} DPADD= ${LIBSA} ${LIBZ} @@ -43,9 +42,8 @@ NOPROG= .include <bsd.prog.mk> -CPPFLAGS+=-DBOOTMAGIC=$(BOOTMAGIC) ${DEBUGFLAGS} -CPPFLAGS+=-DLINKADDR=${LINKADDR} -CFLAGS+=${SACFLAGS} -D__INTERNAL_LIBSA_CREAD -fno-pie +CPPFLAGS+=-DBOOTMAGIC=$(BOOTMAGIC) ${DEBUGFLAGS} -DLINKADDR=${LINKADDR} +CFLAGS+=$(SACFLAGS) -D__INTERNAL_LIBSA_CREAD -fno-pie #AFLAGS+=-Wa,-R # AFLAGS+=-Wa,-a AFLAGS+=-fno-pie |