From: semarie Date: Sat, 13 Feb 2021 18:46:52 +0000 (+0000) Subject: distrib: merge "cp a b; strip b" to "objcopy -S a b" X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4c3b9f70a724a50a7e2e65dd7428ab52291b7dee;p=openbsd distrib: merge "cp a b; strip b" to "objcopy -S a b" ok deraadt@ danj@ --- diff --git a/distrib/amd64/iso/Makefile b/distrib/amd64/iso/Makefile index a7d270dac06..7fbb458e826 100644 --- a/distrib/amd64/iso/Makefile +++ b/distrib/amd64/iso/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.41 2021/02/13 18:44:17 semarie Exp $ +# $OpenBSD: Makefile,v 1.42 2021/02/13 18:46:52 semarie Exp $ FS= install${OSrev}.img FSSIZE= 1359872 @@ -41,8 +41,7 @@ ${FS}: ${BASE} ${XBASE} bsd.rd .endif newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a mount /dev/`cat vnd`a ${MOUNT_POINT} - cp ${DESTDIR}/usr/mdec/boot ${MOUNT_POINT}/boot - strip -R .comment -R .SUNW_ctf ${MOUNT_POINT}/boot + objcopy -S -R .comment -R .SUNW_ctf ${DESTDIR}/usr/mdec/boot ${MOUNT_POINT}/boot installboot -v -r ${MOUNT_POINT} `cat vnd` \ ${DESTDIR}/usr/mdec/biosboot ${MOUNT_POINT}/boot mkdir -p ${MOUNT_POINT}/${OSREV}/${MACHINE} diff --git a/distrib/amd64/ramdiskA/Makefile b/distrib/amd64/ramdiskA/Makefile index 53b594f364e..e54809a7eb4 100644 --- a/distrib/amd64/ramdiskA/Makefile +++ b/distrib/amd64/ramdiskA/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.11 2021/02/13 18:44:17 semarie Exp $ +# $OpenBSD: Makefile,v 1.12 2021/02/13 18:46:52 semarie Exp $ FS= floppy${OSrev}.img FSSIZE= 2880 @@ -20,8 +20,7 @@ ${FS}: bsd.gz disklabel -w `cat vnd` ${FSDISKTYPE} newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a mount /dev/`cat vnd`a ${MOUNT_POINT} - cp ${DESTDIR}/usr/mdec/fdboot ${.OBJDIR}/boot - strip -R .comment -R .SUNW_ctf ${.OBJDIR}/boot + objcopy -S -R .comment -R .SUNW_ctf ${DESTDIR}/usr/mdec/fdboot ${.OBJDIR}/boot installboot -v -r ${MOUNT_POINT} `cat vnd` \ ${DESTDIR}/usr/mdec/biosboot ${.OBJDIR}/boot install -c -m 555 -o root -g wheel bsd.gz ${MOUNT_POINT}/bsd @@ -34,8 +33,7 @@ MRDISKTYPE= rdroot MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096 bsd.gz: bsd.rd - cp bsd.rd bsd.strip - strip -R .comment -R .SUNW_ctf bsd.strip + objcopy -S -R .comment -R .SUNW_ctf bsd.rd bsd.strip gzip -9cn bsd.strip > bsd.gz bsd.rd: mr.fs bsd diff --git a/distrib/amd64/ramdisk_cd/Makefile b/distrib/amd64/ramdisk_cd/Makefile index acd6a510205..f05d2bf730e 100644 --- a/distrib/amd64/ramdisk_cd/Makefile +++ b/distrib/amd64/ramdisk_cd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.25 2021/02/13 18:44:18 semarie Exp $ +# $OpenBSD: Makefile,v 1.26 2021/02/13 18:46:52 semarie Exp $ FS= miniroot${OSrev}.img FSSIZE= 9920 @@ -27,8 +27,7 @@ ${FS}: bsd.gz umount ${MOUNT_POINT} newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a mount /dev/`cat vnd`a ${MOUNT_POINT} - cp ${DESTDIR}/usr/mdec/boot ${.OBJDIR}/boot - strip -R .comment -R .SUNW_ctf ${.OBJDIR}/boot + objcopy -S -R .comment -R .SUNW_ctf ${DESTDIR}/usr/mdec/boot ${.OBJDIR}/boot installboot -v -r ${MOUNT_POINT} `cat vnd` \ ${DESTDIR}/usr/mdec/biosboot ${.OBJDIR}/boot install -c -m 555 -o root -g wheel bsd.gz ${MOUNT_POINT}/bsd @@ -57,8 +56,7 @@ MRDISKTYPE= rdrootb MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096 bsd.gz: bsd.rd - cp bsd.rd bsd.strip - strip -R .comment -R .SUNW_ctf bsd.strip + objcopy -S -R .comment -R .SUNW_ctf bsd.rd bsd.strip gzip -9cn bsd.strip > bsd.gz bsd.rd: mr.fs bsd diff --git a/distrib/i386/iso/Makefile b/distrib/i386/iso/Makefile index 1b142328723..b02d2e6509c 100644 --- a/distrib/i386/iso/Makefile +++ b/distrib/i386/iso/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.30 2021/01/05 15:10:42 deraadt Exp $ +# $OpenBSD: Makefile,v 1.31 2021/02/13 18:46:52 semarie Exp $ FS= install${OSrev}.img FSSIZE= 921600 @@ -27,8 +27,7 @@ ${FS}: ${BASE} ${XBASE} bsd.rd disklabel -w `cat vnd` ${FSDISKTYPE} newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a mount /dev/`cat vnd`a ${MOUNT_POINT} - cp ${DESTDIR}/usr/mdec/boot ${MOUNT_POINT}/boot - strip -R .comment -R .SUNW_ctf ${MOUNT_POINT}/boot + objcopy -S -R .comment -R .SUNW_ctf ${DESTDIR}/usr/mdec/boot ${MOUNT_POINT}/boot installboot -v -r ${MOUNT_POINT} `cat vnd` \ ${DESTDIR}/usr/mdec/biosboot ${MOUNT_POINT}/boot install -c -m 555 -o root -g wheel bsd.rd ${MOUNT_POINT}/bsd diff --git a/distrib/i386/ramdisk/Makefile b/distrib/i386/ramdisk/Makefile index 2c14e42580d..34ec8ceafc8 100644 --- a/distrib/i386/ramdisk/Makefile +++ b/distrib/i386/ramdisk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.10 2021/02/13 18:44:18 semarie Exp $ +# $OpenBSD: Makefile,v 1.11 2021/02/13 18:46:52 semarie Exp $ FS= floppy${OSrev}.img FSSIZE= 2880 @@ -21,8 +21,7 @@ ${FS}: bsd.gz disklabel -w `cat vnd` ${FSDISKTYPE} newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a mount /dev/`cat vnd`a ${MOUNT_POINT} - cp ${DESTDIR}/usr/mdec/fdboot ${.OBJDIR}/boot - strip -R .comment -R .SUNW_ctf ${.OBJDIR}/boot + objcopy -S -R .comment -R .SUNW_ctf ${DESTDIR}/usr/mdec/fdboot ${.OBJDIR}/boot installboot -v -r ${MOUNT_POINT} `cat vnd` \ ${DESTDIR}/usr/mdec/biosboot ${.OBJDIR}/boot install -c -m 555 -o root -g wheel bsd.gz ${MOUNT_POINT}/bsd @@ -35,8 +34,7 @@ MRDISKTYPE= rdroot MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096 bsd.gz: bsd.rd - cp bsd.rd bsd.strip - strip -R .comment -R .SUNW_ctf bsd.strip + objcopy -S -R .comment -R .SUNW_ctf bsd.rd bsd.strip gzip -9cn bsd.strip > bsd.gz bsd.rd: mr.fs bsd diff --git a/distrib/i386/ramdisk_cd/Makefile b/distrib/i386/ramdisk_cd/Makefile index 0acdef913c5..2f4713ede1c 100644 --- a/distrib/i386/ramdisk_cd/Makefile +++ b/distrib/i386/ramdisk_cd/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.19 2021/02/13 18:44:18 semarie Exp $ +# $OpenBSD: Makefile,v 1.20 2021/02/13 18:46:52 semarie Exp $ FS= miniroot${OSrev}.img FSSIZE= 8064 @@ -24,8 +24,7 @@ ${FS}: bsd.gz disklabel -w `cat vnd` ${FSDISKTYPE} newfs -O 1 -m 0 -o space -i 524288 -c ${FSSIZE} /dev/r`cat vnd`a mount /dev/`cat vnd`a ${MOUNT_POINT} - cp ${DESTDIR}/usr/mdec/boot ${.OBJDIR}/boot - strip -R .comment -R .SUNW_ctf ${.OBJDIR}/boot + objcopy -S -R .comment -R .SUNW_ctf ${DESTDIR}/usr/mdec/boot ${.OBJDIR}/boot installboot -v -r ${MOUNT_POINT} `cat vnd` \ ${DESTDIR}/usr/mdec/biosboot ${.OBJDIR}/boot install -c -m 555 -o root -g wheel bsd.gz ${MOUNT_POINT}/bsd @@ -54,8 +53,7 @@ MRDISKTYPE= rdrootb MRMAKEFSARGS= -o disklabel=${MRDISKTYPE},minfree=0,density=4096 bsd.gz: bsd.rd - cp bsd.rd bsd.strip - strip -R .comment -R .SUNW_ctf bsd.strip + objcopy -S -R .comment -R .SUNW_ctf bsd.rd bsd.strip gzip -9cn bsd.strip > bsd.gz bsd.rd: mr.fs bsd diff --git a/distrib/loongson/ramdisk/Makefile b/distrib/loongson/ramdisk/Makefile index 4e5775a407b..710bc733c19 100644 --- a/distrib/loongson/ramdisk/Makefile +++ b/distrib/loongson/ramdisk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.28 2021/02/13 18:44:18 semarie Exp $ +# $OpenBSD: Makefile,v 1.29 2021/02/13 18:46:52 semarie Exp $ FS= miniroot${OSrev}.img FSSIZE= 18432 @@ -45,8 +45,7 @@ ${CDROM}: bsd.rd ${.OBJDIR}/cd-dir bsd.strip: bsd.rd - cp bsd.rd bsd.strip - strip -R .comment -R .SUNW_ctf bsd.strip + objcopy -S -R .comment -R .SUNW_ctf bsd.rd bsd.strip bsd.rd: mr.fs bsd cp bsd bsd.rd diff --git a/distrib/miniroot/list2sh.awk b/distrib/miniroot/list2sh.awk index 743be0df5fa..b30a895cfb6 100644 --- a/distrib/miniroot/list2sh.awk +++ b/distrib/miniroot/list2sh.awk @@ -1,4 +1,4 @@ -# $OpenBSD: list2sh.awk,v 1.22 2019/04/30 17:46:04 deraadt Exp $ +# $OpenBSD: list2sh.awk,v 1.23 2021/02/13 18:46:52 semarie Exp $ BEGIN { printf("cd ${OBJDIR}\n"); @@ -27,8 +27,7 @@ $1 == "MKDIR" { $1 == "STRIP" { printf("echo '%s'\n", $0); printf("test -f ${TARGDIR}/%s && rm -fr ${TARGDIR}/%s\n", $3, $3); - printf("cp %s ${TARGDIR}/%s\n", $2, $3); - printf("strip ${TARGDIR}/%s\n", $3); + printf("objcopy -S %s ${TARGDIR}/%s\n", $2, $3); next; } $1 == "LINK" { diff --git a/distrib/sparc64/ramdisk/Makefile b/distrib/sparc64/ramdisk/Makefile index 14dccb17ec2..b360b68ac7a 100644 --- a/distrib/sparc64/ramdisk/Makefile +++ b/distrib/sparc64/ramdisk/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.51 2020/05/18 06:20:44 otto Exp $ +# $OpenBSD: Makefile,v 1.52 2021/02/13 18:46:52 semarie Exp $ FS= floppy${OSrev}.img FSSIZE= 2880 @@ -32,8 +32,7 @@ ${FS}: bsd.gz rm -f vnd bsd.gz: bsd.rd - cp bsd.rd bsd.strip - strip -R .SUNW_ctf bsd.strip + objcopy -S -R .SUNW_ctf bsd.rd bsd.strip gzip -9cn bsd.strip > bsd.gz bsd.rd: mr.fs bsd diff --git a/distrib/sparc64/ramdiskB/Makefile b/distrib/sparc64/ramdiskB/Makefile index 154d1cd5edf..ec7f6c3f591 100644 --- a/distrib/sparc64/ramdiskB/Makefile +++ b/distrib/sparc64/ramdiskB/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.47 2020/12/31 17:18:39 deraadt Exp $ +# $OpenBSD: Makefile,v 1.48 2021/02/13 18:46:52 semarie Exp $ FS= floppyB${OSrev}.img FSSIZE= 2880 @@ -32,8 +32,7 @@ ${FS}: bsd.gz rm -f vnd bsd.gz: bsd.rd - cp bsd.rd bsd.strip - strip -R .SUNW_ctf bsd.strip + objcopy -S -R .SUNW_ctf bsd.rd bsd.strip gzip -9cn bsd.strip > bsd.gz bsd.rd: mr.fs bsd