Module Name:    src
Committed By:   martin
Date:           Tue May 25 10:58:41 UTC 2021

Modified Files:
        src/distrib/macppc/floppies/ramdisk: Makefile
        src/distrib/utils/libhack: Makefile.inc

Log Message:
Provide support to build 32bit crunched ramdisks and use that for
macppc64. With help from rin.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/distrib/macppc/floppies/ramdisk/Makefile
cvs rdiff -u -r1.38 -r1.39 src/distrib/utils/libhack/Makefile.inc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/macppc/floppies/ramdisk/Makefile
diff -u src/distrib/macppc/floppies/ramdisk/Makefile:1.52 src/distrib/macppc/floppies/ramdisk/Makefile:1.53
--- src/distrib/macppc/floppies/ramdisk/Makefile:1.52	Sun Apr  5 14:36:43 2020
+++ src/distrib/macppc/floppies/ramdisk/Makefile	Tue May 25 10:58:41 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.52 2020/04/05 14:36:43 sevan Exp $
+#	$NetBSD: Makefile,v 1.53 2021/05/25 10:58:41 martin Exp $
 
 .include <bsd.own.mk>
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -12,9 +12,15 @@ IMAGESIZE=	2880k
 MAKEFS_FLAGS+=	-f 15
 
 WARNS=		1
-DBG=		-Os
+
+# No point in using 64bit binaries (if building for MACHINE_ARCH=powerpc64)
+# on the ramdisk, keep it small
+DBG=		-Os -m32
+HACK_LD_FLAGS=	-m elf32ppc_nbsd
+LDFLAGS+=	-m32 -Wl,-melf32ppc_nbsd
 
 CRUNCHBIN=	ramdiskbin
+CRUNCHENV+=	LDFLAGS=${LDFLAGS:Q}
 LISTS=		${.CURDIR}/list ${DISTRIBDIR}/common/list.sysinst
 MTREECONF=	${DISTRIBDIR}/common/mtree.common
 IMAGEENDIAN=	be

Index: src/distrib/utils/libhack/Makefile.inc
diff -u src/distrib/utils/libhack/Makefile.inc:1.38 src/distrib/utils/libhack/Makefile.inc:1.39
--- src/distrib/utils/libhack/Makefile.inc:1.38	Tue Mar  9 00:06:44 2021
+++ src/distrib/utils/libhack/Makefile.inc	Tue May 25 10:58:41 2021
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.inc,v 1.38 2021/03/09 00:06:44 christos Exp $
+# $NetBSD: Makefile.inc,v 1.39 2021/05/25 10:58:41 martin Exp $
 #
 # Include this fragment to build libhack.o
 # It is .o and not .a to make sure these are the
@@ -70,7 +70,7 @@ CPPFLAGS.gethost.c+= -I${HACKSRC}/../../
 
 .if !defined(LIB)
 libhack.o: ${HACKOBJS}
-	${LD} -r -o $@ ${.ALLSRC}
+	${LD} -r ${HACK_LD_FLAGS} -o $@ ${.ALLSRC}
 .endif
 
 .if 1

Reply via email to