summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-06-11 08:44:22 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-06-11 08:44:35 +0200
commit9c4ae62a55ebc763ac72e4b1513f305cdc1abe55 (patch)
tree9dc1cf6b74afbe68c93bee07503163d830dd7b5d
parentf0bd75d79c4b390ddd3fb4288065e58fb674497d (diff)
add cleansystem target, filter fstack-protector-all for musl
-rw-r--r--Makefile5
-rw-r--r--mk/build.mk10
-rw-r--r--toolchain/gcc/Makefile5
-rw-r--r--toolchain/musl/Makefile3
4 files changed, 22 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index d8400a0bd..fe9672412 100644
--- a/Makefile
+++ b/Makefile
@@ -33,6 +33,7 @@ help:
@echo 'Cleaning targets:'
@echo ' clean - Remove firmware and build directories'
@echo ' cleandir - Same as "clean", but also remove all built toolchains'
+ @echo ' cleansystem - Same as "cleandir", but only remove active system'
@echo ' cleankernel - Remove kernel dir, useful if you changed any kernel patches'
@echo ' distclean - Same as "cleandir", but also remove downloaded'
@echo ' distfiles and .config'
@@ -98,6 +99,10 @@ cleandir dirclean: .prereq_done
-@${GMAKE_INV} cleandir
@-rm -f make.log .prereq_done
+cleansystem: .prereq_done
+ -@${GMAKE_INV} cleansystem
+ @-rm -f make.log .prereq_done
+
distclean cleandist:
-@${GMAKE_INV} distclean
@-rm -f make.log .prereq_done
diff --git a/mk/build.mk b/mk/build.mk
index 1e270e662..0dba6cadc 100644
--- a/mk/build.mk
+++ b/mk/build.mk
@@ -153,7 +153,7 @@ ${TOPDIR}/package/Depends.mk: ${TOPDIR}/.config $(wildcard ${TOPDIR}/package/*/M
$(TOPDIR)/adk/tools/depmaker > ${TOPDIR}/package/Depends.mk
.NOTPARALLEL:
-.PHONY: all world clean cleandir cleantoolchain distclean image_clean
+.PHONY: all world clean cleandir cleansystem distclean image_clean
world:
@mkdir -p $(DL_DIR) $(HOST_BUILD_DIR) $(BUILD_DIR) $(TARGET_DIR) $(FW_DIR) \
@@ -257,6 +257,14 @@ cleandir:
@rm -rf $(STAGING_TARGET_DIR_PFX) $(STAGING_PKG_DIR_PFX)
@rm -f .menu .tmpconfig.h .rebuild* ${TOPDIR}/package/Depends.mk ${TOPDIR}/prereq.mk
+cleansystem:
+ @$(TRACE) cleansystem
+ @$(MAKE) -C $(CONFIG) clean $(MAKE_TRACE)
+ @rm -rf $(BUILD_DIR) $(FW_DIR) $(TARGET_DIR) \
+ ${TOPDIR}/package/pkglist.d ${TOPDIR}/package/pkgconfigs.d
+ @rm -rf $(TOOLCHAIN_DIR) $(STAGING_TARGET_DIR) $(STAGING_PKG_DIR) $(TOOLCHAIN_BUILD_DIR)
+ @rm -f .menu .tmpconfig.h .rebuild* ${TOPDIR}/package/Depends.mk ${TOPDIR}/prereq.mk
+
distclean:
@$(TRACE) distclean
@$(MAKE) -C $(CONFIG) clean $(MAKE_TRACE)
diff --git a/toolchain/gcc/Makefile b/toolchain/gcc/Makefile
index e56603f06..ac0209278 100644
--- a/toolchain/gcc/Makefile
+++ b/toolchain/gcc/Makefile
@@ -5,6 +5,11 @@ include $(TOPDIR)/rules.mk
include ../rules.mk
include Makefile.inc
+# disable SSP for libstdc++
+ifeq ($(ADK_TARGET_LIB_MUSL),y)
+TARGET_CXXFLAGS:= $(filter-out -fstack-protector-all,$(TARGET_CXXFLAGS))
+endif
+
GCC_CONFOPTS:= --prefix=$(TOOLCHAIN_DIR)/usr \
--with-bugurl="http://www.openadk.org/" \
--build=$(GNU_HOST_NAME) \
diff --git a/toolchain/musl/Makefile b/toolchain/musl/Makefile
index 720f1a41e..1e916fee4 100644
--- a/toolchain/musl/Makefile
+++ b/toolchain/musl/Makefile
@@ -9,6 +9,9 @@ include ${TOPDIR}/mk/buildhlp.mk
ifeq ($(ADK_TARGET_CPU_ARCH),ppc)
GNU_TARGET_NAME:= $(subst ppc,powerpc,$(GNU_TARGET_NAME))
endif
+# not yet possible
+TARGET_CFLAGS:= $(filter-out -fstack-protector-all,$(TARGET_CFLAGS))
+TARGET_LDFLAGS:= $(filter-out -fstack-protector-all,$(TARGET_LDFLAGS))
$(WRKBUILD)/.headers:
(cd $(WRKBUILD); CC='$(TARGET_CC)' CROSS_COMPILE='$(TARGET_CROSS)' \