diff options
-rw-r--r-- | Rules.mak | 5 | ||||
-rw-r--r-- | include/features.h | 3 |
2 files changed, 6 insertions, 2 deletions
@@ -195,8 +195,9 @@ check_as=$(shell \ if $(CC) -Wa,$(1) -Wa,-Z -c -o /dev/null -xassembler /dev/null > /dev/null 2>&1; \ then echo "-Wa,$(1)"; fi) check_ld=$(shell \ - if $(CC) $(LDFLAG-fuse-ld) $(CFLAG_-Wl--no-warn-mismatch) -Wl,$(1) $(CFLAG_-nostdlib) -o /dev/null -Wl,-b,binary /dev/null > /dev/null 2>&1; \ - then echo "$(1)"; fi) + tf="/tmp/clducl$$$$.c"; echo "int _start(){return 0;}int main(){return 0;}" >$$tf; \ + if $(CC) $(LDFLAG-fuse-ld) $(CFLAG_-Wl--no-warn-mismatch) -Wl,$(1) $(CFLAG_-nostdlib) -o /dev/null $$tf > /dev/null 2>&1; \ + then echo "$(1)"; fi; rm -f $$tf ) # Use variable indirection here so that we can have variable # names with fun chars in them like equal signs diff --git a/include/features.h b/include/features.h index 4a1066531..d6e45c2ff 100644 --- a/include/features.h +++ b/include/features.h @@ -139,6 +139,9 @@ # define __GNUC_PREREQ(maj, min) 0 #endif +/* Whether to use feature set F. */ +#define __GLIBC_USE(F) __GLIBC_USE_ ## F + /* _DEFAULT_SOURCE is equivalent to defining _BSD_SOURCE and _SVID_SOURCE * and vice versa. */ #ifdef _DEFAULT_SOURCE |