Skip to content

Commit 4ed6414

Browse files
authored
Fix 64-bit fortran options for riscv64
64-bit builds are currently broken without this flag. Makefiles have done this already: https://github.com/xianyi/OpenBLAS/blob/5720fa02c58562c7d3e6a3e97b053598548e98d9/Makefile.system#L831
1 parent 5720fa0 commit 4ed6414

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cmake/fc.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ if (${F_COMPILER} STREQUAL "GFORTRAN" OR ${F_COMPILER} STREQUAL "F95")
6363
set(FCOMMON_OPT "${FCOMMON_OPT} -mabi=lp32")
6464
endif ()
6565
endif ()
66+
if (RISCV64)
67+
if (BINARY64)
68+
set(FCOMMON_OPT "${FCOMMON_OPT} -fdefault-integer-8")
69+
endif ()
70+
endif ()
6671
else ()
6772
if (BINARY64)
6873
set(FCOMMON_OPT "${FCOMMON_OPT} -m64")

0 commit comments

Comments
 (0)