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

Robert Millan rmh at alioth.debian.org
Tue Jul 5 15:57:14 UTC 2011


Author: rmh
Date: 2011-07-05 15:57:14 +0000 (Tue, 05 Jul 2011)
New Revision: 3537

Added:
   trunk/freebsd-buildutils/debian/patches/21_endian.diff
Modified:
   trunk/freebsd-buildutils/debian/changelog
   trunk/freebsd-buildutils/debian/patches/series
Log:
  * 21_endian.diff: If neither TARGET_BIG_ENDIAN or TARGET_LITTLE_ENDIAN are
    defined, default to native compilation (fixes FTBFS on mips and armeb).

Modified: trunk/freebsd-buildutils/debian/changelog
===================================================================
--- trunk/freebsd-buildutils/debian/changelog	2011-07-04 21:31:54 UTC (rev 3536)
+++ trunk/freebsd-buildutils/debian/changelog	2011-07-05 15:57:14 UTC (rev 3537)
@@ -1,3 +1,10 @@
+freebsd-buildutils (8.2-6) UNRELEASED; urgency=low
+
+  * 21_endian.diff: If neither TARGET_BIG_ENDIAN or TARGET_LITTLE_ENDIAN are
+    defined, default to native compilation (fixes FTBFS on mips and armeb).
+
+ -- Robert Millan <rmh at debian.org>  Tue, 05 Jul 2011 17:56:37 +0200
+
 freebsd-buildutils (8.2-5) unstable; urgency=low
 
   * Disable libbsd overlay untill #630907 is fixed.  (Closes: #632600)

Added: trunk/freebsd-buildutils/debian/patches/21_endian.diff
===================================================================
--- trunk/freebsd-buildutils/debian/patches/21_endian.diff	                        (rev 0)
+++ trunk/freebsd-buildutils/debian/patches/21_endian.diff	2011-07-05 15:57:14 UTC (rev 3537)
@@ -0,0 +1,42 @@
+
+If neither TARGET_BIG_ENDIAN or TARGET_LITTLE_ENDIAN are defined,
+default to native compilation.
+
+FIXME: This only checks for variable definition (i.e. via environment), not
+for command-line assignment parameters.
+
+--- a/src/usr.bin/make/main.c
++++ b/src/usr.bin/make/main.c
+@@ -68,6 +68,7 @@
+ #endif
+ #include <sys/time.h>
+ #include <bsd/sys/queue.h>
++#include <bsd/sys/endian.h>
+ #include <bsd/err.h>
+ #include <sys/resource.h>
+ #include <sys/utsname.h>
+@@ -865,6 +866,7 @@
+ 	const char *machine_arch;
+ 	const char *machine_multiarch;
+ 	const char *machine_cpu;
++	int machine_endian_little;
+ 	Boolean outOfDate = TRUE;	/* FALSE if all targets up to date */
+ 	const char *p;
+ 	const char *pathp;
+@@ -1021,6 +1023,16 @@
+ 	Var_SetGlobal("MACHINE_ARCH", machine_arch);
+ 	Var_SetGlobal("MACHINE_MULTIARCH", machine_multiarch);
+ 	Var_SetGlobal("MACHINE_CPU", machine_cpu);
++	if (!Var_Exists("TARGET_BIG_ENDIAN", VAR_GLOBAL) && !Var_Exists("TARGET_LITTLE_ENDIAN", VAR_GLOBAL)) {
++		/*
++		 * If neither TARGET_BIG_ENDIAN or TARGET_LITTLE_ENDIAN are defined,
++		 * default to native compilation.
++		 */
++		if (_BYTE_ORDER == _LITTLE_ENDIAN)
++			Var_SetGlobal("TARGET_LITTLE_ENDIAN", "true");
++		else
++			Var_SetGlobal("TARGET_BIG_ENDIAN", "true");
++	}
+ #ifdef MAKE_VERSION
+ 	Var_SetGlobal("MAKE_VERSION", MAKE_VERSION);
+ #endif

Modified: trunk/freebsd-buildutils/debian/patches/series
===================================================================
--- trunk/freebsd-buildutils/debian/patches/series	2011-07-04 21:31:54 UTC (rev 3536)
+++ trunk/freebsd-buildutils/debian/patches/series	2011-07-05 15:57:14 UTC (rev 3537)
@@ -13,3 +13,4 @@
 18_fix_sysdir.diff
 19_fix_cmd_pathnames.diff
 20_libbsd_overlay.diff
+21_endian.diff




More information about the Glibc-bsd-commits mailing list