Skip to content

Conversation

@AlexGhiti
Copy link

No description provided.

Alexandre Ghiti added 2 commits April 16, 2025 11:28
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
With a bunch of dirty workarounds

Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
@AlexGhiti AlexGhiti requested a review from bjoto April 17, 2025 05:56
RUN cd xfstests-dev && make CC=riscv64-linux-gnu-gcc LD=riscv64-linux-gnu-ld PKG_LIB_DIR=/build/xfstests install
RUN cd xfstests-dev && make CC=riscv64-linux-gnu-gcc LD=riscv64-linux-gnu-ld PKG_LIB_DIR=/build/xfstests install
RUN cd /build && tar --transform "s/build/\/opt/" -cJvf xfstests.tar.xz /build/xfstests
# FIXME python3:riscv64 overwrites host python3...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need the python3 risc-v binary on the host?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a dependency of xfsprogs, needed to compile xfstests

# cfi
# We need a cfi enabled toolchain, so let's build it
# Build fails for now, so instead use an already built toolchain un /build
# from here https://gitlab.ba.rivosinc.com/api/v4/projects/704/packages/generic/cfi_toolchain/sept2024/cfi_sept2024.tar.gz
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this.

RUN mkdir -p /build/cfi
COPY tests/cfi/main.c /build/cfi
WORKDIR /build/cfi
RUN riscv64-linux-gnu-gcc main.c -o not_cfi_compiled_should_fail -static
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang nightly has support:

$ clang-21 -target riscv64 --print-supported-extensions|grep -i cfi
Ubuntu clang version 21.0.0 (++20250418083736+1db03cab70fd-1~exp1~20250418083753.380)
Target: riscv64
Thread model: posix
InstalledDir: /usr/lib/llvm-21/bin
    zicfilp              1.0       'Zicfilp' (Landing pad)
    zicfiss              1.0       'Zicfiss' (Shadow stack)

Maybe start with that instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants