Move bionic over to GCC's 'warning' attribute.

This is a better solution than the old __warn_references because it's
a compile-time rather than link-time warning, it doesn't rely on something
that doesn't appear to be supported by gold (which is why you only used
to see these warnings on mips builds), and the errors refer to the exact
call site(s) rather than just telling you which object file contains a
reference to the bad function.

This is primarily so we can build bionic for aarch64; building libc.so
caused these warnings to fire (because link time is the wrong time) and
warnings are errors.

Change-Id: I5df9281b2a9d98b164a9b11807ea9472c6faa9e3
This commit is contained in:
Elliott Hughes
2013-12-17 20:43:30 -08:00
parent f293b15728
commit c13fb75cea
8 changed files with 22 additions and 165 deletions

View File

@@ -51,9 +51,9 @@ extern int setenv(const char *, const char *, int);
extern int unsetenv(const char *);
extern int clearenv(void);
extern char *mkdtemp(char *);
extern char *mktemp(char *);
extern int mkstemp(char *);
extern char* mkdtemp(char*);
extern char* mktemp(char*) __warnattr("mktemp possibly used unsafely; consider using mkstemp");
extern int mkstemp(char*);
extern long strtol(const char *, char **, int);
extern long long strtoll(const char *, char **, int);