Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/distrib/utils/libhack Provide support to build 32bit crunche...



details:   https://anonhg.NetBSD.org/src/rev/f0030947aa95
branches:  trunk
changeset: 379275:f0030947aa95
user:      martin <martin%NetBSD.org@localhost>
date:      Tue May 25 10:58:41 2021 +0000

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

diffstat:

 distrib/macppc/floppies/ramdisk/Makefile |  10 ++++++++--
 distrib/utils/libhack/Makefile.inc       |   4 ++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diffs (44 lines):

diff -r 024004a5046c -r f0030947aa95 distrib/macppc/floppies/ramdisk/Makefile
--- a/distrib/macppc/floppies/ramdisk/Makefile  Tue May 25 09:19:28 2021 +0000
+++ b/distrib/macppc/floppies/ramdisk/Makefile  Tue May 25 10:58:41 2021 +0000
@@ -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
diff -r 024004a5046c -r f0030947aa95 distrib/utils/libhack/Makefile.inc
--- a/distrib/utils/libhack/Makefile.inc        Tue May 25 09:19:28 2021 +0000
+++ b/distrib/utils/libhack/Makefile.inc        Tue May 25 10:58:41 2021 +0000
@@ -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



Home | Main Index | Thread Index | Old Index