OSDN Git Service

- if ssp is enabled then make sure that __stack_chk_fail resolves
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sat, 15 Nov 2008 16:10:29 +0000 (16:10 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sat, 15 Nov 2008 16:10:29 +0000 (16:10 -0000)
libnsl/Makefile.in
libresolv/Makefile.in

index 7cf64a6..0995b3c 100644 (file)
@@ -8,6 +8,11 @@
 CFLAGS-libnsl := -DNOT_IN_libc -DIS_IN_libnsl $(SSP_ALL_CFLAGS)
 
 LDFLAGS-libnsl.so := $(LDFLAGS)
+ifdef ASNEEDED
+ifeq ($(UCLIBC_HAS_SSP),y)
+LDFLAGS-libnsl.so += -Wl,--no-as-needed -lc -Wl,--as-needed
+endif
+endif
 
 LIBS-libnsl.so := $(LIBS)
 
index f006fe1..4b4d781 100644 (file)
@@ -8,6 +8,11 @@
 CFLAGS-libresolv := -DNOT_IN_libc -DIS_IN_libresolv $(SSP_ALL_CFLAGS)
 
 LDFLAGS-libresolv.so := $(LDFLAGS)
+ifdef ASNEEDED
+ifeq ($(UCLIBC_HAS_SSP),y)
+LDFLAGS-libresolv.so += -Wl,--no-as-needed -lc -Wl,--as-needed
+endif
+endif
 
 LIBS-libresolv.so := $(LIBS)