disable _FORTIFY_SOURCE under clang

Clang and _FORTIFY_SOURCE are just plain incompatible with
each other.  First of all, clang doesn't understand the
__attribute__((gnu_inline)) header. Second of all,
Clang doesn't have support for __builtin_va_arg_pack()
and __builtin_va_arg_pack_len() (see
http://clang.llvm.org/docs/UsersManual.html#c_unimpl_gcc)

Until we can resolve these issues, don't even try using
_FORTIFY_SOURCE under clang.

Change-Id: I81c2b8073bb3276fa9a4a6b93c427b641038356a
This commit is contained in:
Nick Kralevich
2012-08-29 12:40:53 -07:00
parent 069c64cdf2
commit 829c089f83
4 changed files with 1 additions and 22 deletions

View File

@@ -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()