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

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