diff options
Diffstat (limited to 'libc/sysdeps/linux/i386')
-rw-r--r-- | libc/sysdeps/linux/i386/bits/kernel_stat.h | 4 | ||||
-rw-r--r-- | libc/sysdeps/linux/i386/bits/syscalls.h | 7 | ||||
-rw-r--r-- | libc/sysdeps/linux/i386/posix_fadvise64.S | 9 |
3 files changed, 9 insertions, 11 deletions
diff --git a/libc/sysdeps/linux/i386/bits/kernel_stat.h b/libc/sysdeps/linux/i386/bits/kernel_stat.h index decbeb915..231a984b4 100644 --- a/libc/sysdeps/linux/i386/bits/kernel_stat.h +++ b/libc/sysdeps/linux/i386/bits/kernel_stat.h @@ -1,10 +1,6 @@ #ifndef _BITS_STAT_STRUCT_H #define _BITS_STAT_STRUCT_H -#ifndef _LIBC -#error bits/kernel_stat.h is for internal uClibc use only! -#endif - /* This file provides whatever this particular arch's kernel thinks * struct stat should look like... It turns out each arch has a * different opinion on the subject... */ diff --git a/libc/sysdeps/linux/i386/bits/syscalls.h b/libc/sysdeps/linux/i386/bits/syscalls.h index 9184bd6c3..eeafb3a48 100644 --- a/libc/sysdeps/linux/i386/bits/syscalls.h +++ b/libc/sysdeps/linux/i386/bits/syscalls.h @@ -43,9 +43,12 @@ /* We need some help from the assembler to generate optimal code. * We define some macros here which later will be used. */ +/* gcc>=4.6 with LTO need the same guards as IMA (a.k.a --combine) did. + * See gcc.gnu.org/PR47577 */ +/* FIXME: drop these b* macros! */ __asm__ ( -#ifdef __DOMULTI__ +#if defined __DOMULTI__ || __GNUC_PREREQ (4, 6) /* Protect against asm macro redefinition (happens in __DOMULTI__ mode). * Unfortunately, it ends up visible in .o files. */ ".ifndef _BITS_SYSCALLS_ASM\n\t" @@ -92,7 +95,7 @@ __asm__ ( ".endif\n\t" ".endm\n\t" -#ifdef __DOMULTI__ +#if defined __DOMULTI__ || __GNUC_PREREQ (4, 6) ".endif\n\t" /* _BITS_SYSCALLS_ASM */ #endif ); diff --git a/libc/sysdeps/linux/i386/posix_fadvise64.S b/libc/sysdeps/linux/i386/posix_fadvise64.S index 17f006aa8..b4aeff1f4 100644 --- a/libc/sysdeps/linux/i386/posix_fadvise64.S +++ b/libc/sysdeps/linux/i386/posix_fadvise64.S @@ -22,6 +22,8 @@ #include <bits/errno.h> #include <sys/syscall.h> +#if defined __NR_fadvise64_64 + /* Was named __libc_posix_fadvise64 for some inexplicable reason. ** google says only uclibc has *__libc*_posix_fadviseXXX, ** so it cannot be compat with anything. @@ -33,7 +35,6 @@ .global posix_fadvise64 .type posix_fadvise64,%function posix_fadvise64: -#if defined __NR_fadvise64_64 /* Save regs */ pushl %ebp pushl %ebx @@ -91,10 +92,6 @@ overflow: /* Returns 0 on success, else an error code. */ negl %eax -#elif defined __UCLIBC_HAS_STUBS__ - movl $-ENOSYS, %eax - jmp __syscall_error -#endif /* Successful; return the syscall's value. */ ret @@ -106,3 +103,5 @@ overflow: ** weak_alias(__libc_posix_fadvise64,posix_fadvise64) ** #endif */ + +#endif |