summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-07-07 15:09:10 +0000
committerjuhosg <juhosg@3c298f89-4303-0410-b956-a3cf2f4a3e73>2009-07-07 15:09:10 +0000
commitae2077bf16daacaf4ff47bd474969f42899003f1 (patch)
tree9f5b1906c8da71d974e46692437ac932eb704b3a
parentc46ada5677763a31e1ca8f2589efd6bbcd0f99a7 (diff)
[toolchain] uClibc: fix build error on ARM targets (closes #5473)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@16735 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--toolchain/uClibc/patches-0.9.30.1/400-gcc4.4-fixes.patch62
1 files changed, 38 insertions, 24 deletions
diff --git a/toolchain/uClibc/patches-0.9.30.1/400-gcc4.4-fixes.patch b/toolchain/uClibc/patches-0.9.30.1/400-gcc4.4-fixes.patch
index 6292457e7..1b6eee830 100644
--- a/toolchain/uClibc/patches-0.9.30.1/400-gcc4.4-fixes.patch
+++ b/toolchain/uClibc/patches-0.9.30.1/400-gcc4.4-fixes.patch
@@ -818,30 +818,6 @@ index d912a06..0be57bf 100644
while (*new_path == '/' && new_path > got_path)
new_path--;
--
-The test here is a constant expression and will compile out.
-For platforms that don't need the shift the code gets slightly smaller
-and simpler, for those that do the result is unchanged.
-
-Signed-off-by: Ron Lee <ron@debian.org>
----
- libc/sysdeps/linux/arm/posix_fadvise.c | 6 ++++--
- 1 files changed, 4 insertions(+), 2 deletions(-)
-
-Index: uClibc-0.9.30.1/libc/sysdeps/linux/arm/posix_fadvise.c
-===================================================================
---- uClibc-0.9.30.1.orig/libc/sysdeps/linux/arm/posix_fadvise.c 2007-05-31 10:21:38.000000000 +0200
-+++ uClibc-0.9.30.1/libc/sysdeps/linux/arm/posix_fadvise.c 2009-07-06 21:19:18.000000000 +0200
-@@ -18,8 +18,8 @@
- {
- INTERNAL_SYSCALL_DECL (err);
- int ret = INTERNAL_SYSCALL (arm_fadvise64_64, err, 6, fd, advise,
-- __LONG_LONG_PAIR ((long)(offset >> 32), (long)offset),
-- __LONG_LONG_PAIR ((long)(len >> 32), (long)len));
-+ __LONG_LONG_PAIR (HIGH_BITS(offset), (long)offset),
-+ __LONG_LONG_PAIR (HIGH_BITS(len), (long)len));
-
- if (INTERNAL_SYSCALL_ERROR_P (ret, err))
- return INTERNAL_SYSCALL_ERRNO (ret, err);
Signed-off-by: Ron Lee <ron@debian.org>
---
ldso/ldso/dl-elf.c | 4 +++-
@@ -900,3 +876,41 @@ Index: uClibc-0.9.30.1/libc/inet/getaddrinfo.c
}
}
+From 8ee834680d39677a60e26a0de4ece2f0c1ebbde2 Mon Sep 17 00:00:00 2001
+From: Ron <ron@debian.org>
+Date: Sat, 27 Jun 2009 04:44:27 +0930
+Subject: [PATCH] Avoid warnings about shifting more bits than we have
+
+The test here is a constant expression and will compile out.
+For platforms that don't need the shift the code gets slightly smaller
+and simpler, for those that do the result is unchanged.
+
+Signed-off-by: Ron Lee <ron@debian.org>
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ libc/sysdeps/linux/arm/posix_fadvise.c | 6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+--- a/libc/sysdeps/linux/arm/posix_fadvise.c
++++ b/libc/sysdeps/linux/arm/posix_fadvise.c
+@@ -10,6 +10,9 @@
+ #include <sys/syscall.h>
+ #include <fcntl.h>
+ #if defined __NR_arm_fadvise64_64
++
++#define HIGH_BITS(x) (sizeof(x) > 4 ? (x) >> 32 : 0)
++
+ /* This is for the ARM version of fadvise64_64 which swaps the params
+ * * about to avoid having ABI compat issues
+ * */
+@@ -18,8 +21,8 @@
+ {
+ INTERNAL_SYSCALL_DECL (err);
+ int ret = INTERNAL_SYSCALL (arm_fadvise64_64, err, 6, fd, advise,
+- __LONG_LONG_PAIR ((long)(offset >> 32), (long)offset),
+- __LONG_LONG_PAIR ((long)(len >> 32), (long)len));
++ __LONG_LONG_PAIR (HIGH_BITS(offset), (long)offset),
++ __LONG_LONG_PAIR (HIGH_BITS(len), (long)len));
+
+ if (INTERNAL_SYSCALL_ERROR_P (ret, err))
+ return INTERNAL_SYSCALL_ERRNO (ret, err);