X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=automation%2Fansible%2Froles%2Fcross-compilers%2Ffiles%2Fscript.sh;h=b868787e098e60823cc831b10c1c12dd69d5d3f7;hb=HEAD;hp=e6fec0b9ab428cc4404af7ab86753b468d11a724;hpb=2a8d15d671f7021f911c00c834de5f960461967b;p=lttng-ci.git diff --git a/automation/ansible/roles/cross-compilers/files/script.sh b/automation/ansible/roles/cross-compilers/files/script.sh index e6fec0b..b868787 100755 --- a/automation/ansible/roles/cross-compilers/files/script.sh +++ b/automation/ansible/roles/cross-compilers/files/script.sh @@ -1,15 +1,23 @@ #!/bin/bash -x +# +# SPDX-FileCopyrightText: 2024 Kienan Stewart "/output/${TARGET}.time" + fi -mkdir -p "/output/usr/lib/gcc-cross/${TARGET}" /output/usr/bin/ + cp config.log "/output/config-${TARGET}.log" +done -if [ -n "${DEBUG}" ] ; then - echo $(($(date +%s) - START)) > "/output/${TARGET}.time" -fi +cp -r "/usr/local/gcc${BIN_SUFFIX}" "/output/usr/local/" -cp -r /usr/lib/gcc-cross/"${TARGET}"/4* "/output/usr/lib/gcc-cross/${TARGET}/" -cp /usr/bin/*-4.8 /output/usr/bin/ +# To test +# 1. Copy the output tarball from the Makefile to a Debian bookworm instance +# 2. Unpack, eg. `tar -xzf gcc55.tar.gz -C /` +# 3. Build a small test program, eg. +# LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/gcc5.5/bin \ +# PATH=$PATH:/usr/local/gcc5.5/bin \ +# aarch64-linux-gnu-gcc-5.5 -o hello hello.c +# 4. Copy the built binary to a system with that native architecture and run it +# 5. Upload to object storage, eg. +# s3cmd put gcc55.tar.gz s3://jenkins/gcc-5.5-x86_64-linux-gnu-cross.tgz +#