aboutsummaryrefslogtreecommitdiffstats
path: root/main/libc0.9.32
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-07-05 07:40:51 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-07-05 07:40:51 +0000
commit049753c09143a597a6b1cf15380d9a4271120fb7 (patch)
treeaaf3b36e81efb073d9409822d4cccfa7926bc079 /main/libc0.9.32
parentef170b15f32a55a84dd1bd725e440f918c5080c0 (diff)
downloadaports-049753c09143a597a6b1cf15380d9a4271120fb7.tar.bz2
aports-049753c09143a597a6b1cf15380d9a4271120fb7.tar.xz
main/libc0.9.32: fix/workaround posix_fallocate for x86
Might be a gcc bug, but the generated assembly code was broke. ebp was supposed to be set to zero but it was not. We work around it by allowing use of immedate values as the 6th syscall arg. Then gcc don't need to use a memory reference.
Diffstat (limited to 'main/libc0.9.32')
-rw-r--r--main/libc0.9.32/APKBUILD4
-rw-r--r--main/libc0.9.32/posix_fallocate-fix.patch29
2 files changed, 32 insertions, 1 deletions
diff --git a/main/libc0.9.32/APKBUILD b/main/libc0.9.32/APKBUILD
index b10c8d9fbe..a35750cc55 100644
--- a/main/libc0.9.32/APKBUILD
+++ b/main/libc0.9.32/APKBUILD
@@ -4,7 +4,7 @@ pkgname=libc$_abiver
_gitver=
pkgver=0.9.33.2
_ver=${pkgver/_/-}
-pkgrel=4
+pkgrel=5
pkgdesc="C library for developing embedded Linux systems"
url=http://uclibc.org
license="LGPL-2"
@@ -36,6 +36,7 @@ eventfd.patch
uClibc-0.9.33-avahi.patch
0001-libc-add-posix_fallocate.patch
pread.patch
+ posix_fallocate-fix.patch
uclibcconfig.x86
uclibcconfig.x86_64
@@ -145,6 +146,7 @@ a86eb40e8aca531a1cfee5faff3c53d4 eventfd.patch
d91fcb785ae14632a4ea8fa03ba0236f uClibc-0.9.33-avahi.patch
08297e76052108d95303efe7d8745444 0001-libc-add-posix_fallocate.patch
1cc5c5f3f1d2a66c0ab0f8585627faa9 pread.patch
+a93a0e50e73bb6e8d8abf6e4340378b6 posix_fallocate-fix.patch
ce8a33a31f5a53031fbad8b1d1b66d44 uclibcconfig.x86
e861a17baa541accf4d4d39a98d74c32 uclibcconfig.x86_64
ce8a33a31f5a53031fbad8b1d1b66d44 uclibcconfig.i486
diff --git a/main/libc0.9.32/posix_fallocate-fix.patch b/main/libc0.9.32/posix_fallocate-fix.patch
new file mode 100644
index 0000000000..3ff28a49e2
--- /dev/null
+++ b/main/libc0.9.32/posix_fallocate-fix.patch
@@ -0,0 +1,29 @@
+--- ./libc/sysdeps/linux/common/posix_fallocate.c.orig
++++ ./libc/sysdeps/linux/common/posix_fallocate.c
+@@ -22,11 +22,10 @@
+ uint32_t off_low = offset;
+ uint32_t len_low = len;
+ /* may assert that these >>31 are 0 */
+- uint32_t zero = 0;
+ INTERNAL_SYSCALL_DECL(err);
+ ret = (int) (INTERNAL_SYSCALL(fallocate, err, 6, fd, 0,
+- __LONG_LONG_PAIR (zero, off_low),
+- __LONG_LONG_PAIR (zero, len_low)));
++ __LONG_LONG_PAIR (0, off_low),
++ __LONG_LONG_PAIR (0, len_low)));
+ # elif __WORDSIZE == 64
+ INTERNAL_SYSCALL_DECL(err);
+ ret = (int) (INTERNAL_SYSCALL(fallocate, err, 4, fd, 0, offset, len));
+diff --git a/libc/sysdeps/linux/i386/bits/syscalls.h b/libc/sysdeps/linux/i386/bits/syscalls.h
+index 9fb4f35..566b5ac 100644
+--- a/libc/sysdeps/linux/i386/bits/syscalls.h
++++ b/libc/sysdeps/linux/i386/bits/syscalls.h
+@@ -136,7 +136,7 @@ __asm__ (
+ #define ASMFMT_5(arg1, arg2, arg3, arg4, arg5) \
+ , "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5)
+ #define ASMFMT_6(arg1, arg2, arg3, arg4, arg5, arg6) \
+- , "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5), "m" (arg6)
++ , "a" (arg1), "c" (arg2), "d" (arg3), "S" (arg4), "D" (arg5), "g" (arg6)
+
+ #else /* !PIC */
+