]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - lfs/glibc
glibc: Test toolchain after build
[ipfire-2.x.git] / lfs / glibc
index 4b69f18d483049a6188c8718ae5f1ae317a3078b..5cdb27b988f7b9ab49882fbc934c4be6c1279e1b 100644 (file)
--- a/lfs/glibc
+++ b/lfs/glibc
@@ -152,5 +152,15 @@ ifneq "$(TOOLCHAIN)" "1"
        rm -rfv /usr/share/zoneinfo
 endif
 
+ifeq "$(TOOLCHAIN)" "1"
+       # Test the linker in toolchain
+       cd $(DIR_APP) && echo "int main() { return 0; }" > dummy.c
+       cd $(DIR_APP) && $(CROSSTARGET)-gcc dummy.c -o dummy
+
+       # Must be using a runtime linker from /tools
+       cd $(DIR_APP) && readelf -l dummy | grep "Requesting program interpreter: /tools"
+       cd $(DIR_APP) && rm -vf dummy dummy.c
+endif
+
        @rm -rf $(DIR_APP) $(DIR_SRC)/glibc-build
        @$(POSTBUILD)