pkgsrc-Changes archive

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

CVS commit: pkgsrc/mk



Module Name:    pkgsrc
Committed By:   riastradh
Date:           Fri Apr 12 19:58:22 UTC 2024

Modified Files:
        pkgsrc/mk: bsd.prefs.mk
        pkgsrc/mk/platform: NetBSD.mk

Log Message:
mk/platform/NetBSD.mk: Handle i386-on-amd64 builds.

XXX This should be extended to other compat32-on-64bit builds, and
the wackier variations on that theme one finds in MIPS systems -- may
require spelunking through the ld emulation schemes in GNU binutils.

PR pkg/51400


To generate a diff of this commit:
cvs rdiff -u -r1.446 -r1.447 pkgsrc/mk/bsd.prefs.mk
cvs rdiff -u -r1.80 -r1.81 pkgsrc/mk/platform/NetBSD.mk

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

Modified files:

Index: pkgsrc/mk/bsd.prefs.mk
diff -u pkgsrc/mk/bsd.prefs.mk:1.446 pkgsrc/mk/bsd.prefs.mk:1.447
--- pkgsrc/mk/bsd.prefs.mk:1.446        Fri Apr 12 19:58:04 2024
+++ pkgsrc/mk/bsd.prefs.mk      Fri Apr 12 19:58:22 2024
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.446 2024/04/12 19:58:04 riastradh Exp $
+# $NetBSD: bsd.prefs.mk,v 1.447 2024/04/12 19:58:22 riastradh Exp $
 #
 # This file includes the mk.conf file, which contains the user settings.
 #
@@ -158,6 +158,11 @@ MACHINE_GNU_ARCH?=         ${GNU_ARCH.${MACHINE
 .if ${NATIVE_OPSYS} == "NetBSD"
 NATIVE_LOWER_OPSYS?=   netbsd
 
+.  if !defined(HOST_MACHINE_ARCH)
+HOST_MACHINE_ARCH!=    ${UNAME} -m
+MAKEFLAGS+=            HOST_MACHINE_ARCH=${HOST_MACHINE_ARCH:Q}
+.  endif
+
 .elif ${NATIVE_OPSYS} == "AIX"
 .  if exists(/usr/bin/oslevel)
 _NATIVE_OS_VERSION!=   /usr/bin/oslevel

Index: pkgsrc/mk/platform/NetBSD.mk
diff -u pkgsrc/mk/platform/NetBSD.mk:1.80 pkgsrc/mk/platform/NetBSD.mk:1.81
--- pkgsrc/mk/platform/NetBSD.mk:1.80   Fri Apr 12 19:56:40 2024
+++ pkgsrc/mk/platform/NetBSD.mk        Fri Apr 12 19:58:22 2024
@@ -1,4 +1,4 @@
-# $NetBSD: NetBSD.mk,v 1.80 2024/04/12 19:56:40 riastradh Exp $
+# $NetBSD: NetBSD.mk,v 1.81 2024/04/12 19:58:22 riastradh Exp $
 #
 # Variable definitions for the NetBSD operating system.
 
@@ -232,3 +232,15 @@ _OPSYS_CAN_CHECK_SSP=              no  # only suppor
 # check for maximum command line length and set it in configure's environment,
 # to avoid a test required by the libtool script that takes forever.
 _OPSYS_MAX_CMDLEN_CMD= /sbin/sysctl -n kern.argmax
+
+# ABI selection.  (XXX Can we do this in terms of ${ABI} instead of
+# ${MACHINE_ARCH} vs ${HOST_MACHINE_ARCH} (uname -m)?  Complication is
+# I don't know how to get the value of ${ABI} that ld is configured for
+# by default.)
+_OPSYS_LDEMUL.i386=            elf_i386
+
+.if ${MACHINE_ARCH} != ${HOST_MACHINE_ARCH} && \
+    defined(_OPSYS_LDEMUL.${MACHINE_ARCH})
+_WRAP_EXTRA_ARGS.LD+=  -m ${_OPSYS_LDEMUL.${MACHINE_ARCH}}
+CWRAPPERS_APPEND.ld+=  -m ${_OPSYS_LDEMUL.${MACHINE_ARCH}}
+.endif



Home | Main Index | Thread Index | Old Index