From 76e29dd404a543ba07568dd60a74272036b533ea Mon Sep 17 00:00:00 2001 From: Pan Li Date: Tue, 21 Nov 2023 14:33:17 +0800 Subject: [PATCH] Fix CI run failure on rv64gc Signed-off-by: Pan Li --- .github/setup-apt.sh | 2 +- .github/workflows/build.yaml | 3 ++- scripts/wrapper/spike/riscv64-unknown-linux-gnu-run | 10 ++++++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/setup-apt.sh b/.github/setup-apt.sh index 49efd024a8d..a470961c7f4 100755 --- a/.github/setup-apt.sh +++ b/.github/setup-apt.sh @@ -6,4 +6,4 @@ apt update apt install -y autoconf automake autotools-dev curl python3 python3-pip libmpc-dev libmpfr-dev \ libgmp-dev gawk build-essential bison flex texinfo gperf libtool \ patchutils bc zlib1g-dev libexpat-dev git ninja-build cmake libglib2.0-dev expect \ - device-tree-compiler + device-tree-compiler python3-pyelftools diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 2b04c058cb5..f5af747e386 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -2,6 +2,7 @@ name: Build on: push: + workflow_dispatch: branches: - master pull_request: @@ -114,7 +115,7 @@ jobs: make -j $(nproc) ${{ matrix.mode }} - name: make report - run: make report-${{ matrix.mode }} -j $(nproc) + run: make report-${{ matrix.mode }} -j $(nproc) RUNTESTFLAGS=riscv.exp=call-with-empty-struct-float.C || /usr/bin/cat build-gcc-newlib-stage2/gcc/testsuite/g++/g++.log build-multilib: if: ${{ false }} # Disable until multilib errors are triaged diff --git a/scripts/wrapper/spike/riscv64-unknown-linux-gnu-run b/scripts/wrapper/spike/riscv64-unknown-linux-gnu-run index 819ac7a63c5..18020257edd 100755 --- a/scripts/wrapper/spike/riscv64-unknown-linux-gnu-run +++ b/scripts/wrapper/spike/riscv64-unknown-linux-gnu-run @@ -1,8 +1,14 @@ #!/bin/bash +set -x + xlen="$(march-to-cpu-opt --elf-file-path $1 --print-xlen)" isa="$(march-to-cpu-opt --elf-file-path $1 --print-spike-isa)" varch="$(march-to-cpu-opt --elf-file-path $1 --print-spike-varch)" -[[ -z ${varch} ]] && spike --isa=${isa} ${PK_PATH}/pk${xlen} "$@" -[[ ! -z ${varch} ]] && spike --isa=${isa} --varch=${varch} ${PK_PATH}/pk${xlen} "$@" +isa_option="--isa=${isa}" +varch_option="" + +[[ ! -z ${varch} ]] && varch_option="--varch=${varch}" + +spike ${isa_option} ${varch_option} ${PK_PATH}/pk${xlen} "$@"