From e6a1c3c042c6490ae6457f6fd497c01704381d4a Mon Sep 17 00:00:00 2001 From: miod Date: Sat, 11 Mar 2023 20:49:33 +0000 Subject: [PATCH] Allow strip and objcopy to be overrridden, for easier cross-buildability. NFC --- sys/arch/alpha/stand/Makefile.inc | 5 ++++- sys/arch/alpha/stand/boot/Makefile | 8 ++++---- sys/arch/alpha/stand/bootxx/Makefile | 6 +++--- sys/arch/alpha/stand/netboot/Makefile | 8 ++++---- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/sys/arch/alpha/stand/Makefile.inc b/sys/arch/alpha/stand/Makefile.inc index 4ffc3d5b489..9a068939d77 100644 --- a/sys/arch/alpha/stand/Makefile.inc +++ b/sys/arch/alpha/stand/Makefile.inc @@ -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 diff --git a/sys/arch/alpha/stand/boot/Makefile b/sys/arch/alpha/stand/boot/Makefile index 148193630bb..f31702acf61 100644 --- a/sys/arch/alpha/stand/boot/Makefile +++ b/sys/arch/alpha/stand/boot/Makefile @@ -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 diff --git a/sys/arch/alpha/stand/bootxx/Makefile b/sys/arch/alpha/stand/bootxx/Makefile index bc1ec53d3f7..3a10ce723d1 100644 --- a/sys/arch/alpha/stand/bootxx/Makefile +++ b/sys/arch/alpha/stand/bootxx/Makefile @@ -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 diff --git a/sys/arch/alpha/stand/netboot/Makefile b/sys/arch/alpha/stand/netboot/Makefile index 67ed1f3c147..751ee044478 100644 --- a/sys/arch/alpha/stand/netboot/Makefile +++ b/sys/arch/alpha/stand/netboot/Makefile @@ -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: -- 2.20.1