Browse Source

add -lssp in case of stack protection

Waldemar Brodkorb 13 years ago
parent
commit
6fec3f0d5c

+ 4 - 0
package/dmidecode/Makefile

@@ -18,6 +18,10 @@ $(eval $(call PKG_template,DMIDECODE,dmidecode,$(PKG_VERSION)-${PKG_RELEASE},${P
 
 CONFIG_STYLE:=		manual
 
+ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
+TARGET_LDFLAGS+=        -lssp
+endif
+
 dmidecode-install:
 	$(INSTALL_DIR) $(IDIR_DMIDECODE)/usr/sbin
 	$(INSTALL_BIN) $(WRKINST)/usr/sbin/dmidecode \

+ 7 - 3
package/dmidecode/patches/patch-Makefile

@@ -1,5 +1,5 @@
 --- dmidecode-2.11.orig/Makefile	2010-10-11 16:08:16.000000000 +0200
-+++ dmidecode-2.11/Makefile	2011-10-17 19:22:27.000000000 +0200
++++ dmidecode-2.11/Makefile	2012-03-28 11:31:33.000000000 +0200
 @@ -12,8 +12,8 @@
  #   (at your option) any later version.
  #
@@ -11,8 +11,12 @@
            -Wcast-align -Wwrite-strings -Wmissing-prototypes -Winline -Wundef
  #CFLAGS += -DBIGENDIAN
  #CFLAGS += -DALIGNMENT_WORKAROUND
-@@ -26,7 +26,7 @@ CFLAGS += -O2
- LDFLAGS =
+@@ -23,10 +23,10 @@ CFLAGS += -O2
+ #CFLAGS += -g
+ 
+ # Pass linker flags here
+-LDFLAGS =
++LDFLAGS ?=
  
  DESTDIR =
 -prefix  = /usr/local

+ 5 - 3
package/dmidecode/patches/patch-Makefile.orig

@@ -1,14 +1,16 @@
 --- dmidecode-2.11.orig/Makefile	2010-10-11 16:08:16.000000000 +0200
-+++ dmidecode-2.11/Makefile	2011-10-17 19:21:58.000000000 +0200
-@@ -12,7 +12,7 @@
++++ dmidecode-2.11/Makefile	2011-10-17 19:22:27.000000000 +0200
+@@ -12,8 +12,8 @@
  #   (at your option) any later version.
  #
  
 -CC      = gcc
+-CFLAGS  = -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \
 +CC      ?= gcc
- CFLAGS  = -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \
++CFLAGS  ?= -W -Wall -Wshadow -Wstrict-prototypes -Wpointer-arith -Wcast-qual \
            -Wcast-align -Wwrite-strings -Wmissing-prototypes -Winline -Wundef
  #CFLAGS += -DBIGENDIAN
+ #CFLAGS += -DALIGNMENT_WORKAROUND
 @@ -26,7 +26,7 @@ CFLAGS += -O2
  LDFLAGS =