Allow strip and objcopy to be overrridden, for easier cross-buildability. NFC
authormiod <miod@openbsd.org>
Sat, 11 Mar 2023 20:49:33 +0000 (20:49 +0000)
committermiod <miod@openbsd.org>
Sat, 11 Mar 2023 20:49:33 +0000 (20:49 +0000)
sys/arch/alpha/stand/Makefile.inc
sys/arch/alpha/stand/boot/Makefile
sys/arch/alpha/stand/bootxx/Makefile
sys/arch/alpha/stand/netboot/Makefile

index 4ffc3d5..9a06893 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile.inc,v 1.15 2014/04/13 08:35:27 brad Exp $
+#      $OpenBSD: Makefile.inc,v 1.16 2023/03/11 20:49:33 miod Exp $
 #      $NetBSD: Makefile.inc,v 1.8 1997/04/06 08:39:38 cgd Exp $
 
 BINDIR=                        /usr/mdec
@@ -24,3 +24,6 @@ EXTRACFLAGS+=         -DHEAP_LIMIT="0x${HEAP_LIMIT}"
 CFLAGS+=               -fno-stack-protector -fno-builtin-printf \
                        -fno-builtin-vprintf -fno-builtin-putchar \
                        -fno-builtin-puts -fno-builtin-exit
+
+OBJCOPY?=              objcopy
+STRIP?=                        strip
index 1481936..f31702a 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile,v 1.25 2020/03/11 09:59:31 otto Exp $
+#      $OpenBSD: Makefile,v 1.26 2023/03/11 20:49:33 miod Exp $
 #      $NetBSD: Makefile,v 1.17 1997/04/17 07:27:46 thorpej Exp $
 
 S=     ${.CURDIR}/../../../..
@@ -27,16 +27,16 @@ SRCS+=      loadfile.c arc4.c ufs2.c
 DEFNS= -DCOMPAT_UFS
 
 AFLAGS += -DASSEMBLER ${DEFNS} -fno-pie
-CPPFLAGS += -I${.CURDIR}/../../../../lib/libsa -I${.CURDIR}/../.. -I${S} ${DEFNS}
+CPPFLAGS += -I${.CURDIR}/../.. -I${S} ${DEFNS}
 CFLAGS = -Oz -Werror -mno-fp-regs -fno-pie \
        -msmall-data -msmall-text
 
 ${PROG}.nosym: ${PROG}.sym
        cp ${PROG}.sym ${PROG}.nosym
-       strip ${PROG}.nosym
+       ${STRIP} ${PROG}.nosym
 
 ${PROG}: ${PROG}.nosym
-       objcopy --output-target=binary ${PROG}.nosym ${PROG}
+       ${OBJCOPY} --output-target=binary ${PROG}.nosym ${PROG}
 
 .include <bsd.prog.mk>
 
index bc1ec53..3a10ce7 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile,v 1.18 2023/02/07 12:06:53 miod Exp $
+#      $OpenBSD: Makefile,v 1.19 2023/03/11 20:49:33 miod Exp $
 #      $NetBSD: Makefile,v 1.12 1997/04/17 07:27:49 thorpej Exp $
 
 S=     ${.CURDIR}/../../../..
@@ -28,10 +28,10 @@ CFLAGS = -Oz -Werror -mno-fp-regs -fno-pie \
 
 ${PROG}.nosym: ${PROG}.sym
        cp ${PROG}.sym ${PROG}.nosym
-       strip ${PROG}.nosym
+       ${STRIP} ${PROG}.nosym
 
 ${PROG}: ${PROG}.nosym
-       objcopy --output-target=binary ${PROG}.nosym ${PROG}.trunc
+       ${OBJCOPY} --output-target=binary ${PROG}.nosym ${PROG}.trunc
        dd if=${PROG}.trunc of=${PROG} obs=`expr 15 \* 512` conv=osync
 
 .include <bsd.prog.mk>
index 67ed1f3..751ee04 100644 (file)
@@ -1,4 +1,4 @@
-#      $OpenBSD: Makefile,v 1.18 2021/07/02 03:10:19 deraadt Exp $
+#      $OpenBSD: Makefile,v 1.19 2023/03/11 20:49:33 miod Exp $
 #      $NetBSD: Makefile,v 1.11 1997/04/17 07:27:50 thorpej Exp $
 
 S=     ${.CURDIR}/../../../..
@@ -18,7 +18,7 @@ BINMODE= 444
 
 BOOT_RELOC = ${PRIMARY_LOAD_ADDRESS}
 
-CLEANFILES+= vers.c vers.o ${PROG}.sym ${PROG}.nosym
+CLEANFILES+= vers.c vers.o ${PROG}.sym ${PROG}.nosym ${PROG}.mop
 
 .PATH:  ${S}/lib/libkern/arch/alpha ${S}/lib/libkern
 SRCS+=  bzero.c __divqu.S strlen.c __remqu.S __remq.S __remlu.S
@@ -34,10 +34,10 @@ CFLAGS = -Werror -mno-fp-regs -fno-pie
 
 ${PROG}.nosym: ${PROG}.sym
        cp ${PROG}.sym ${PROG}.nosym
-       strip ${PROG}.nosym
+       ${STRIP} ${PROG}.nosym
 
 ${PROG} ${PROG}.mop: ${PROG}.nosym
-       objcopy --output-target=binary ${PROG}.nosym ${PROG}
+       ${OBJCOPY} --output-target=binary ${PROG}.nosym ${PROG}
        mopa.out ${PROG}.nosym ${PROG}.mop
 
 realinstall: