pkgsrc-Changes archive

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

CVS commit: pkgsrc



Module Name:    pkgsrc
Committed By:   riastradh
Date:           Mon Apr  4 11:23:07 UTC 2022

Modified Files:
        pkgsrc/cross/cross-libtool-base: Makefile
        pkgsrc/doc: HOWTO-use-crosscompile
        pkgsrc/mk: bsd.prefs.mk cwrappers.mk
        pkgsrc/mk/compiler: gcc.mk
        pkgsrc/mk/configure: gnu-configure.mk
        pkgsrc/mk/pkgformat/pkg: metadata.mk
        pkgsrc/mk/tools: tools.FreeMiNT.mk tools.Minix.mk tools.NetBSD.mk
            tools.QNX.mk
        pkgsrc/mk/wrapper: bsd.wrapper.mk
        pkgsrc/x11/libdrm: Makefile

Log Message:
mk: Cross-eyed hacks to support cross-libtool.

For a long time, when cross-building, say from native=amd64 to
target=powerpc, it was necessary to:

1. cross-build a _powerpc_ package called cross-libtool-base-powerpc,
   and then

2. install the powerpc package _natively_ with `pkg_add -m x86_64' to
   override the architecture check that normally forbids this kind of
   shenanigans,

in order to cross-build anything that uses libtool as a tool.

This is partly because libtool doesn't follow the normal GNU
convention of `./configure --build=<native platform> --host=<platform
package will run on> --target=<platform package is configured to
operate on>' -- in this example, build=amd64, host=amd64,
target=powerpc.

Instead, libtool expects to be cross-built itself, even if it's going
to run as a tool.  It's not as bonkers as it sounds at first: libtool
is just a shell script, and it caches various information about the
(cross-building!) toolchain it is built with so it can use that
information later when it is run as a tool itself to cross-compile
other software.

To make this work, we need to create the toolchain wrappers for
libtool _as if_ we were cross-building even if we are building a
native package.  So mk/tools uses a new flag TOOLS_USE_CROSS_COMPILE
instead of USE_CROSS_COMPILE, and libtool internally sets
MACHINE_ARCH=${TARGET_ARCH} (in the example above, powerpc) to make
it look like we're cross-building.  The new TOOLS_CROSS_DESTDIR is an
alias for the (defaulted) CROSS_DESTDIR, which must now be set
unconditionally in mk.conf in order for libtool to know where the
cross-destdir will be; _CROSS_DESTDIR remains empty when building any
native packages (including the native cross-libtool package).

Finally, we need to make the resulting package be a native package,
with MACHINE_ARCH set to the one that it will be installed on (in the
example above, amd64), so I added an indirection _BUILD_DEFS.${var}
to replace var on its own in the build definitions that get baked
into the package, shown by `pkg_info -B'.  Setting
_BUILD_DEFS.MACHINE_ARCH=${NATIVE_MACHINE_ARCH} ensures that this
mutant hybrid cross-built libtool still produces a native package.

All of this logic is gated on setting USE_CROSS_COMPILE in mk.conf or
LIBTOOL_CROSS_COMPILE in the package makefile, so it should be safe
for non-cross-builds -- when USE_CROSS_COMPILE=no and you're not
building cross-libtool, everything is as before.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 pkgsrc/cross/cross-libtool-base/Makefile
cvs rdiff -u -r1.8 -r1.9 pkgsrc/doc/HOWTO-use-crosscompile
cvs rdiff -u -r1.416 -r1.417 pkgsrc/mk/bsd.prefs.mk
cvs rdiff -u -r1.34 -r1.35 pkgsrc/mk/cwrappers.mk
cvs rdiff -u -r1.236 -r1.237 pkgsrc/mk/compiler/gcc.mk
cvs rdiff -u -r1.28 -r1.29 pkgsrc/mk/configure/gnu-configure.mk
cvs rdiff -u -r1.32 -r1.33 pkgsrc/mk/pkgformat/pkg/metadata.mk
cvs rdiff -u -r1.4 -r1.5 pkgsrc/mk/tools/tools.FreeMiNT.mk
cvs rdiff -u -r1.13 -r1.14 pkgsrc/mk/tools/tools.Minix.mk
cvs rdiff -u -r1.69 -r1.70 pkgsrc/mk/tools/tools.NetBSD.mk
cvs rdiff -u -r1.1 -r1.2 pkgsrc/mk/tools/tools.QNX.mk
cvs rdiff -u -r1.104 -r1.105 pkgsrc/mk/wrapper/bsd.wrapper.mk
cvs rdiff -u -r1.99 -r1.100 pkgsrc/x11/libdrm/Makefile

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

Modified files:

Index: pkgsrc/cross/cross-libtool-base/Makefile
diff -u pkgsrc/cross/cross-libtool-base/Makefile:1.5 pkgsrc/cross/cross-libtool-base/Makefile:1.6
--- pkgsrc/cross/cross-libtool-base/Makefile:1.5        Mon May 24 19:49:26 2021
+++ pkgsrc/cross/cross-libtool-base/Makefile    Mon Apr  4 11:23:06 2022
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.5 2021/05/24 19:49:26 wiz Exp $
+# $NetBSD: Makefile,v 1.6 2022/04/04 11:23:06 riastradh Exp $
 
 # XXX This is kludgerific copypasta of devel/libtool-base/Makefile for
 # cross-compilation.  Please make it go away!
@@ -31,12 +31,14 @@
 ###########################################################################
 ###########################################################################
 
+LIBTOOL_CROSS_COMPILE= yes
+
 .include "../../devel/libtool/Makefile.common"
 
 # XXX Tweaked for cross-compilation.
 #PKGNAME=      ${DISTNAME:S/-/-base-/}
 PKGNAME=       ${DISTNAME:S/^libtool-/cross-libtool-base-${MACHINE_ARCH}-/}
-PKGREVISION=   6
+PKGREVISION=   7
 
 COMMENT=       Generic shared library support script (the script itself)
 

Index: pkgsrc/doc/HOWTO-use-crosscompile
diff -u pkgsrc/doc/HOWTO-use-crosscompile:1.8 pkgsrc/doc/HOWTO-use-crosscompile:1.9
--- pkgsrc/doc/HOWTO-use-crosscompile:1.8       Mon Apr  4 11:22:50 2022
+++ pkgsrc/doc/HOWTO-use-crosscompile   Mon Apr  4 11:23:06 2022
@@ -1,7 +1,7 @@
 Cross-compilation in pkgsrc (user's guide)              -*- outline -*-
 Taylor R. Campbell <riastradh%NetBSD.org@localhost>
 
-$NetBSD: HOWTO-use-crosscompile,v 1.8 2022/04/04 11:22:50 riastradh Exp $
+$NetBSD: HOWTO-use-crosscompile,v 1.9 2022/04/04 11:23:06 riastradh Exp $
 
 The following steps enable you to build binary packages for a machine
 architecture other than the one you are building on.  For example, you
@@ -40,14 +40,8 @@ In addition to whatever else you want in
    # which is a bug.
    USE_CROSS_COMPILE?=  yes
 
-   .if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
-   # Specify the machine architecture of target packages.
-   #
-   # XXX This currently can't be set on the command line, which is a
-   # bug.
-   MACHINE_ARCH=        powerpc
-
-   # Point pkgsrc at the NetBSD tooldir and destdir.
+   # Point pkgsrc at the NetBSD tooldir and destdir.  These are used
+   # only for cross-builds.
    #
    # XXX There is no obvious variable that is set to amd64 so that we
    # could use
@@ -59,6 +53,13 @@ In addition to whatever else you want in
    TOOLDIR=             /usr/obj/tooldir.NetBSD-6.1-amd64
    CROSS_DESTDIR=       /usr/obj/destdir.evbppc
 
+   .if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+   # Specify the machine architecture of target packages.
+   #
+   # XXX This currently can't be set on the command line, which is a
+   # bug.
+   MACHINE_ARCH=        powerpc
+
    # Put target work and packages in separate directories.  (You might
    # use OBJMACHINE=yes or WRKOBJDIR=/tmp/work.${MACHINE_ARCH} instead
    # for the work directories.)
@@ -76,22 +77,6 @@ XXX Some variables, notably LOCALBASE an
 into packages, cannot currently be set differently for native and
 target packages.
 
-* Work around libtool
-
-Libtool's build system is broken -- it misuses the GNU build system
-build/host/target settings.  For now we need to kludge around it
-manually:
-
-   $ cd /usr/pkgsrc/cross/cross-libtool-base
-   $ make package
-   $ pkg_add -m powerpc /usr/pkgsrc/packages.powerpc/All/cross-libtool-base-powerpc-2.4.2.tgz
-
-(This builds a libtool package for the target, and then installs the
-target package natively.  This *shouldn't* work, and pkg_add normally
-refuses this, but it does work because libtool is a shell script, and
-`pkg_add -m powerpc' makes pkg_add pretend we are powerpc to suppress
-its refusal.)
-
 * Make some packages
 
 Now packages you build normally will be cross-compiled for the target:

Index: pkgsrc/mk/bsd.prefs.mk
diff -u pkgsrc/mk/bsd.prefs.mk:1.416 pkgsrc/mk/bsd.prefs.mk:1.417
--- pkgsrc/mk/bsd.prefs.mk:1.416        Tue Jan 18 01:41:09 2022
+++ pkgsrc/mk/bsd.prefs.mk      Mon Apr  4 11:23:06 2022
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.416 2022/01/18 01:41:09 pho Exp $
+# $NetBSD: bsd.prefs.mk,v 1.417 2022/04/04 11:23:06 riastradh Exp $
 #
 # This file includes the mk.conf file, which contains the user settings.
 #
@@ -337,6 +337,33 @@ MACHINE_PLATFORM?=         ${OPSYS}-${OS_VERSIO
 NATIVE_MACHINE_GNU_PLATFORM?=  ${NATIVE_MACHINE_GNU_ARCH}-${LOWER_VENDOR}-${LOWER_OPSYS:C/[0-9]//g}${NATIVE_APPEND_ELF}${LOWER_OPSYS_VERSUFFIX}${NATIVE_APPEND_ABI}
 MACHINE_GNU_PLATFORM?=         ${MACHINE_GNU_ARCH}-${LOWER_VENDOR}-${LOWER_OPSYS:C/[0-9]//g}${APPEND_ELF}${LOWER_OPSYS_VERSUFFIX}${APPEND_ABI}
 
+#
+# cross-libtool is special -- it is built as a native package, but it
+# needs tools set up as if for a cross-compiled package because it
+# remembers the paths for use to later assist in cross-compiling other
+# packages.
+#
+# So normally TOOLS_USE_CROSS_COMPILE is the same as USE_CROSS_COMPILE,
+# but for cross-libtool, we set TOOLS_USE_CROSS_COMPILE=yes while doing
+# the rest of the native package build with USE_CROSS_COMPILE=no.
+#
+# This can't live inside the cross-libtool makefile because the
+# TARGET_ARCH / MACHINE_ARCH / NATIVE_MACHINE_ARCH switcheroo has to
+# happen in the middle of this file -- after NATIVE_MACHINE_ARCH is
+# determined, before MACHINE_ARCH is used for anything else.
+#
+.if !empty(LIBTOOL_CROSS_COMPILE:M[yY][eE][sS])
+.  if !defined(TARGET_ARCH)
+PKG_FAIL_REASON+=      "Must set TARGET_ARCH for cross-libtool."
+.  endif
+MACHINE_ARCH:=                 ${TARGET_ARCH}
+_BUILD_DEFS.MACHINE_ARCH=      ${NATIVE_MACHINE_ARCH}
+_BUILD_DEFS.MACHINE_GNU_ARCH=  ${NATIVE_MACHINE_GNU_ARCH}
+TOOLS_USE_CROSS_COMPILE=       yes
+.else
+TOOLS_USE_CROSS_COMPILE=       ${USE_CROSS_COMPILE:Uno}
+.endif
+
 # Needed to prevent an "install:" target from being created in bsd.own.mk.
 NEED_OWN_INSTALL_TARGET=no
 
@@ -520,6 +547,11 @@ _CROSS_DESTDIR=    ${CROSS_DESTDIR}
 .  endif
 .endif
 
+# TOOLS_CROSS_DESTDIR is used for the libtool build to make a wrapper
+# that points at the cross-destdir as sysroot, without setting
+# _CROSS_DESTDIR because we're actually building a native package.
+TOOLS_CROSS_DESTDIR=           ${CROSS_DESTDIR}
+
 # Depends on MACHINE_ARCH override above
 .if ${OPSYS} == "NetBSD"
 # XXX NATIVE_OBJECT_FMT is a cop-out -- but seriously, who is going to

Index: pkgsrc/mk/cwrappers.mk
diff -u pkgsrc/mk/cwrappers.mk:1.34 pkgsrc/mk/cwrappers.mk:1.35
--- pkgsrc/mk/cwrappers.mk:1.34 Mon Apr  4 11:22:50 2022
+++ pkgsrc/mk/cwrappers.mk      Mon Apr  4 11:23:06 2022
@@ -1,4 +1,4 @@
-# $NetBSD: cwrappers.mk,v 1.34 2022/04/04 11:22:50 riastradh Exp $
+# $NetBSD: cwrappers.mk,v 1.35 2022/04/04 11:23:06 riastradh Exp $
 #
 # This Makefile fragment implements integration of pkgtools/cwrappers.
 
@@ -37,7 +37,7 @@ CWRAPPERS_ALIASES.ld=         ld
 CWRAPPERS_ALIASES.libtool=     libtool
 CWRAPPERS_ALIASES.shlibtool=   shlibtool
 
-.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+.if !empty(TOOLS_USE_CROSS_COMPILE:M[yY][eE][sS])
 CWRAPPERS_ALIASES.cc+=         ${CC:T}
 CWRAPPERS_ALIASES.cxx+=                ${CXX:T}
 CWRAPPERS_ALIASES.ld+=         ${LD:T}
@@ -101,8 +101,8 @@ generate-cwrappers:
 .    endfor
 .  endif
 . endif
-. if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
-       ${RUN}echo sysroot=${_CROSS_DESTDIR:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}}
+. if !empty(TOOLS_USE_CROSS_COMPILE:M[yY][eE][sS])
+       ${RUN}echo sysroot=${TOOLS_CROSS_DESTDIR:Q} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}}
 . endif
 .endfor
 

Index: pkgsrc/mk/compiler/gcc.mk
diff -u pkgsrc/mk/compiler/gcc.mk:1.236 pkgsrc/mk/compiler/gcc.mk:1.237
--- pkgsrc/mk/compiler/gcc.mk:1.236     Sun Mar 13 06:26:57 2022
+++ pkgsrc/mk/compiler/gcc.mk   Mon Apr  4 11:23:06 2022
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.236 2022/03/13 06:26:57 nia Exp $
+# $NetBSD: gcc.mk,v 1.237 2022/04/04 11:23:06 riastradh Exp $
 #
 # This is the compiler definition for the GNU Compiler Collection.
 #
@@ -668,7 +668,7 @@ _GCCBINDIR= ${_GCC_PREFIX}bin
 .elif !empty(_IS_BUILTIN_GCC:M[yY][eE][sS])
 _GCCBINDIR=    ${_CC:H}
 .endif
-.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+.if !empty(TOOLS_USE_CROSS_COMPILE:M[yY][eE][sS])
 _GCC_BIN_PREFIX=       ${MACHINE_GNU_PLATFORM}-
 .endif
 _GCC_BIN_PREFIX?=      # empty

Index: pkgsrc/mk/configure/gnu-configure.mk
diff -u pkgsrc/mk/configure/gnu-configure.mk:1.28 pkgsrc/mk/configure/gnu-configure.mk:1.29
--- pkgsrc/mk/configure/gnu-configure.mk:1.28   Sat May 23 12:11:33 2020
+++ pkgsrc/mk/configure/gnu-configure.mk        Mon Apr  4 11:23:06 2022
@@ -1,4 +1,4 @@
-# $NetBSD: gnu-configure.mk,v 1.28 2020/05/23 12:11:33 rillig Exp $
+# $NetBSD: gnu-configure.mk,v 1.29 2022/04/04 11:23:06 riastradh Exp $
 #
 # Package-settable variables:
 #
@@ -80,7 +80,7 @@ CONFIGURE_ARGS+=      --libdir=${GNU_CONFIGUR
 
 USE_GNU_CONFIGURE_HOST?=       yes
 .if !empty(USE_GNU_CONFIGURE_HOST:M[yY][eE][sS])
-.  if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+.  if !empty(TOOLS_USE_CROSS_COMPILE:M[yY][eE][sS])
 CONFIGURE_ARGS+=       --build=${NATIVE_MACHINE_GNU_PLATFORM:Q}
 .  else
 CONFIGURE_ARGS+=       --build=${MACHINE_GNU_PLATFORM:Q}

Index: pkgsrc/mk/pkgformat/pkg/metadata.mk
diff -u pkgsrc/mk/pkgformat/pkg/metadata.mk:1.32 pkgsrc/mk/pkgformat/pkg/metadata.mk:1.33
--- pkgsrc/mk/pkgformat/pkg/metadata.mk:1.32    Sun Nov  7 18:49:28 2021
+++ pkgsrc/mk/pkgformat/pkg/metadata.mk Mon Apr  4 11:23:07 2022
@@ -1,4 +1,4 @@
-# $NetBSD: metadata.mk,v 1.32 2021/11/07 18:49:28 khorben Exp $
+# $NetBSD: metadata.mk,v 1.33 2022/04/04 11:23:07 riastradh Exp $
 
 ######################################################################
 ### The targets below are all PRIVATE.
@@ -36,7 +36,7 @@ DARWIN_REQUIRES_FILTER=       ${CAT}
 ${_BUILD_INFO_FILE}: ${_PLIST_NOKEYWORDS}
        ${RUN}${MKDIR} ${.TARGET:H}
        ${RUN}${RM} -f ${.TARGET}.tmp
-       ${RUN} (${_BUILD_DEFS:NPATH:@v@${ECHO} ${v}=${${v}:Q} ;@})      \
+       ${RUN} (${_BUILD_DEFS:NPATH:@v@${ECHO} ${v}=${_BUILD_DEFS.${v}:Q:U${${v}:Q}} ;@})       \
                > ${.TARGET}.tmp
 .if !empty(USE_LANGUAGES)
        ${RUN}${ECHO} "CC_VERSION=${CC_VERSION}" >> ${.TARGET}.tmp

Index: pkgsrc/mk/tools/tools.FreeMiNT.mk
diff -u pkgsrc/mk/tools/tools.FreeMiNT.mk:1.4 pkgsrc/mk/tools/tools.FreeMiNT.mk:1.5
--- pkgsrc/mk/tools/tools.FreeMiNT.mk:1.4       Thu Mar  6 07:34:20 2014
+++ pkgsrc/mk/tools/tools.FreeMiNT.mk   Mon Apr  4 11:23:07 2022
@@ -1,4 +1,4 @@
-# $NetBSD: tools.FreeMiNT.mk,v 1.4 2014/03/06 07:34:20 uebayasi Exp $
+# $NetBSD: tools.FreeMiNT.mk,v 1.5 2022/04/04 11:23:07 riastradh Exp $
 #
 # System-supplied tools for the FreeMiNT operating system.
 
@@ -37,7 +37,7 @@ TOOLS_PLATFORM.gzip?=         /usr/bin/gzip -nf
 TOOLS_PLATFORM.head?=          /usr/bin/head
 TOOLS_PLATFORM.hostname?=      /bin/hostname
 TOOLS_PLATFORM.id?=            /usr/bin/id
-.if empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+.if empty(TOOLS_USE_CROSS_COMPILE:M[yY][eE][sS])
 TOOLS_PLATFORM.install?=       /usr/bin/install
 .else
 TOOLS_PLATFORM.install?=       ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install
@@ -58,7 +58,7 @@ TOOLS_PLATFORM.openssl?=      /usr/bin/openss
 TOOLS_PLATFORM.patch?=         /usr/bin/patch
 TOOLS_PLATFORM.printf?=                /usr/bin/printf
 TOOLS_PLATFORM.pwd?=           /bin/pwd
-.if empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+.if empty(TOOLS_USE_CROSS_COMPILE:M[yY][eE][sS])
 TOOLS_PLATFORM.readelf?=       /usr/bin/readelf
 .else
 TOOLS_PLATFORM.readelf?=       ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-readelf
@@ -71,7 +71,7 @@ TOOLS_PLATFORM.sh?=           /bin/sh
 TOOLS_PLATFORM.sleep?=         /bin/sleep
 TOOLS_PLATFORM.soelim?=                /usr/bin/soelim
 TOOLS_PLATFORM.sort?=          /bin/sort
-.if empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+.if empty(TOOLS_USE_CROSS_COMPILE:M[yY][eE][sS])
 TOOLS_PLATFORM.strip?=         /usr/bin/strip
 .else
 TOOLS_PLATFORM.strip?=         ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip
@@ -92,7 +92,7 @@ TOOLS_PLATFORM.xargs?=                /usr/bin/xargs -
 TOOLS_PLATFORM.xgettext?=      /usr/bin/xgettext
 TOOLS_PLATFORM.yacc?=          /usr/bin/yacc
 
-.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+.if !empty(TOOLS_USE_CROSS_COMPILE:M[yY][eE][sS])
 .  for _t_ in ar as ld nm objdump ranlib readelf strip
 TOOLS_PATH.${MACHINE_GNU_PLATFORM}-${_t_}?=    \
        ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-${_t_}

Index: pkgsrc/mk/tools/tools.Minix.mk
diff -u pkgsrc/mk/tools/tools.Minix.mk:1.13 pkgsrc/mk/tools/tools.Minix.mk:1.14
--- pkgsrc/mk/tools/tools.Minix.mk:1.13 Mon Nov 12 13:34:39 2018
+++ pkgsrc/mk/tools/tools.Minix.mk      Mon Apr  4 11:23:07 2022
@@ -1,4 +1,4 @@
-# $NetBSD: tools.Minix.mk,v 1.13 2018/11/12 13:34:39 jperkin Exp $
+# $NetBSD: tools.Minix.mk,v 1.14 2022/04/04 11:23:07 riastradh Exp $
 #
 # System-supplied tools for the Minix operating system.
 
@@ -43,7 +43,7 @@ TOOLS_PLATFORM.gzip?=         /usr/bin/gzip -nf
 TOOLS_PLATFORM.head?=          /usr/bin/head
 TOOLS_PLATFORM.hostname?=      /bin/hostname
 TOOLS_PLATFORM.id?=            /usr/bin/id
-.if empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+.if empty(TOOLS_USE_CROSS_COMPILE:M[yY][eE][sS])
 TOOLS_PLATFORM.install?=       /usr/bin/install
 .else
 TOOLS_PLATFORM.install?=       ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install
@@ -67,7 +67,7 @@ TOOLS_PLATFORM.patch?=                /usr/bin/patch
 TOOLS_PLATFORM.pax?=           /bin/pax
 TOOLS_PLATFORM.printf?=                /usr/bin/printf
 TOOLS_PLATFORM.pwd?=           /bin/pwd
-.if empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+.if empty(TOOLS_USE_CROSS_COMPILE:M[yY][eE][sS])
 TOOLS_PLATFORM.readelf?=       /usr/bin/readelf
 .else
 TOOLS_PLATFORM.readelf?=       ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-readelf
@@ -82,7 +82,7 @@ TOOLS_PLATFORM.shlock?=               /usr/bin/shlock
 TOOLS_PLATFORM.sleep?=         /bin/sleep
 TOOLS_PLATFORM.soelim?=                /usr/bin/soelim
 TOOLS_PLATFORM.sort?=          /usr/bin/sort
-.if empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+.if empty(TOOLS_USE_CROSS_COMPILE:M[yY][eE][sS])
 TOOLS_PLATFORM.strip?=         /usr/bin/strip
 .else
 TOOLS_PLATFORM.strip?=         ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip
@@ -103,7 +103,7 @@ TOOLS_PLATFORM.xz?=         /usr/bin/xz
 TOOLS_PLATFORM.xzcat?=         /usr/bin/xzcat
 TOOLS_PLATFORM.yacc?=          /usr/bin/yacc
 
-.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+.if !empty(TOOLS_USE_CROSS_COMPILE:M[yY][eE][sS])
 .  for _t_ in ar as ld nm objcopy objdump ranlib readelf strip
 TOOLS_PATH.${MACHINE_GNU_PLATFORM}-${_t_}?=    \
        ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-${_t_}

Index: pkgsrc/mk/tools/tools.NetBSD.mk
diff -u pkgsrc/mk/tools/tools.NetBSD.mk:1.69 pkgsrc/mk/tools/tools.NetBSD.mk:1.70
--- pkgsrc/mk/tools/tools.NetBSD.mk:1.69        Sun Apr  3 10:33:44 2022
+++ pkgsrc/mk/tools/tools.NetBSD.mk     Mon Apr  4 11:23:07 2022
@@ -1,4 +1,4 @@
-# $NetBSD: tools.NetBSD.mk,v 1.69 2022/04/03 10:33:44 riastradh Exp $
+# $NetBSD: tools.NetBSD.mk,v 1.70 2022/04/04 11:23:07 riastradh Exp $
 #
 # System-supplied tools for the NetBSD operating system.
 
@@ -58,7 +58,7 @@ TOOLS_PLATFORM.head?=         /usr/bin/head
 TOOLS_PLATFORM.hostname?=      /bin/hostname
 TOOLS_PLATFORM.id?=            /usr/bin/id
 TOOLS_PLATFORM.ident?=         /usr/bin/ident
-.if empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+.if empty(TOOLS_USE_CROSS_COMPILE:M[yY][eE][sS])
 TOOLS_PLATFORM.install?=       /usr/bin/install
 .else
 TOOLS_PLATFORM.install?=       ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install
@@ -101,7 +101,7 @@ TOOLS_PLATFORM.paxctl?=             /usr/sbin/paxct
 .endif
 TOOLS_PLATFORM.printf?=                /usr/bin/printf
 TOOLS_PLATFORM.pwd?=           /bin/pwd
-.if empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+.if empty(TOOLS_USE_CROSS_COMPILE:M[yY][eE][sS])
 TOOLS_PLATFORM.readelf?=       /usr/bin/readelf
 .else
 TOOLS_PLATFORM.readelf?=       ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-readelf
@@ -119,7 +119,7 @@ TOOLS_PLATFORM.shlock?=             /usr/bin/shlock
 TOOLS_PLATFORM.sleep?=         /bin/sleep
 TOOLS_PLATFORM.soelim?=                /usr/bin/soelim
 TOOLS_PLATFORM.sort?=          /usr/bin/sort
-.if empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+.if empty(TOOLS_USE_CROSS_COMPILE:M[yY][eE][sS])
 TOOLS_PLATFORM.strip?=         /usr/bin/strip
 .else
 TOOLS_PLATFORM.strip?=         ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip
@@ -155,7 +155,7 @@ TOOLS_PLATFORM.xzcat?=              /usr/bin/xzcat
 .endif
 TOOLS_PLATFORM.yacc?=          /usr/bin/yacc
 
-.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+.if !empty(TOOLS_USE_CROSS_COMPILE:M[yY][eE][sS])
 .  for _t_ in ar as ld nm objcopy objdump ranlib readelf strip
 TOOLS_PATH.${MACHINE_GNU_PLATFORM}-${_t_}?=    \
        ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-${_t_}

Index: pkgsrc/mk/tools/tools.QNX.mk
diff -u pkgsrc/mk/tools/tools.QNX.mk:1.1 pkgsrc/mk/tools/tools.QNX.mk:1.2
--- pkgsrc/mk/tools/tools.QNX.mk:1.1    Sat Jul  4 07:15:22 2015
+++ pkgsrc/mk/tools/tools.QNX.mk        Mon Apr  4 11:23:07 2022
@@ -1,4 +1,4 @@
-# $NetBSD: tools.QNX.mk,v 1.1 2015/07/04 07:15:22 ryoon Exp $
+# $NetBSD: tools.QNX.mk,v 1.2 2022/04/04 11:23:07 riastradh Exp $
 #
 # System-supplied tools for the QNX operating system.
 
@@ -55,7 +55,7 @@ TOOLS_PLATFORM.patch?=                /usr/bin/patch
 TOOLS_PLATFORM.pax?=           /bin/pax
 TOOLS_PLATFORM.printf?=                /usr/bin/printf
 TOOLS_PLATFORM.pwd?=           /bin/pwd
-.if empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+.if empty(TOOLS_USE_CROSS_COMPILE:M[yY][eE][sS])
 TOOLS_PLATFORM.readelf?=       ${QNX_HOST}/usr/bin/readelf
 .endif
 TOOLS_PLATFORM.rm?=            /bin/rm
@@ -65,7 +65,7 @@ TOOLS_PLATFORM.sh?=           /bin/sh
 TOOLS_PLATFORM.sleep?=         /usr/bin/sleep
 TOOLS_PLATFORM.soelim?=                ${QNX_HOST}/usr/bin/soelim
 TOOLS_PLATFORM.sort?=          /usr/bin/sort
-.if empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+.if empty(TOOLS_USE_CROSS_COMPILE:M[yY][eE][sS])
 TOOLS_PLATFORM.strip?=         ${QNX_HOST}/usr/bin/strip
 .endif
 TOOLS_PLATFORM.tail?=          /usr/bin/tail
@@ -85,7 +85,7 @@ TOOLS_PLATFORM.yacc?=         ${QNX_HOST}/usr/b
 
 
 
-.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+.if !empty(TOOLS_USE_CROSS_COMPILE:M[yY][eE][sS])
 .  for _t_ in ar as ld nm objcopy objdump ranlib readelf strip
 TOOLS_PATH.${MACHINE_GNU_PLATFORM}-${_t_}?=    \
        ${QNX_HOST}/usr/bin/nto${MACHINE_GNU_PLATFORM}-${_t_}

Index: pkgsrc/mk/wrapper/bsd.wrapper.mk
diff -u pkgsrc/mk/wrapper/bsd.wrapper.mk:1.104 pkgsrc/mk/wrapper/bsd.wrapper.mk:1.105
--- pkgsrc/mk/wrapper/bsd.wrapper.mk:1.104      Sun Mar 13 06:26:57 2022
+++ pkgsrc/mk/wrapper/bsd.wrapper.mk    Mon Apr  4 11:23:07 2022
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.wrapper.mk,v 1.104 2022/03/13 06:26:57 nia Exp $
+# $NetBSD: bsd.wrapper.mk,v 1.105 2022/04/04 11:23:07 riastradh Exp $
 #
 # Copyright (c) 2005 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -363,7 +363,7 @@ _WRAP_CMD_SINK.CXX= ${_WRAP_CMD_SINK.CC}
 _WRAP_CMD_SINK.LD=     ${WRAPPER_TMPDIR}/cmd-sink-irix-ld
 .endif
 
-.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+.if !empty(TOOLS_USE_CROSS_COMPILE:M[yY][eE][sS])
 _WRAP_CMD_SINK.CC=     ${WRAPPER_TMPDIR}/cmd-sink-cross-gcc
 _WRAP_CMD_SINK.CPP=    ${WRAPPER_TMPDIR}/cmd-sink-cross-cpp
 _WRAP_CMD_SINK.CXX=    ${WRAPPER_TMPDIR}/cmd-sink-cross-gxx
@@ -540,9 +540,9 @@ ${WRAPPER_TMPDIR}/${w}: ${WRAPPER_SRCDIR
        ${RUN} ${CAT} ${.ALLSRC} | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
 .endfor
 
-.if !empty(USE_CROSS_COMPILE:M[yY][eE][sS])
+.if !empty(TOOLS_USE_CROSS_COMPILE:M[yY][eE][sS])
 _WRAP_CROSS_GCC_FILTER+= ${SED}                                                \
-       -e "s|@CROSS_DESTDIR@|${_CROSS_DESTDIR:Q}|g"                    \
+       -e "s|@CROSS_DESTDIR@|${TOOLS_CROSS_DESTDIR:Q}|g"               \
        -e "s|@PREFIX@|${PREFIX:Q}|g"
 ${WRAPPER_TMPDIR}/cmd-sink-cross-gcc: ${WRAPPER_SRCDIR}/cmd-sink-cross-gcc
        ${RUN} ${MKDIR} ${.TARGET:H}

Index: pkgsrc/x11/libdrm/Makefile
diff -u pkgsrc/x11/libdrm/Makefile:1.99 pkgsrc/x11/libdrm/Makefile:1.100
--- pkgsrc/x11/libdrm/Makefile:1.99     Wed Mar 16 20:33:39 2022
+++ pkgsrc/x11/libdrm/Makefile  Mon Apr  4 11:23:07 2022
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.99 2022/03/16 20:33:39 tnn Exp $
+# $NetBSD: Makefile,v 1.100 2022/04/04 11:23:07 riastradh Exp $
 
 DISTNAME=              libdrm-2.4.110
 CATEGORIES=            x11 graphics
@@ -38,7 +38,7 @@ SUBST_STAGE.atomic=   pre-configure
 SUBST_VARS.atomic=     ATOMIC_OPS_CHECK
 
 ATOMIC_OPS_CHECK=      0
-.if exists(${CROSS_DESTDIR}/usr/include/sys/atomic.h)
+.if exists(${_CROSS_DESTDIR}/usr/include/sys/atomic.h)
 ATOMIC_OPS_CHECK=      1
 .else
 .  include "../../devel/libatomic_ops/buildlink3.mk"



Home | Main Index | Thread Index | Old Index