* commit '92133ca427b9c697d5afb59b74cb2cff50840c8e': disable _FORTIFY_SOURCE under clang
This commit is contained in:
		@@ -51,14 +51,6 @@ extern int  creat(const char*  path, mode_t  mode);
 | 
			
		||||
 | 
			
		||||
#if defined(__BIONIC_FORTIFY_INLINE)
 | 
			
		||||
 | 
			
		||||
# if !defined(__clang__)
 | 
			
		||||
/*
 | 
			
		||||
 * Clang doesn't have support for __builtin_va_arg_pack()
 | 
			
		||||
 * and __builtin_va_arg_pack_len()
 | 
			
		||||
 *
 | 
			
		||||
 * http://clang.llvm.org/docs/UsersManual.html#c_unimpl_gcc
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
extern void __creat_error()
 | 
			
		||||
    __attribute__((__error__ ("called with O_CREAT, but missing mode")));
 | 
			
		||||
extern void __too_many_args_error()
 | 
			
		||||
@@ -109,7 +101,6 @@ int openat(int dirfd, const char *pathname, int flags, ...) {
 | 
			
		||||
    return __openat_real(dirfd, pathname, flags, __builtin_va_arg_pack());
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#endif /* !defined(__clang__) */
 | 
			
		||||
#endif /* defined(__BIONIC_FORTIFY_INLINE) */
 | 
			
		||||
 | 
			
		||||
__END_DECLS
 | 
			
		||||
 
 | 
			
		||||
@@ -500,13 +500,6 @@ int vsprintf(char *dest, const char *format, __va_list ap)
 | 
			
		||||
        __builtin_object_size(dest, 0), format, ap);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# if !defined(__clang__)
 | 
			
		||||
/*
 | 
			
		||||
 * Clang doesn't have support for __builtin_va_arg_pack()
 | 
			
		||||
 * http://clang.llvm.org/docs/UsersManual.html#c_unimpl_gcc
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
__BIONIC_FORTIFY_INLINE
 | 
			
		||||
__attribute__((__format__ (printf, 3, 4)))
 | 
			
		||||
__attribute__((__nonnull__ (3)))
 | 
			
		||||
@@ -525,8 +518,6 @@ int sprintf(char *dest, const char *format, ...)
 | 
			
		||||
        __builtin_object_size(dest, 0), format, __builtin_va_arg_pack());
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
# endif /* !defined(__clang__) */
 | 
			
		||||
 | 
			
		||||
extern char *__fgets_real(char *, int, FILE *)
 | 
			
		||||
    __asm__(__USER_LABEL_PREFIX__ "fgets");
 | 
			
		||||
extern void __fgets_too_big_error()
 | 
			
		||||
 
 | 
			
		||||
@@ -147,7 +147,6 @@ void *memset (void *s, int c, size_t n) {
 | 
			
		||||
    return __builtin___memset_chk(s, c, n, __builtin_object_size (s, 0));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
#if !defined(__clang__)
 | 
			
		||||
extern size_t __strlcpy_real(char *, const char *, size_t)
 | 
			
		||||
    __asm__(__USER_LABEL_PREFIX__ "strlcpy");
 | 
			
		||||
extern void __strlcpy_error()
 | 
			
		||||
@@ -224,8 +223,6 @@ size_t strlen(const char *s) {
 | 
			
		||||
 | 
			
		||||
    return __strlen_chk(s, bos);
 | 
			
		||||
}
 | 
			
		||||
#endif  /* !defined(__clang__) */
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif /* defined(__BIONIC_FORTIFY_INLINE) */
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -501,7 +501,7 @@
 | 
			
		||||
#define  __BIONIC__   1
 | 
			
		||||
#include <android/api-level.h>
 | 
			
		||||
 | 
			
		||||
#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0
 | 
			
		||||
#if defined(_FORTIFY_SOURCE) && _FORTIFY_SOURCE > 0 && defined(__OPTIMIZE__) && __OPTIMIZE__ > 0 && !defined(__clang__)
 | 
			
		||||
#define __BIONIC_FORTIFY_INLINE \
 | 
			
		||||
    extern inline \
 | 
			
		||||
    __attribute__ ((always_inline)) \
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user