X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage2%2Ftoolchain-test;h=58eae08a29bd1ac0817691fee1acf6cedf466886;hb=cf3d9a3b194a6578c881cdd4eb528398d4de2741;hp=cf8fa58e18231a416a49f2ab93d96e2cd12f9179;hpb=564ec1bbb321286571c30da20b81620c33b18e6f;p=hvlinux.git diff --git a/stage2/toolchain-test b/stage2/toolchain-test index cf8fa58..58eae08 100755 --- a/stage2/toolchain-test +++ b/stage2/toolchain-test @@ -2,7 +2,7 @@ source ../functions/main -# Testing toolchain +# Testing C compiler cd /tmp echo 'main(){}' > dummy.c gcc dummy.c -Wl,--verbose &> dummy.log @@ -15,4 +15,16 @@ 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 $?