altcross-2stage: check if newly build compilers work
This commit is contained in:
parent
1d6ac898e2
commit
12166953e9
@ -166,3 +166,16 @@ mv $BUILDDIR/specs "$INSTALLDIR/lib/gcc/$TARGET/${GCC_MAJOR_VERSION}/"
|
||||
# relocate libgcc_s
|
||||
mv $INSTALLDIR/lib/gcc/$TARGET/lib64/libgcc_s.so* "$INSTALLDIR/lib/gcc/$TARGET/${GCC_MAJOR_VERSION}/"
|
||||
rmdir "$INSTALLDIR/lib/gcc/$TARGET/lib64"
|
||||
|
||||
|
||||
$INSTALLDIR/bin/${target}-gcc -o ${BUILDDIR}/hello_c hello.c || exit 2
|
||||
$INSTALLDIR/bin/${target}-g++ -o ${BUILDDIR}/hello_cpp hello.cpp || exit 3
|
||||
|
||||
gcc_runtime_libdir=`$INSTALLDIR/bin/${target}-gcc --print-libgcc-file-name`
|
||||
gcc_runtime_libdir="${gcc_runtime_libdir%/*}"
|
||||
|
||||
env LD_LIBRARY_PATH=$INSTALLDIR${SYSROOT}/lib64:${gcc_runtime_libdir} \
|
||||
qemu-${arch}-static -L ${INSTALLDIR}${SYSROOT} ${BUILDDIR}/hello_c || exit 5
|
||||
env LD_LIBRARY_PATH=$INSTALLDIR${SYSROOT}/lib64:${gcc_runtime_libdir} \
|
||||
qemu-${arch}-static -L ${INSTALLDIR}${SYSROOT} ${BUILDDIR}/hello_cpp || exit 7
|
||||
|
||||
|
6
hello.c
Normal file
6
hello.c
Normal file
@ -0,0 +1,6 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
printf("Hello, %s!\n", argc > 1 ? argv[1] : "world");
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user