Skip to content

Commit

Permalink
Merge pull request #2157 from martin-frbg/2154-2
Browse files Browse the repository at this point in the history
Add gfortran workaround for potential ABI violation
  • Loading branch information
martin-frbg committed Jun 9, 2019
2 parents 26411ac + e674e1c commit be8f70d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmake/fc.cmake
Expand Up @@ -44,7 +44,10 @@ endif ()

if (${F_COMPILER} STREQUAL "GFORTRAN")
set(CCOMMON_OPT "${CCOMMON_OPT} -DF_INTERFACE_GFORT")
# ensure reentrancy of lapack codes
set(FCOMMON_OPT "${FCOMMON_OPT} -Wall -frecursive")
# work around ABI violation in passing string arguments from C
set(FCOMMON_OPT "${FCOMMON_OPT} -fno-optimize-sibling-calls")
#Don't include -lgfortran, when NO_LAPACK=1 or lsbcc
if (NOT NO_LAPACK)
set(EXTRALIB "{EXTRALIB} -lgfortran")
Expand Down

0 comments on commit be8f70d

Please sign in to comment.