summaryrefslogtreecommitdiff
path: root/packages/linux/linux-efika-2.6.20.20/weaken-div64_32-symbol.patch
diff options
context:
space:
mode:
authorLeon Woestenberg <leon.woestenberg@gmail.com>2007-10-07 14:43:24 +0000
committerLeon Woestenberg <leon.woestenberg@gmail.com>2007-10-07 14:43:24 +0000
commit743f5cdaf5ccb9fefc7c3ac68ea4676637b8782f (patch)
tree8a5755a27d361e97a04c860a6c5f3e118d4d533b /packages/linux/linux-efika-2.6.20.20/weaken-div64_32-symbol.patch
parente97d4de56f1118f4b6f8914b76033b5cb7ed0913 (diff)
linux-efika: Moved from 2.6.20.11-cfs to .20.20-cfs. Needed div64_32() symbol weakening in lib.
Diffstat (limited to 'packages/linux/linux-efika-2.6.20.20/weaken-div64_32-symbol.patch')
-rw-r--r--packages/linux/linux-efika-2.6.20.20/weaken-div64_32-symbol.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/packages/linux/linux-efika-2.6.20.20/weaken-div64_32-symbol.patch b/packages/linux/linux-efika-2.6.20.20/weaken-div64_32-symbol.patch
new file mode 100644
index 0000000000..bd6fb98f61
--- /dev/null
+++ b/packages/linux/linux-efika-2.6.20.20/weaken-div64_32-symbol.patch
@@ -0,0 +1,23 @@
+2.6.20.20 with CFS fails to compile for powerpc, because this arch already has
+its assembly-optimized __div64_32() implementation, so linking fails due to
+two symbols.
+
+The same issue appeared on the s390 arch, so this patch is inspired by it.
+
+http://lkml.org/lkml/2007/4/11/24
+
+Leon 'likewise' Woestenberg <leonw@mailcan.com>
+
+Index: linux-2.6.20/lib/div64.c
+===================================================================
+--- linux-2.6.20.orig/lib/div64.c 2007-10-07 16:19:38.000000000 +0200
++++ linux-2.6.20/lib/div64.c 2007-10-07 16:20:15.000000000 +0200
+@@ -23,7 +23,7 @@
+ /* Not needed on 64bit architectures */
+ #if BITS_PER_LONG == 32
+
+-uint32_t __div64_32(uint64_t *n, uint32_t base)
++uint32_t __attribute__((weak)) __div64_32(uint64_t *n, uint32_t base)
+ {
+ uint64_t rem = *n;
+ uint64_t b = base;