pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/devel/bmake/files bmake: Restore PKGSRC_MACHINE_ARCH s...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/19846fb838c6
branches:  trunk
changeset: 441886:19846fb838c6
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Thu Nov 12 16:05:47 2020 +0000

description:
bmake: Restore PKGSRC_MACHINE_ARCH support.

This was lost in a previous update, and is required to ensure MACHINE_ARCH is
set correctly.  Fixes MACHINE_ARCH issues reported on OpenBSD/amd64 by various
people.

diffstat:

 devel/bmake/files/main.c               |  16 ++++++++++++----
 devel/bmake/files/make-bootstrap.sh.in |   2 +-
 2 files changed, 13 insertions(+), 5 deletions(-)

diffs (57 lines):

diff -r 49f7964ae882 -r 19846fb838c6 devel/bmake/files/main.c
--- a/devel/bmake/files/main.c  Thu Nov 12 16:01:36 2020 +0000
+++ b/devel/bmake/files/main.c  Thu Nov 12 16:05:47 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.16 2020/05/24 21:10:17 nia Exp $    */
+/*     $NetBSD: main.c,v 1.17 2020/11/12 16:05:47 jperkin Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.16 2020/05/24 21:10:17 nia Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.17 2020/11/12 16:05:47 jperkin Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
@@ -81,7 +81,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: main.c,v 1.16 2020/05/24 21:10:17 nia Exp $");
+__RCSID("$NetBSD: main.c,v 1.17 2020/11/12 16:05:47 jperkin Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -1062,8 +1062,16 @@
 #endif
        }
 
+       /*
+        * Hardcode default pkgsrc MACHINE_ARCH.  There is only one legitimate
+        * way to override the variable, and that is through the environment,
+        * handled above.  We need to use PKGSRC_MACHINE_ARCH as some OS define
+        * MACHINE_ARCH in their system headers.
+        */
        if (!machine_arch) {
-#if defined(MAKE_NATIVE) && defined(HAVE_SYSCTL) && defined(CTL_HW) && defined(HW_MACHINE_ARCH)
+#if defined(PKGSRC_MACHINE_ARCH)
+           machine_arch = PKGSRC_MACHINE_ARCH;
+#elif defined(MAKE_NATIVE) && defined(HAVE_SYSCTL) && defined(CTL_HW) && defined(HW_MACHINE_ARCH)
            static char machine_arch_buf[sizeof(utsname.machine)];
            int mib[2] = { CTL_HW, HW_MACHINE_ARCH };
            size_t len = sizeof(machine_arch_buf);
diff -r 49f7964ae882 -r 19846fb838c6 devel/bmake/files/make-bootstrap.sh.in
--- a/devel/bmake/files/make-bootstrap.sh.in    Thu Nov 12 16:01:36 2020 +0000
+++ b/devel/bmake/files/make-bootstrap.sh.in    Thu Nov 12 16:05:47 2020 +0000
@@ -16,7 +16,7 @@
 MAKE_VERSION=@_MAKE_VERSION@
 
 MDEFS="-DMAKE_VERSION=\"$MAKE_VERSION\" \
--D@force_machine@MACHINE=\"@machine@\" -DMACHINE_ARCH=\"@machine_arch@\" \
+-D@force_machine@MACHINE=\"@machine@\" -DPKGSRC_MACHINE_ARCH=\"@machine_arch@\" \
 -D_PATH_DEFSYSPATH=\"${DEFAULT_SYS_PATH}\""
 
 



Home | Main Index | Thread Index | Old Index