Skip to content

Conversation

@bryanpkc
Copy link
Collaborator

@bryanpkc bryanpkc commented Nov 26, 2024

This PR adds support for RISC-V to Classic Flang, and changes the build script and CMake files to build Classic Flang as a cross-compiler. Target-specific frontend tools (e.g. riscv64-unknown-linux-gnu-flang1, riscv64-unknown-linux-gnu-flang2) are installed under $LLVM_DIR/bin/, while target-specific Fortran runtime libraries are installed along with OpenMP libraries under $LLVM_DIR/lib/$target/.

See the wiki for instructions on building a cross-compiler for RISCV.

Depends on flang-compiler/classic-flang-llvm-project#205.

Closes #1447.

@bryanpkc bryanpkc force-pushed the riscv-support branch 4 times, most recently from 02a745f to cd49c71 Compare November 29, 2024 23:23
bryanpkc and others added 4 commits December 11, 2024 09:53
This patch changes CMakeLists.txt and build scripts to support cross-compiling
Fortran programs in the frontend, and to cross-compile all runtime libraries
for the target architecture. LLVM must support the specified target.

Co-authored-by: Prabhdeep Singh Soni <[email protected]>
Copy link

@ppenzin ppenzin left a comment

Choose a reason for hiding this comment

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

It looks reasonable to me from prior experience with classic flang (oops, autocorrected), but I haven't built this yet

Copy link
Collaborator

@shivaramaarao shivaramaarao left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@pawosm-arm pawosm-arm left a comment

Choose a reason for hiding this comment

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

I have no means to test it, but it looks OK

@bryanpkc bryanpkc merged commit c443899 into flang-compiler:master Apr 7, 2025
8 of 10 checks passed
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.

Port Classic Flang to RISC-V

5 participants