summaryrefslogtreecommitdiff
path: root/libc/ports
diff options
context:
space:
mode:
Diffstat (limited to 'libc/ports')
-rw-r--r--libc/ports/ChangeLog.alpha8
-rw-r--r--libc/ports/ChangeLog.arm16
-rw-r--r--libc/ports/ChangeLog.hppa10
-rw-r--r--libc/ports/ChangeLog.m68k15
-rw-r--r--libc/ports/ChangeLog.mips18
-rw-r--r--libc/ports/ChangeLog.tile15
-rw-r--r--libc/ports/sysdeps/mips/fpu_control.h2
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/alpha/Makefile1
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/alpha/fdatasync.c65
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h5
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h5
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/arm/ldsodefs.h18
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h2
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h5
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/mips/mips64/fxstat64.c45
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/mips/mips64/lxstat64.c44
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/mips/mips64/xstat64.c45
-rw-r--r--libc/ports/sysdeps/unix/sysv/linux/tile/kernel-features.h3
18 files changed, 303 insertions, 19 deletions
diff --git a/libc/ports/ChangeLog.alpha b/libc/ports/ChangeLog.alpha
index 266f42d97..19edf6f13 100644
--- a/libc/ports/ChangeLog.alpha
+++ b/libc/ports/ChangeLog.alpha
@@ -1,3 +1,11 @@
+2012-08-27 Mike Frysinger <vapier@gentoo.org>
+
+ [BZ #5400]
+ * sysdeps/unix/sysv/linux/alpha/Makefile (CFLAGS-fdatasync.c): Define.
+ * sysdeps/unix/sysv/linux/alpha/fdatasync.c: New file
+ * sysdeps/unix/sysv/linux/alpha/kernel-features.h
+ (__ASSUME_FDATASYNC): Define.
+
2012-08-16 Carlos O'Donell <carlos_odonell@mentor.com>
* sysdeps/alpha/ldsodefs.h (ARCH_PLTENTER_MEMBERS)
diff --git a/libc/ports/ChangeLog.arm b/libc/ports/ChangeLog.arm
index 359bd0d68..1fae5f72f 100644
--- a/libc/ports/ChangeLog.arm
+++ b/libc/ports/ChangeLog.arm
@@ -1,3 +1,19 @@
+2012-08-27 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/kernel-features.h
+ (__ASSUME_STAT64_SYSCALL): Remove.
+
+2012-08-23 Steve McIntyre <steve.mcintyre@linaro.org>
+
+ * sysdeps/unix/sysv/linux/arm/ldsodefs.h (VALID_FLOAT_ABI): Define
+ depending on __ARM_PCS_VFP.
+ (VALID_ELF_HEADER): Also check VALID_FLOAT_ABI.
+
+2012-08-20 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/arm/kernel-features.h
+ (__ASSUME_MMAP2_SYSCALL): Remove.
+
2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
* sysdeps/arm/nptl/pthread_spin_lock.c: Use generic code.
diff --git a/libc/ports/ChangeLog.hppa b/libc/ports/ChangeLog.hppa
index a28fbceb3..2de923a32 100644
--- a/libc/ports/ChangeLog.hppa
+++ b/libc/ports/ChangeLog.hppa
@@ -1,3 +1,13 @@
+2012-08-27 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/hppa/kernel-features.h
+ (__ASSUME_STAT64_SYSCALL): Remove.
+
+2012-08-20 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/hppa/kernel-features.h
+ (__ASSUME_MMAP2_SYSCALL): Remove.
+
2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
* sysdeps/hppa/nptl/pthread_spin_lock.c: Use generic code.
diff --git a/libc/ports/ChangeLog.m68k b/libc/ports/ChangeLog.m68k
index 62a8eb3bb..5163cf3f7 100644
--- a/libc/ports/ChangeLog.m68k
+++ b/libc/ports/ChangeLog.m68k
@@ -1,3 +1,18 @@
+2012-08-27 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/m68k/kernel-features.h
+ (__ASSUME_STAT64_SYSCALL): Remove.
+
+2012-08-21 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/m68k/kernel-features.h
+ (__ASSUME_FADVISE64_64_SYSCALL): Remove.
+
+2012-08-20 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/m68k/kernel-features.h
+ (__ASSUME_MMAP2_SYSCALL): Remove.
+
2012-08-15 Maxim Kuvyrkov <maxim@codesourcery.com>
* sysdeps/m68k/nptl/pthread_spin_lock.c: Use generic code.
diff --git a/libc/ports/ChangeLog.mips b/libc/ports/ChangeLog.mips
index dfab023ee..8c41753e5 100644
--- a/libc/ports/ChangeLog.mips
+++ b/libc/ports/ChangeLog.mips
@@ -1,3 +1,21 @@
+2012-08-27 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/kernel-features.h
+ (__ASSUME_STAT64_SYSCALL): Remove.
+
+2012-08-27 Guido Guenther <agx@sigxcpu.org>
+
+ * sysdeps/mips/fpu_control.h (_FPU_RESERVED): Set bit 23.
+
+2012-08-22 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mips/kernel-features.h [_MIPS_SIM ==
+ _ABIO32] (__ASSUME_STAT64_SYSCALL): Define.
+ * sysdeps/unix/sysv/linux/mips/mips64/fxstat64.c: New file. Based
+ on version from ../sysdeps/unix/sysv/linux/.
+ * sysdeps/unix/sysv/linux/mips/mips64/lxstat64.c: Likewise.
+ * sysdeps/unix/sysv/linux/mips/mips64/xstat64.c: Likewise.
+
2012-08-16 Carlos O'Donell <carlos_odonell@mentor.com>
* sysdeps/mips/ldsodefs.h (ARCH_PLTENTER_MEMBERS)
diff --git a/libc/ports/ChangeLog.tile b/libc/ports/ChangeLog.tile
index 53afc6987..0be61921e 100644
--- a/libc/ports/ChangeLog.tile
+++ b/libc/ports/ChangeLog.tile
@@ -1,3 +1,18 @@
+2012-08-27 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/tile/kernel-features.h
+ (__ASSUME_STAT64_SYSCALL): Remove.
+
+2012-08-21 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/tile/kernel-features.h
+ (__ASSUME_FADVISE64_64_SYSCALL): Remove.
+
+2012-08-20 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/tile/kernel-features.h
+ (__ASSUME_MMAP2_SYSCALL): Remove.
+
2012-08-14 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/tile/kernel-features.h
diff --git a/libc/ports/sysdeps/mips/fpu_control.h b/libc/ports/sysdeps/mips/fpu_control.h
index e9c859a4e..7307d030e 100644
--- a/libc/ports/sysdeps/mips/fpu_control.h
+++ b/libc/ports/sysdeps/mips/fpu_control.h
@@ -85,7 +85,7 @@ extern fpu_control_t __fpu_control;
#define _FPU_RC_UP 0x2
#define _FPU_RC_DOWN 0x3
-#define _FPU_RESERVED 0xfe3c0000 /* Reserved bits in cw */
+#define _FPU_RESERVED 0xfebc0000 /* Reserved bits in cw */
/* The fdlibm code requires strict IEEE double precision arithmetic,
diff --git a/libc/ports/sysdeps/unix/sysv/linux/alpha/Makefile b/libc/ports/sysdeps/unix/sysv/linux/alpha/Makefile
index f64f23fd7..9676feea9 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/alpha/Makefile
+++ b/libc/ports/sysdeps/unix/sysv/linux/alpha/Makefile
@@ -20,6 +20,7 @@ sysdep_routines += osf_select osf_gettimeofday osf_settimeofday \
# Support old ipc control
sysdep_routines += oldmsgctl oldsemctl oldshmctl
+CFLAGS-fdatasync.c = -fexceptions
CFLAGS-ioperm.c = -Wa,-mev6
endif
diff --git a/libc/ports/sysdeps/unix/sysv/linux/alpha/fdatasync.c b/libc/ports/sysdeps/unix/sysv/linux/alpha/fdatasync.c
new file mode 100644
index 000000000..10f503578
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/alpha/fdatasync.c
@@ -0,0 +1,65 @@
+/* fdatasync -- synchronize at least the data part of a file with
+ the underlying media. Linux version.
+
+ Copyright (C) 2007-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <unistd.h>
+
+#include <sysdep-cancel.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+#include <kernel-features.h>
+
+static int
+do_fdatasync (int fd)
+{
+#ifdef __ASSUME_FDATASYNC
+ return INLINE_SYSCALL (fdatasync, 1, fd);
+#elif defined __NR_fdatasync
+ static int __have_no_fdatasync;
+
+ if (!__builtin_expect (__have_no_fdatasync, 0))
+ {
+ int result = INLINE_SYSCALL (fdatasync, 1, fd);
+ if (__builtin_expect (result, 0) != -1 || errno != ENOSYS)
+ return result;
+
+ __have_no_fdatasync = 1;
+ }
+#endif
+ return INLINE_SYSCALL (fsync, 1, fd);
+}
+
+int
+__fdatasync (int fd)
+{
+ if (SINGLE_THREAD_P)
+ return do_fdatasync (fd);
+
+ int oldtype = LIBC_CANCEL_ASYNC ();
+
+ int result = do_fdatasync (fd);
+
+ LIBC_CANCEL_RESET (oldtype);
+
+ return result;
+}
+
+weak_alias (__fdatasync, fdatasync)
diff --git a/libc/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h b/libc/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h
index ee349bc93..9fb53798a 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h
+++ b/libc/ports/sysdeps/unix/sysv/linux/alpha/kernel-features.h
@@ -82,4 +82,9 @@
#undef __ASSUME_STATFS64
#define __ASSUME_STATFS64 0
+/* Support for fsyncdata was added for alpha after 2.6.21. */
+#if __LINUX_KERNEL_VERSION >= 0x020616
+# define __ASSUME_FDATASYNC 1
+#endif
+
#endif /* _KERNEL_FEATURES_H */
diff --git a/libc/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h b/libc/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
index b003b17b0..e13443dc3 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
+++ b/libc/ports/sysdeps/unix/sysv/linux/arm/kernel-features.h
@@ -20,11 +20,6 @@
/* The utimes syscall was added before 2.6.1. */
#define __ASSUME_UTIMES 1
-/* On ARM the mmap2/stat64/lstat64/fstat64 syscalls were introduced in
- 2.3.35. */
-#define __ASSUME_MMAP2_SYSCALL 1
-#define __ASSUME_STAT64_SYSCALL 1
-
/* The signal frame layout changed in 2.6.18. */
#if __LINUX_KERNEL_VERSION >= 132626
# define __ASSUME_SIGFRAME_V2 1
diff --git a/libc/ports/sysdeps/unix/sysv/linux/arm/ldsodefs.h b/libc/ports/sysdeps/unix/sysv/linux/arm/ldsodefs.h
index 8980bb199..d95886222 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/arm/ldsodefs.h
+++ b/libc/ports/sysdeps/unix/sysv/linux/arm/ldsodefs.h
@@ -27,10 +27,22 @@
#define EXTRA_OSABI ELFOSABI_ARM_AEABI
+#ifdef __ARM_PCS_VFP
+# define VALID_FLOAT_ABI(x) \
+ ((EF_ARM_EABI_VERSION ((x)) != EF_ARM_EABI_VER5) \
+ || !((x) & EF_ARM_ABI_FLOAT_SOFT))
+#else
+# define VALID_FLOAT_ABI(x) \
+ ((EF_ARM_EABI_VERSION ((x)) != EF_ARM_EABI_VER5) \
+ || !((x) & EF_ARM_ABI_FLOAT_HARD))
+#endif
+
+#undef VALID_ELF_HEADER
#define VALID_ELF_HEADER(hdr,exp,size) \
- (memcmp (hdr, exp, size) == 0 \
- || memcmp (hdr, expected2, size) == 0 \
- || memcmp (hdr, expected3, size) == 0)
+ ((memcmp (hdr, exp, size) == 0 \
+ || memcmp (hdr, expected2, size) == 0 \
+ || memcmp (hdr, expected3, size) == 0) \
+ && VALID_FLOAT_ABI (ehdr->e_flags))
#define VALID_ELF_OSABI(osabi) (osabi == ELFOSABI_SYSV \
|| osabi == EXTRA_OSABI \
|| osabi == ELFOSABI_LINUX)
diff --git a/libc/ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h b/libc/ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h
index 49ba55f7c..fb0e9c999 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h
+++ b/libc/ports/sysdeps/unix/sysv/linux/hppa/kernel-features.h
@@ -23,8 +23,6 @@
and expect the final version here. */
#define __ASSUME_32BITUIDS 1
#define __ASSUME_TRUNCATE64_SYSCALL 1
-#define __ASSUME_MMAP2_SYSCALL 1
-#define __ASSUME_STAT64_SYSCALL 1
#define __ASSUME_IPC64 1
#define __ASSUME_ST_INO_64_BIT 1
#define __ASSUME_GETDENTS64_SYSCALL 1
diff --git a/libc/ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h b/libc/ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h
index 5c68d7f1c..454b23f22 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h
+++ b/libc/ports/sysdeps/unix/sysv/linux/m68k/kernel-features.h
@@ -17,13 +17,8 @@
License along with the GNU C Library. If not, see
<http://www.gnu.org/licenses/>. */
-/* These features were surely available with 2.4.12. */
-#define __ASSUME_MMAP2_SYSCALL 1
-#define __ASSUME_STAT64_SYSCALL 1
-
/* Many syscalls were added in 2.6.10 for m68k. */
#define __ASSUME_UTIMES 1
-#define __ASSUME_FADVISE64_64_SYSCALL 1
#include_next <kernel-features.h>
diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/fxstat64.c b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/fxstat64.c
new file mode 100644
index 000000000..24b517e43
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/fxstat64.c
@@ -0,0 +1,45 @@
+/* fxstat64 using 64-bit MIPS fstat system call.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <sys/stat.h>
+#include <kernel_stat.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+#include <xstatconv.h>
+
+/* Get information about the file FD in BUF. */
+
+int
+__fxstat64 (int vers, int fd, struct stat64 *buf)
+{
+ int result;
+ struct kernel_stat kbuf;
+
+ result = INLINE_SYSCALL (fstat, 2, fd, __ptrvalue (&kbuf));
+ if (result == 0)
+ result = __xstat64_conv (vers, &kbuf, buf);
+
+ return result;
+}
+
+hidden_def (__fxstat64)
diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/lxstat64.c b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/lxstat64.c
new file mode 100644
index 000000000..71123f2bf
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/lxstat64.c
@@ -0,0 +1,44 @@
+/* lxstat64 using 64-bit MIPS lstat system call.
+ Copyright (C) 1997-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <sys/stat.h>
+#include <kernel_stat.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+#include <xstatconv.h>
+
+/* Get information about the file NAME in BUF. */
+int
+__lxstat64 (int vers, const char *name, struct stat64 *buf)
+{
+ int result;
+ struct kernel_stat kbuf;
+
+ result = INLINE_SYSCALL (lstat, 2, CHECK_STRING (name), __ptrvalue (&kbuf));
+ if (result == 0)
+ result = __xstat64_conv (vers, &kbuf, buf);
+
+ return result;
+}
+
+hidden_def (__lxstat64)
diff --git a/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/xstat64.c b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/xstat64.c
new file mode 100644
index 000000000..b5bb93614
--- /dev/null
+++ b/libc/ports/sysdeps/unix/sysv/linux/mips/mips64/xstat64.c
@@ -0,0 +1,45 @@
+/* xstat64 using 64-bit MIPS stat system call.
+ Copyright (C) 1991-2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <errno.h>
+#include <stddef.h>
+#include <sys/stat.h>
+#include <kernel_stat.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+#include <bp-checks.h>
+
+#include <xstatconv.h>
+
+/* Get information about the file NAME in BUF. */
+
+int
+__xstat64 (int vers, const char *name, struct stat64 *buf)
+{
+ int result;
+ struct kernel_stat kbuf;
+
+ result = INLINE_SYSCALL (stat, 2, CHECK_STRING (name), __ptrvalue (&kbuf));
+ if (result == 0)
+ result = __xstat64_conv (vers, &kbuf, buf);
+
+ return result;
+}
+
+hidden_def (__xstat64)
diff --git a/libc/ports/sysdeps/unix/sysv/linux/tile/kernel-features.h b/libc/ports/sysdeps/unix/sysv/linux/tile/kernel-features.h
index 956f14cb9..106af6239 100644
--- a/libc/ports/sysdeps/unix/sysv/linux/tile/kernel-features.h
+++ b/libc/ports/sysdeps/unix/sysv/linux/tile/kernel-features.h
@@ -18,10 +18,7 @@
/* TILE glibc support starts with 2.6.36, guaranteeing many kernel features. */
-#define __ASSUME_MMAP2_SYSCALL 1
-#define __ASSUME_STAT64_SYSCALL 1
#define __ASSUME_UTIMES 1
-#define __ASSUME_FADVISE64_64_SYSCALL 1
#define __ASSUME_O_CLOEXEC 1
#define __ASSUME_SOCK_CLOEXEC 1
#define __ASSUME_IN_NONBLOCK 1