Browse Source

- if ssp is enabled then make sure that __stack_chk_fail resolves

Bernhard Reutner-Fischer 15 years ago
parent
commit
035ac813b4
2 changed files with 10 additions and 0 deletions
  1. 5 0
      libnsl/Makefile.in
  2. 5 0
      libresolv/Makefile.in

+ 5 - 0
libnsl/Makefile.in

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

+ 5 - 0
libresolv/Makefile.in

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