Building libomp + libomptarget for riscv32 (original) (raw)

Dear all,

for our project, we need to build libomp + libomptarget for the RISCV32 architecture, and I have some questions in this respect.

I would appreciate any help a lot!

Best regards,

Kai Plociennik

LIBOMP_ARCH is not being used for configuring how CMake compiles the library. Like you said, it’s only used in preprocessing for those target related variables. If the target architect is different from your host architecture, which I guess it should be the case here, you need cross compilation. You might want to check CMake document on how to cross compile. Same policy applies to libomptarget. libomptarget can be built on multiple architectures supported as listed in the document.

As for 32-bit OS, I’m not sure if there are any assumption about 64-bit used in libomptarget.

brooks July 10, 2022, 9:49am 3

As of ⚙ D128817 [Libomptarget] Use new tripcount argument in the runtime. (and a follow on to fix the syntax of the assert) the libomptarget contains a static assert that implies a 64-bit system. It previously built for i386, but I don’t know if it worked and I’m not sure how much effort the team put into 32-bit support.

jhuber6 July 10, 2022, 12:46pm 4

We should make that comparison work for 32-bit or 64-bit pointers, that being said I’m not aware of anyone whose tried building libomptarget on a 32-bit system in the first place. I’d be interested in whether or not it worked.

Thank you all for your answers, I will try to get this working and will tell you how it worked out!

ai006 November 15, 2023, 1:13am 6

Could you please share how you did it? I am trying to do the same for RISCV64