Browse Source

only strip toolchain and target dirs for ADK_TOOLCHAIN

Waldemar Brodkorb 10 years ago
parent
commit
beb47ef07d

+ 2 - 2
mk/build.mk

@@ -561,8 +561,8 @@ test-framework:
 	for libc in uclibc glibc musl;do \
 		mkdir -p $(TOPDIR)/firmware/$(SYSTEM)_$(ARCH)_$$libc; \
 		( \
-			for arch in arm mips mipsel x86 x86_64;do \
-				tarch=$$(echo $$arch|sed -e "s#el##" -e "s#eb##" -e "s#mips64.*#mips#"); \
+			for arch in arm mips mipsel i686 x86_64;do \
+				tarch=$$(echo $$arch|sed -e "s#el##" -e "s#eb##" -e "s#mips64.*#mips#" -e "s#i686#x86#"); \
 				echo === building qemu-$$arch for $$libc with $$tarch on $$(date); \
 				$(GMAKE) prereq && \
 				$(GMAKE) ARCH=$$tarch SYSTEM=qemu-$$arch LIBC=$$libc FS=archive COLLECTION=test defconfig; \

+ 3 - 6
scripts/rstrip.sh

@@ -5,10 +5,6 @@
 
 SELF=${0##*/}
 
-if [[ -z $debug ]];then
-	debug=1
-fi
-
 if [[ -z $prefix ]]; then
 	echo >&2 "$SELF: strip command not defined ('prefix' variable not set)"
 	exit 1
@@ -64,12 +60,13 @@ find $TARGETS -type f -a -exec file {} \; | \
 	echo "$SELF: $V:$S"
 	echo "-> $T $F"
 	eval "chmod u+w $F"
-	if [[ $debug -eq 1 ]];then
+	if [[ $debug -ne 0 ]];then
+		echo "mkdir for $D" >> /tmp/debug
 		eval "mkdir -p $D/usr/lib/debug/$Q"
 		eval "$O --only-keep-debug $F $D/usr/lib/debug/$P.debug"
 	fi
 	eval "$T $F"
-	if [[ $debug -eq 1 ]];then
+	if [[ $debug -ne 0 ]];then
 		eval "cd $D/usr/lib/debug/$Q && $O --add-gnu-debuglink=$R.debug $F"
 	fi
 done

+ 1 - 0
target/packages/pkg-available/test

@@ -3,6 +3,7 @@ config ADK_PKG_TEST
 	default n
 	select ADK_PACKAGE_STRACE
 	select ADK_PACKAGE_SOCAT
+	select ADK_PACKAGE_MAKE
 	help
 	  Package collection used to build adk-test-framework root
 	  filesystem.

+ 5 - 2
toolchain/glibc/Makefile

@@ -73,8 +73,11 @@ $(WRKBUILD)/.fixup:
 	-find $(STAGING_TARGET_DIR) -type f -name \*_pic\* -delete
 	rm -rf $(STAGING_TARGET_DIR)/usr/share/locale $(STAGING_TARGET_DIR)/usr/share/i18n
 	rm -rf $(STAGING_TARGET_DIR)/usr/lib/gconv
-	PATH="$(TARGET_PATH)" debug='' prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_TARGET_DIR)
-	debug='' prefix=' ' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_HOST_DIR)/bin $(STAGING_HOST_DIR)/$(GNU_TARGET_NAME)/
+ifeq ($(ADK_TOOLCHAIN),y)
+	# strip target libs and host tools for toolchain builds
+	PATH="$(TARGET_PATH)" debug='0' prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_TARGET_DIR)
+	debug='0' prefix=' ' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_HOST_DIR)/bin $(STAGING_HOST_DIR)/$(GNU_TARGET_NAME)/
+endif
 	touch $@
 
 include ${TOPDIR}/mk/toolchain.mk

+ 5 - 2
toolchain/musl/Makefile

@@ -59,8 +59,11 @@ $(WRKBUILD)/.fixup:
 	$(MAKE) -C $(WRKBUILD) DESTDIR=$(STAGING_TARGET_DIR) install
 	# cleanup toolchain
 	-find $(STAGING_TARGET_DIR) $(STAGING_HOST_DIR) -name \*.la -delete
-	PATH="$(TARGET_PATH)" debug='' prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_TARGET_DIR)
-	debug='' prefix=' ' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_HOST_DIR)
+ifeq ($(ADK_TOOLCHAIN),y)
+	# strip target libs and host tools for toolchain builds
+	PATH="$(TARGET_PATH)" debug='0' prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_TARGET_DIR)
+	debug='0' prefix=' ' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_HOST_DIR)
+endif
 	touch $@
 
 include ${TOPDIR}/mk/toolchain.mk

+ 5 - 2
toolchain/uClibc/Makefile

@@ -120,8 +120,11 @@ endif
 	ln -s libc.so.0 $(STAGING_TARGET_DIR)/lib/libc.so
 	# cleanup toolchain
 	-find $(STAGING_TARGET_DIR) $(STAGING_HOST_DIR) -name \*.la -delete
-	PATH="$(TARGET_PATH)" debug='' prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_TARGET_DIR)
-	debug='' prefix=' ' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_HOST_DIR)
+ifeq ($(ADK_TOOLCHAIN),y)
+	# strip target libs and host tools for toolchain builds
+	PATH="$(TARGET_PATH)" debug='0' prefix='${TARGET_CROSS}' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_TARGET_DIR)
+	debug='0' prefix=' ' ${BASH} ${SCRIPT_DIR}/rstrip.sh $(STAGING_HOST_DIR)
+endif
 	touch $@
 
 include ${TOPDIR}/mk/toolchain.mk