Update hexagon cross container to 22.1.0
v4 cover Update hexagon cross container to 22.1.0
Update hexagon cross container to 22.1.0
Changes in v4:
* add fix for check_rev_gating test failure with the new toolchain
Changes in v3:
* change debian from 12->13
* rebased, dropped debian changes - landed on baseline
v3: https://lore.kernel.org/qemu-devel/[email protected]/
v3[oops reused]: https://lore.kernel.org/qemu-devel/[email protected]/
v2: https://lore.kernel.org/qemu-devel/[email protected]/
v1[oops started w/v2]: N/A
Brian Cain (2):
tests/tcg/hexagon: fix check_rev_gating with newer toolchain tests/docker: Update hexagon cross toolchain to 22.1.0
tests/docker/dockerfiles/debian-hexagon-cross.docker | 10 +++++++--- tests/tcg/hexagon/Makefile.target | 1 + 2 files changed, 8 insertions(+), 3 deletions(-)
Signature · 1 line
2.34.1
PATCH v4 1/2 tests/tcg/hexagon: fix check_rev_gating with newer toolchain
The check_rev_gating test is compiled with -mv66, but the final linkage step does not specify the CPU version. The v22.1.0 toolchain contains a crt1.o compiled for v68, so the linker resolves the v66 + v68 linkage by selecting the highest version. The resulting binary then executes v68 instructions without gating, leading to a segfault.
Fix this by passing -cpu v66 to QEMU when running the test, so that the emulated CPU matches the intended v66 target and the revision gating mechanism works as expected.
--- tests/tcg/hexagon/Makefile.target | 1 + 1 file changed, 1 insertion(+)
tests/tcg/hexagon/Makefile.target +1 -0
@@ -112,6 +112,7 @@ unaligned_pc: unaligned_pc.c # Compile for v66 so that the ELF selects a v66 CPU; the test then # exercises revision gating by executing a v68 .word instruction. +run-check_rev_gating: QEMU_OPTS += -cpu v66 check_rev_gating: check_rev_gating.c $(CC) $(CFLAGS) -mv66 -O2 $< -o $@ $(LDFLAGS)
Signature · 1 line
2.34.1
Re: [PATCH v4 1/2] tests/tcg/hexagon: fix check_rev_gating with newer toolchain
Quoted 10 lines · Brian Cain
The
check_rev_gatingtest is compiled with -mv66, but the final linkage step does not specify the CPU version. The v22.1.0 toolchain contains a crt1.o compiled for v68, so the linker resolves the v66 + v68 linkage by selecting the highest version. The resulting binary then executes v68 instructions without gating, leading to a segfault.Fix this by passing -cpu v66 to QEMU when running the test, so that the emulated CPU matches the intended v66 target and the revision gating mechanism works as expected.
Quoted 6 lines
Suggested-by Matheus Tavares Bernardino <[email protected]>Signed-off-by Brian Cain <[email protected]>--- tests/tcg/hexagon/Makefile.target | 1 + 1 file changed, 1 insertion(+)
PATCH v4 2/2 tests/docker: Update hexagon cross toolchain to 22.1.0
In reply to Brian CainUpdate the hexagon cross-compiler Docker container to use toolchain version 22.1.0, replacing the previous 12.Dec.2023 release.
Changes to accommodate the new toolchain:
- Add libc++1, libc++abi1, libunwind-19 runtime deps for the new LLVM-based toolchain
- Add zstd for the new .tar.zst archive format
- Update artifact URL domain to artifacts.codelinaro.org
--- tests/docker/dockerfiles/debian-hexagon-cross.docker | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
tests/docker/dockerfiles/debian-hexagon-cross.docker +7 -3
@@ -19,7 +19,11 @@ RUN apt-get update && \ curl \ ccache \ xz-utils \ + zstd \ ca-certificates \ + libc++1 \ + libc++abi1 \ + libunwind-19 \ bison \ flex \ git \
@@ -40,12 +44,12 @@ RUN apt-get update && \ dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt ENV TOOLCHAIN_INSTALL=/opt -ENV TOOLCHAIN_RELEASE=12.Dec.2023 +ENV TOOLCHAIN_RELEASE=22.1.0 ENV TOOLCHAIN_BASENAME=clang+llvm-${TOOLCHAIN_RELEASE}-cross-hexagon-unknown-linux-musl -ENV TOOLCHAIN_URL=https://codelinaro.jfrog.io/artifactory/codelinaro-toolchain-for-hexagon/${TOOLCHAIN_RELEASE}/${TOOLCHAIN_BASENAME}.tar.xz +ENV TOOLCHAIN_URL=https://artifacts.codelinaro.org/artifactory/codelinaro-toolchain-for-hexagon/${TOOLCHAIN_RELEASE}_/${TOOLCHAIN_BASENAME}.tar.zst ENV CCACHE_WRAPPERSDIR=/usr/libexec/ccache-wrappers -RUN curl -#SL "$TOOLCHAIN_URL" | tar -xJC "$TOOLCHAIN_INSTALL" +RUN curl -#SL "$TOOLCHAIN_URL" | tar --zstd -xC "$TOOLCHAIN_INSTALL" ENV PATH=$PATH:${TOOLCHAIN_INSTALL}/${TOOLCHAIN_BASENAME}/x86_64-linux-gnu/bin ENV MAKE=/usr/bin/make # As a final step configure the user (if env is defined)
Signature · 1 line
2.34.1