projects
/
hvlinux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Upgrade to abiword-3.0.0
[hvlinux.git]
/
stage2
/
toolchain-test
diff --git
a/stage2/toolchain-test
b/stage2/toolchain-test
index
2b0a729
..
58eae08
100755
(executable)
--- a/
stage2/toolchain-test
+++ b/
stage2/toolchain-test
@@
-1,20
+1,30
@@
#!/bin/bash
#!/bin/bash
-# Reading system configuration informations, functions and package versions.
-source ../config/sysinfos
-source ../functions
-source ../config/packages-list
+source ../functions/main
-# Testing
toolchain
+# Testing
C compiler
cd /tmp
echo 'main(){}' > dummy.c
gcc dummy.c -Wl,--verbose &> dummy.log
cd /tmp
echo 'main(){}' > dummy.c
gcc dummy.c -Wl,--verbose &> dummy.log
-if ! readelf -l a.out | grep 'Requesting program interpreter: /lib/ld-linux.*.so.2' 1> /dev/null 2>&1 ; then
+if ! readelf -l a.out | \
+ grep -q 'Requesting program interpreter: /lib/ld-linux.*.so.2'; then
echo "String 'Requesting program interpreter: /lib/ld-linux.*.so.2' not found"
exit 1
fi
rm dummy.{c,log} a.out
echo "String 'Requesting program interpreter: /lib/ld-linux.*.so.2' not found"
exit 1
fi
rm dummy.{c,log} a.out
+# Testing C++ compiler
+cd /tmp
+echo 'main(){}' > dummy.cpp
+g++ dummy.cpp -Wl,--verbose &> dummy.log
+/tmp/a.out
+if [ $? -ne 0]; then
+ echo "Cannot run C++ program"
+ exit 1
+fi
+
+rm dummy.{cpp,log} a.out
+
exit $?
exit $?