diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2014-06-05 13:05:10 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2014-06-05 16:36:39 +0200 |
commit | 781f64f1ef86073d854c697365d92bb99080241b (patch) | |
tree | a9f9ce08838b9a2c0e1b773cbae28423c2a460fb | |
parent | 57c24354dc02e5016f30cae3acf452d331945ade (diff) |
rework ssp support, use static version of libssp
-rw-r--r-- | mk/vars.mk | 4 | ||||
-rw-r--r-- | package/libssp/Makefile | 35 | ||||
-rw-r--r-- | package/pam/Makefile | 3 | ||||
-rw-r--r-- | target/config/Config.in.toolchain | 1 | ||||
-rw-r--r-- | toolchain/gcc/Makefile | 6 |
5 files changed, 3 insertions, 46 deletions
diff --git a/mk/vars.mk b/mk/vars.mk index 280c5f6e4..2074d6c52 100644 --- a/mk/vars.mk +++ b/mk/vars.mk @@ -110,8 +110,8 @@ TARGET_LDFLAGS+= -static endif ifneq ($(ADK_TARGET_USE_SSP),) -TARGET_CFLAGS+= -fstack-protector-all -TARGET_CXXFLAGS+= -fstack-protector-all +TARGET_CFLAGS+= -fstack-protector-all --param=ssp-buffer-size=4 +TARGET_CXXFLAGS+= -fstack-protector-all --param=ssp-buffer-size=4 TARGET_LDFLAGS+= -fstack-protector-all endif diff --git a/package/libssp/Makefile b/package/libssp/Makefile deleted file mode 100644 index 09c363cb8..000000000 --- a/package/libssp/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -# This file is part of the OpenADK project. OpenADK is copyrighted -# material, please see the LICENCE file in the top-level directory. - -include ${TOPDIR}/rules.mk - -ifeq ($(ADK_TARGET_LIB_GLIBC),y) -include ${TOPDIR}/toolchain/glibc/Makefile.inc -endif -ifeq ($(ADK_TARGET_LIB_UCLIBC),y) -include ${TOPDIR}/toolchain/uclibc/Makefile.inc -endif -ifeq ($(ADK_TARGET_LIB_UCLIBC),y) -include ${TOPDIR}/toolchain/musl/Makefile.inc -endif - -PKG_NAME:= libssp -PKG_DESCR:= stack smashing protection library -PKG_SECTION:= libs/misc -PKG_OPTS:= noremove - -NO_DISTFILES:= 1 - -include ${TOPDIR}/mk/package.mk - -$(eval $(call PKG_template,LIBSSP,libssp,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) - -CONFIG_STYLE:= manual -BUILD_STYLE:= manual -INSTALL_STYLE:= manual - -libssp-install: - ${INSTALL_DIR} ${IDIR_LIBSSP}/$(ADK_TARGET_LIBC_PATH) - ${CP} ${STAGING_TARGET_DIR}/lib/libssp.so* ${IDIR_LIBSSP}/$(ADK_TARGET_LIBC_PATH) - -include ${TOPDIR}/mk/pkg-bottom.mk diff --git a/package/pam/Makefile b/package/pam/Makefile index 10aa6b8da..5894d7fd6 100644 --- a/package/pam/Makefile +++ b/package/pam/Makefile @@ -23,9 +23,6 @@ include $(TOPDIR)/mk/package.mk $(eval $(call PKG_template,PAM,pam,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) AUTOTOOL_STYLE:= autoreconf -ifeq ($(ADK_TARGET_USE_SSP),y) -TARGET_LDFLAGS+= -lssp -endif CONFIGURE_ARGS+= --disable-nis \ --disable-regenerate-docu \ --enable-db=no diff --git a/target/config/Config.in.toolchain b/target/config/Config.in.toolchain index 739ff6253..48953b4e3 100644 --- a/target/config/Config.in.toolchain +++ b/target/config/Config.in.toolchain @@ -50,7 +50,6 @@ config ADK_TARGET_USE_SSP prompt "Use Stack Smashing Protection for all packages" boolean select ADK_TOOLCHAIN_WITH_SSP - select ADK_PACKAGE_LIBSSP default n config ADK_TARGET_USE_PIE diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile index f82fe7002..e56603f06 100644 --- a/toolchain/gcc/Makefile +++ b/toolchain/gcc/Makefile @@ -3,9 +3,6 @@ include $(TOPDIR)/rules.mk include ../rules.mk - -SHARED_LIBS:= 'libstdc++' - include Makefile.inc GCC_CONFOPTS:= --prefix=$(TOOLCHAIN_DIR)/usr \ @@ -68,7 +65,6 @@ endif ifeq ($(ADK_TOOLCHAIN_WITH_SSP),y) GCC_FINAL_CONFOPTS+= --enable-libssp -SHARED_LIBS:= 'libstdc++,libssp' else GCC_FINAL_CONFOPTS+= --disable-libssp endif @@ -198,7 +194,7 @@ $(GCC_BUILD_DIR_FINAL)/.configured: --enable-languages=$(LANGUAGES) \ --with-build-sysroot='$${prefix}/${STAGING_HOST2TARGET}' \ --with-sysroot='$${prefix}/${STAGING_HOST2TARGET}' \ - --enable-shared='${SHARED_LIBS}' \ + --enable-shared='libstdc++' \ --enable-cxx-flags='$(TARGET_CXXFLAGS)' touch $@ |