From d0aa7016ee1a95849a5a448083d8f8e675d80b5b Mon Sep 17 00:00:00 2001 From: Bernhard Reutner-Fischer Date: Wed, 9 Feb 2011 20:21:12 +0100 Subject: i386: extend IMA guards to also cover LTO See GCC PR47577; TODO: Remove them. Signed-off-by: Bernhard Reutner-Fischer --- libc/sysdeps/linux/i386/bits/syscalls.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'libc/sysdeps/linux/i386') 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 ); -- cgit v1.2.3 From 73d59554144f429b1cf0d4d7fa7de42bdf59ad92 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 23 Jul 2009 01:11:38 -0400 Subject: unify stub logic Signed-off-by: Mike Frysinger --- libc/sysdeps/linux/i386/posix_fadvise64.S | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'libc/sysdeps/linux/i386') 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 #include +#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 -- cgit v1.2.3 From 41647059ec1945a258a9ee26638a1c0e4d181eaa Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 9 Mar 2011 12:31:15 +0100 Subject: bits/kernel_stat.h: no need for _LIBC guard, the file is not installed on target Signed-off-by: Peter S. Mazinger --- libc/sysdeps/linux/i386/bits/kernel_stat.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'libc/sysdeps/linux/i386') 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... */ -- cgit v1.2.3