[patch] 1.2.5: Don't use `uname' when cross-compiling

Maciej W. Rozycki macro at linux-mips.org
Mon Aug 2 14:05:41 CEST 2004


Hello,

 Using `uname' to retrieve information about the host system makes no
sense when cross-compiling as the command provides information about the
build system which is different in this case.  Here is a fix.

2004-08-02  Maciej W. Rozycki  <macro at linux-mips.org>

	* configure.ac: Don't call `uname' when cross-compiling.
	* configure: Regenerate.

 Please apply,

  Maciej

gnupg-1.2.4-cross.patch
diff -up --recursive --new-file gnupg-1.2.4.macro/configure.ac gnupg-1.2.4/configure.ac
--- gnupg-1.2.4.macro/configure.ac	2003-12-23 19:20:58.000000000 +0000
+++ gnupg-1.2.4/configure.ac	2004-06-10 21:10:02.000000000 +0000
@@ -468,7 +468,10 @@ case "${target}" in
         PRINTABLE_OS_NAME="GNU/Linux"
         ;;
     *)
-        PRINTABLE_OS_NAME=`uname -s || echo "Unknown"`
+	PRINTABLE_OS_NAME="Unknown"
+	if test "$cross_compiling" = no; then
+		PRINTABLE_OS_NAME=`uname -s 2>/dev/null || echo "Unknown"`
+	fi
         test "$PRINTABLE_OS_NAME" = "Linux" && PRINTABLE_OS_NAME="GNU/Linux"
         ;;
 esac



More information about the Gnupg-devel mailing list