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

Bug#602768: freebsd-make for non-kfreebsd systems

Package: freebsd-buildutils
Version: 8.1-1
Severity: wishlist
Tags: patch

This fixes a problem with freebsd-make on non-kfreebsd systems.  Currently
it obtains architecture info from uname() in runtime, which doesn't always
match with the names expected by FreeBSD build system.

When trying to build kFreeBSD on GNU/Linux, this results in "no such
directory" errors for paths containing "x86_64" (instead of "amd64").

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=ca_AD.UTF-8, LC_CTYPE=ca_AD.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages freebsd-buildutils depends on:
ii  bsdmainutils                8.0.13       collection of more utilities from 
ii  libbsd0                     0.2.0-1      utility functions from BSD systems
ii  libc6                       2.11.2-6     Embedded GNU C Library: Shared lib
ii  make                        3.81-8       An utility for Directing compilati
ii  original-awk                2010-05-23-1 The original awk described in "The
ii  patchutils                  0.3.1-2      Utilities to work with patches
ii  unzip                       6.0-4        De-archiver for .zip files

freebsd-buildutils recommends no packages.

freebsd-buildutils suggests no packages.

-- no debconf information
diff -Nur freebsd-buildutils-8.1/src/usr.bin/make/main.c freebsd-buildutils-8.1.new/src/usr.bin/make/main.c
--- freebsd-buildutils-8.1/src/usr.bin/make/main.c	2009-04-07 21:49:38.000000000 +0200
+++ freebsd-buildutils-8.1.new/src/usr.bin/make/main.c	2010-11-07 22:22:41.000000000 +0100
@@ -943,11 +943,7 @@
 	 * run-time.
 	if (machine == NULL) {
-		static struct utsname utsname;
-		if (uname(&utsname) == -1)
-			err(2, "uname");
-		machine = utsname.machine;
+		machine = MACHINE_ARCH;
 	if ((machine_arch = getenv("MACHINE_ARCH")) == NULL) {

Reply to: