ppcrcd/trunk/Makefile

sparky cvs at pld-linux.org
Wed Aug 2 03:46:33 CEST 2006


Author: sparky
Date: Wed Aug  2 03:46:32 2006
New Revision: 7569

Modified:
   ppcrcd/trunk/Makefile
Log:
- checksym rule to check symbols in executables


Modified: ppcrcd/trunk/Makefile
==============================================================================
--- ppcrcd/trunk/Makefile	(original)
+++ ppcrcd/trunk/Makefile	Wed Aug  2 03:46:32 2006
@@ -8,6 +8,7 @@
 BCOND := --without python --without smp --without doc
 
 RLDFLAGS := -Wl,--as-needed -Wl,-s
+# -Wl,--no-undefined
 RCLDFLAGS :=
 RCFLAGS := -Os -fsigned-char
 RCFLAGS += -fno-align-loops -fno-align-jumps 			\
@@ -322,6 +323,16 @@
 		SPECS/builder SOURCES/kernel-ppc.config
 	sleep 1 && touch $@
 
+.PHONY: checksym
+checksym:	$(root_stripped)
+	$(SU) find $(root_stripped)/{usr/,}{s,}bin -type f | xargs file | \
+		grep ELF | sed "s/:.*//" > .tmp_binlist
+	for FILE in `cat .tmp_binlist`; do \
+		( gcc $$FILE 2>&1; exit 0; ) | grep "undefined reference to" | \
+			grep -q -v "to \`main" && echo broken: $$FILE || :; \
+	done
+	rm -f .tmp_binlist a.out
+
 .PHONY:	info
 info:	out/touch/root_installed
 	@LANGUAGE= LANG= LC_ALL=C rpm --root=$(PWD)/$(root_inst) -qa \


More information about the pld-cvs-commit mailing list