summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/kbd/files/kbd-1.12-xcompile.patch')
-rw-r--r--sys-apps/kbd/files/kbd-1.12-xcompile.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/sys-apps/kbd/files/kbd-1.12-xcompile.patch b/sys-apps/kbd/files/kbd-1.12-xcompile.patch
new file mode 100644
index 000000000000..d5d50bf365ef
--- /dev/null
+++ b/sys-apps/kbd/files/kbd-1.12-xcompile.patch
@@ -0,0 +1,18 @@
+--- configure 2004-01-03 08:53:39.000000000 -0600
++++ configure 2006-06-04 23:50:41.000000000 -0500
+@@ -129,8 +129,13 @@
+ #
+ # 0. Figure out architecture (one of i386, alpha, sparc, arm, m68k, mips)
+ #
+-ARCH=`uname -m | sed s/i.86/i386/`
+-echo "ARCH=$ARCH" >> make_include
++HOST_ARCH=`uname -m`
++TARGET_ARCH=`$CC -dumpmachine | awk -F- '{print $1}'`
++# Don't allow ARCH="sparc" for sparc64 targets with 32-bit userland
++if (test "$HOST_ARCH" = "sparc64" && test "$TARGET_ARCH" = "sparc") ; then
++ TARGET_ARCH="sparc64"
++fi
++echo "ARCH=${TARGET_ARCH/i?86/i386}" >> make_include
+
+ #
+ # 1. Do we have <locale.h>?