From 036de1732cc118fe1af57ae77555608efee68f5a Mon Sep 17 00:00:00 2001 From: mid-kid Date: Sun, 9 Nov 2014 13:33:25 +0100 Subject: [PATCH] Added LFS scripts for dependency checking --- chroot/library-check.sh | 7 +++++++ chroot/version-check.sh | 43 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 chroot/library-check.sh create mode 100644 chroot/version-check.sh diff --git a/chroot/library-check.sh b/chroot/library-check.sh new file mode 100644 index 0000000..37dbb9f --- /dev/null +++ b/chroot/library-check.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# Copied from LFS 7.6 +for lib in lib{gmp,mpfr,mpc}.la; do + echo $lib: $(if find /usr/lib* -name $lib| + grep -q $lib;then :;else echo not;fi) found +done +unset lib diff --git a/chroot/version-check.sh b/chroot/version-check.sh new file mode 100644 index 0000000..cf55fc9 --- /dev/null +++ b/chroot/version-check.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# Simple script to list version numbers of critical development tools +# Copied from LFS 7.6 + +export LC_ALL=C +bash --version | head -n1 | cut -d" " -f2-4 +echo "/bin/sh -> `readlink -f /bin/sh`" +echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3- +bison --version | head -n1 +if [ -e /usr/bin/yacc ]; + then echo "/usr/bin/yacc -> `readlink -f /usr/bin/yacc`"; + else echo "yacc not found"; fi + +bzip2 --version 2>&1 < /dev/null | head -n1 | cut -d" " -f1,6- +echo -n "Coreutils: "; chown --version | head -n1 | cut -d")" -f2 +diff --version | head -n1 +find --version | head -n1 +gawk --version | head -n1 +if [ -e /usr/bin/awk ]; + then echo "/usr/bin/awk -> `readlink -f /usr/bin/awk`"; + else echo "awk not found"; fi + +gcc --version | head -n1 +g++ --version | head -n1 +ldd --version | head -n1 | cut -d" " -f2- # glibc version +grep --version | head -n1 +gzip --version | head -n1 +cat /proc/version +m4 --version | head -n1 +make --version | head -n1 +patch --version | head -n1 +echo Perl `perl -V:version` +sed --version | head -n1 +tar --version | head -n1 +xz --version | head -n1 +curl --version | head -n1 + +echo 'main(){}' > dummy.c && g++ -o dummy dummy.c +if [ -x dummy ] + then echo "g++ compilation OK"; + else echo "g++ compilation failed"; fi +rm -f dummy.c dummy +