[Glibc-bsd-commits] r3996 - in trunk/freebsd-buildutils/debian: . patches

Robert Millan rmh at alioth.debian.org
Sat Jan 21 10:20:22 UTC 2012


Author: rmh
Date: 2012-01-21 10:20:22 +0000 (Sat, 21 Jan 2012)
New Revision: 3996

Added:
   trunk/freebsd-buildutils/debian/patches/make_foreign.diff
Removed:
   trunk/freebsd-buildutils/debian/patches/10_non_kfreebsd.diff
Modified:
   trunk/freebsd-buildutils/debian/changelog
   trunk/freebsd-buildutils/debian/patches/00_upstream.diff
   trunk/freebsd-buildutils/debian/patches/series
Log:
Replace 10_non_kfreebsd.diff with equivalent patch from upstream HEAD.

Modified: trunk/freebsd-buildutils/debian/changelog
===================================================================
--- trunk/freebsd-buildutils/debian/changelog	2012-01-21 00:24:44 UTC (rev 3995)
+++ trunk/freebsd-buildutils/debian/changelog	2012-01-21 10:20:22 UTC (rev 3996)
@@ -1,3 +1,10 @@
+freebsd-buildutils (9.0-3) UNRELEASED; urgency=low
+
+  * Replace 10_non_kfreebsd.diff with equivalent patch from upstream
+    HEAD.
+
+ -- Robert Millan <rmh at debian.org>  Sat, 21 Jan 2012 11:20:12 +0100
+
 freebsd-buildutils (9.0-2) unstable; urgency=low
 
   * Add elf_common.h to local includes to fix FTBFS on GNU/Linux.

Modified: trunk/freebsd-buildutils/debian/patches/00_upstream.diff
===================================================================
--- trunk/freebsd-buildutils/debian/patches/00_upstream.diff	2012-01-21 00:24:44 UTC (rev 3995)
+++ trunk/freebsd-buildutils/debian/patches/00_upstream.diff	2012-01-21 10:20:22 UTC (rev 3996)
@@ -1,21 +1,3 @@
---- a/src/usr.bin/make/main.c
-+++ b/src/usr.bin/make/main.c
-@@ -929,6 +929,7 @@
- 	}
- #endif
- 
-+#ifdef __FreeBSD__
- 	/*
- 	 * Get the name of this type of MACHINE from utsname
- 	 * so we can share an executable for similar machines.
-@@ -952,6 +953,7 @@
- 		machine_arch = "unknown";
- #endif
- 	}
-+#endif
- 
- 	/*
- 	 * Set machine_cpu to the minumum supported CPU revision based
 --- a/src/usr.sbin/mtree/compare.c
 +++ b/src/usr.sbin/mtree/compare.c
 @@ -176,21 +176,22 @@

Deleted: trunk/freebsd-buildutils/debian/patches/10_non_kfreebsd.diff
===================================================================
--- trunk/freebsd-buildutils/debian/patches/10_non_kfreebsd.diff	2012-01-21 00:24:44 UTC (rev 3995)
+++ trunk/freebsd-buildutils/debian/patches/10_non_kfreebsd.diff	2012-01-21 10:20:22 UTC (rev 3996)
@@ -1,41 +0,0 @@
---- a/src/usr.bin/make/main.c
-+++ b/src/usr.bin/make/main.c
-@@ -932,7 +932,10 @@
- 	}
- #endif
- 
--#ifdef __FreeBSD__
-+#ifndef MACHINE_ARCH
-+#define MACHINE_ARCH "unknown"
-+#endif
-+
- 	/*
- 	 * Get the name of this type of MACHINE from utsname
- 	 * so we can share an executable for similar machines.
-@@ -942,21 +945,21 @@
- 	 * run-time.
- 	 */
- 	if ((machine = getenv("MACHINE")) == NULL) {
-+// __FreeBSD_kernel__
-+#ifdef __FreeBSD__
- 		static struct utsname utsname;
- 
- 		if (uname(&utsname) == -1)
- 			err(2, "uname");
- 		machine = utsname.machine;
-+#else
-+		machine = MACHINE_ARCH;
-+#endif
- 	}
- 
- 	if ((machine_arch = getenv("MACHINE_ARCH")) == NULL) {
--#ifdef MACHINE_ARCH
- 		machine_arch = MACHINE_ARCH;
--#else
--		machine_arch = "unknown";
--#endif
- 	}
--#endif
- 
- 	/*
- 	 * Set machine_cpu to the minumum supported CPU revision based

Added: trunk/freebsd-buildutils/debian/patches/make_foreign.diff
===================================================================
--- trunk/freebsd-buildutils/debian/patches/make_foreign.diff	                        (rev 0)
+++ trunk/freebsd-buildutils/debian/patches/make_foreign.diff	2012-01-21 10:20:22 UTC (rev 3996)
@@ -0,0 +1,42 @@
+
+Map foreign architecture names to FreeBSD naming convention.
+
+Patch from upstream (SVN rev 230392).
+
+--- a/src/usr.bin/make/main.c
++++ b/src/usr.bin/make/main.c
+@@ -146,6 +146,14 @@
+ time_t		now;		/* Time at start of make */
+ struct GNode	*DEFAULT;	/* .DEFAULT node */
+ 
++static struct {
++	const char *foreign_name;
++	const char *freebsd_name;
++} arch_aliases[] = {
++	{ "x86_64", "amd64" },
++	{ "mipsel", "mips" },
++};
++
+ /**
+  * Exit with usage message.
+  */
+@@ -942,10 +950,19 @@
+ 	 */
+ 	if ((machine = getenv("MACHINE")) == NULL) {
+ 		static struct utsname utsname;
++		unsigned int i;
+ 
+ 		if (uname(&utsname) == -1)
+ 			err(2, "uname");
+ 		machine = utsname.machine;
++
++		/* Canonicalize non-FreeBSD naming conventions */
++		for (i = 0; i < sizeof(arch_aliases)
++		     / sizeof(arch_aliases[0]); i++)
++			if (!strcmp(machine, arch_aliases[i].foreign_name)) {
++				machine = arch_aliases[i].freebsd_name;
++				break;
++			}
+ 	}
+ 
+ 	if ((machine_arch = getenv("MACHINE_ARCH")) == NULL) {

Modified: trunk/freebsd-buildutils/debian/patches/series
===================================================================
--- trunk/freebsd-buildutils/debian/patches/series	2012-01-21 00:24:44 UTC (rev 3995)
+++ trunk/freebsd-buildutils/debian/patches/series	2012-01-21 10:20:22 UTC (rev 3996)
@@ -1,3 +1,7 @@
+# Patches from upstream
+make_foreign.diff
+
+# Other patches
 00_upstream.diff
 01_make_fixes.diff
 02_libbsd.diff
@@ -6,7 +10,6 @@
 05_disable_hardlinks.diff
 08_maxpathlen.diff
 09_ports_path.diff
-10_non_kfreebsd.diff
 15_manpages_gzip.diff
 16_bootstrap_pmake.diff
 #17_multiarch.diff




More information about the Glibc-bsd-commits mailing list