diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 902b5bd980..0465fb31df 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -7,7 +7,7 @@ on: - main env: - tools-cache-version: v13 + tools-cache-version: v14 BUILDSERVER: ${{ secrets.BUILDSERVER }} BUILDUSER: ${{ secrets.BUILDUSER }} SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} diff --git a/scripts/build-toolchains.sh b/scripts/build-toolchains.sh index e89ba4f00e..0b7881caf0 100755 --- a/scripts/build-toolchains.sh +++ b/scripts/build-toolchains.sh @@ -154,7 +154,9 @@ else module_make riscv-gnu-toolchain linux fi -module_all riscv-isa-sim --prefix="${RISCV}" +# disable boost explicitly for https://github.com/riscv-software-src/riscv-isa-sim/issues/834 +# since we don't have it in our requirements +module_all riscv-isa-sim --prefix="${RISCV}" --with-boost=no # build static libfesvr library for linking into firesim driver (or others) echo '==> Installing libfesvr static library' module_make riscv-isa-sim libfesvr.a @@ -186,8 +188,24 @@ if [ -z "$IGNOREQEMU" ] ; then git -C "$dir" submodule foreach --quiet --recursive '! grep -q "git\.qemu\.org" .gitmodules 2>/dev/null' && \ echo "==> PLEASE REMOVE qemu URL-REWRITING from scripts/build-toolchains.sh. It is no longer needed!" && exit 1 + ( + # newer version of BFD-based ld has made '-no-pie' an error because it renamed to '--no-pie' + # meanwhile, ld.gold will still accept '-no-pie' + # QEMU 5.0 still uses '-no-pie' in it's linker options + + # default LD to ld if it isn't set + if ( set +o pipefail; ${LD:-ld} -no-pie |& grep 'did you mean --no-pie' >/dev/null); then + echo "==> LD doesn't like '-no-pie'" + # LD has the problem, look for ld.gold + if type ld.gold >&/dev/null; then + echo "==> Using ld.gold to link QEMU" + export LD=ld.gold + fi + fi + # now actually do the build SRCDIR="$(pwd)/toolchains" module_build qemu --prefix="${RISCV}" --target-list=riscv${XLEN}-softmmu --disable-werror + ) fi # make Dromajo diff --git a/scripts/build-util.sh b/scripts/build-util.sh index 1af11aeec1..1cf0a0d535 100644 --- a/scripts/build-util.sh +++ b/scripts/build-util.sh @@ -28,29 +28,30 @@ module_prepare() ( # [ignored-submodule..] echo "=> Starting ${name} build" echo "==> Initializing ${name} submodule" if [ $# -gt 0 ] ; then - git submodule update --init "${dir}" + (set -x; git submodule update --init "${dir}") while [ -n "$1" ] ; do - git -C "${dir}" config submodule."${1}".update none + (set -x; git -C "${dir}" config submodule."${1}".update none) shift done fi - git submodule update --init --recursive "${dir}" + (set -x; git submodule update --init --recursive "${dir}") ) module_run() ( # set -e + echo "=> cd ${SRCDIR}/${1}" cd "${SRCDIR}/${1}" shift - "$@" + (set -x; "$@") ) module_make() ( # set -e -o pipefail - cd "${SRCDIR}/${1}/build" + build_dir="${SRCDIR}/${1}/build" shift - "${MAKE}" "$@" | tee "build-${1:-make}.log" + (set -x; "${MAKE}" -C "$build_dir" "$@") | tee "build-${1:-make}.log" if [ -n "$CLEANAFTERINSTALL" ] ; then - "${MAKE}" clean # get rid of intermediate files + (set -x; "${MAKE}" -C "$build_dir" clean) # get rid of intermediate files fi ) @@ -59,33 +60,33 @@ module_build() ( # [configure-arg..] name=$1 shift + echo "==> cd ${SRCDIR}/${name}" cd "${SRCDIR}/${name}" if [ -e build ] ; then echo "==> Removing existing ${name}/build directory" - rm -rf build + (set -x; rm -rf build) fi if ! [ -e configure ] ; then echo "==> Updating autoconf files for ${name}" find . -iname configure.ac -type f -print0 | while read -r -d '' file ; do - mkdir -p -- "${file%/*}/m4" + (set -x; mkdir -p -- "${file%/*}/m4") done - autoreconf -i + (set -x; autoreconf -i) fi - mkdir -p build - cd build + (set -x; mkdir -p build) { export PATH="${RISCV:+${RISCV}/bin:}${PATH}" echo "==> Configuring ${name}" - ../configure "$@" + (set -x; cd build && ../configure "$@") echo "==> Building ${name}" - "${MAKE}" + (set -x; "${MAKE}" -C build) echo "==> Installing ${name}" - "${MAKE}" install + (set -x; "${MAKE}" -C build install) if [ -n "$CLEANAFTERINSTALL" ] ; then - "${MAKE}" clean # get rid of intermediate files + (set -x; "${MAKE}" -C build clean) # get rid of intermediate files fi } 2>&1 | tee build.log )