altcross-2stage.sh: fixed the smoke test
This commit is contained in:
parent
3fb2681856
commit
9519d1f099
@ -3,6 +3,9 @@ set -e
|
||||
set -x
|
||||
|
||||
TARGET=aarch64-linux-gnu
|
||||
ARCH=aarch64
|
||||
LINUX_ARCH=arm64
|
||||
QEMU_ARCH=aarch64
|
||||
|
||||
unset NIL
|
||||
|
||||
@ -103,7 +106,7 @@ make -j$(nproc) install-gcc install-target-libgcc DESTDIR="$BOOTSTRAP_INSTALLDIR
|
||||
make -j$(nproc) \
|
||||
-C "$SRCDIR/linux" \
|
||||
O="$BUILDDIR/obj_linux" \
|
||||
ARCH=arm64 \
|
||||
ARCH=${LINUX_ARCH} \
|
||||
INSTALL_HDR_PATH="$SYSROOTDIR/usr" \
|
||||
headers_install
|
||||
|
||||
@ -168,14 +171,18 @@ mv $INSTALLDIR/lib/gcc/$TARGET/lib64/libgcc_s.so* "$INSTALLDIR/lib/gcc/$TARGET/$
|
||||
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
|
||||
$INSTALLDIR/bin/${TARGET}-gcc -o ${BUILDDIR}/hello_c hello.c || exit 2
|
||||
$INSTALLDIR/bin/${TARGET}-g++ -o ${BUILDDIR}/hello_cpp hello.cpp || exit 3
|
||||
$INSTALLDIR/bin/${TARGET}-gcc -o ${BUILDDIR}/bye_asm -static -nostdlib bye-${LINUX_ARCH}.S || exit 11
|
||||
|
||||
gcc_runtime_libdir=`$INSTALLDIR/bin/${target}-gcc --print-libgcc-file-name`
|
||||
gcc_runtime_libdir=`$INSTALLDIR/bin/${TARGET}-gcc --print-libgcc-file-name`
|
||||
gcc_runtime_libdir="${gcc_runtime_libdir%/*}"
|
||||
|
||||
if command -v qemu-${QEMU_ARCH}-static; then
|
||||
# run test binaries
|
||||
env LD_LIBRARY_PATH=$INSTALLDIR${SYSROOT}/lib64:${gcc_runtime_libdir} \
|
||||
qemu-${arch}-static -L ${INSTALLDIR}${SYSROOT} ${BUILDDIR}/hello_c || exit 5
|
||||
qemu-${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
|
||||
|
||||
qemu-${QEMU_ARCH}-static -L ${INSTALLDIR}${SYSROOT} ${BUILDDIR}/hello_cpp || exit 7
|
||||
qemu-${QEMU_ARCH}-static ${BUILDDIR}/bye_asm || exit 13
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user