Skip to content

MINOR: [C++][Gandiva] Fix Gandiva tests on riscv64 with an LLVM JIT relocation error - #50799

Open
domibel wants to merge 1 commit into
apache:mainfrom
domibel:gandiva-riscv64-pic-jit
Open

MINOR: [C++][Gandiva] Fix Gandiva tests on riscv64 with an LLVM JIT relocation error#50799
domibel wants to merge 1 commit into
apache:mainfrom
domibel:gandiva-riscv64-pic-jit

Conversation

@domibel

@domibel domibel commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

On riscv64, Gandiva fails at runtime with:
JIT session error: relocation target ... is out of range of R_RISCV_HI20 fixup ...

What changes are included in this PR?

I set the PIC relocation model on the JIT TargetMachine for RISC-V manually to restore pre #49063 behavior. LLJIT normally sets Reloc::PIC_ for JITLink targets in prepareForConstruction, but #49063 builds the object-cache TargetMachine before that runs, so it gets the target-default (Static) model.

Are these changes tested?

Yes, by the existing Gandiva tests, on riscv64 hardware.

Are there any user-facing changes?

No public API changes. Gandiva expression evaluation now works on riscv64.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant