Skip to content

Commit a11e1e1

Browse files
author
Rajalakshmi Srinivasaraghavan
committed
powerpc: Fix build errors with xlf
This patch fixes errors when using xlf as fortran compiler on Linux. Tested with gcc/xlf and clang/xlf compiler combinations.
1 parent e2ca22f commit a11e1e1

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

Makefile.power

+4
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,12 @@ else
7070
FCOMMON_OPT += -O1 -frecursive -mcpu=power8 -mtune=power8 -fno-fast-math
7171
endif
7272
else
73+
ifeq ($(F_COMPILER), IBM)
74+
FCOMMON_OPT += -O2 -qrecur -qnosave
75+
else
7376
FCOMMON_OPT += -O2 -frecursive -mcpu=power8 -mtune=power8 -fno-fast-math
7477
endif
78+
endif
7579
else
7680
FCOMMON_OPT += -O2 -Mrecursive
7781
endif

Makefile.system

+1-1
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,7 @@ endif
11681168
ifeq ($(F_COMPILER), IBM)
11691169
CCOMMON_OPT += -DF_INTERFACE_IBM
11701170
FEXTRALIB += -lxlf90
1171-
ifeq ($(C_COMPILER), GCC)
1171+
ifeq ($(C_COMPILER), $(filter $(C_COMPILER),GCC CLANG))
11721172
FCOMMON_OPT += -qextname
11731173
endif
11741174
# FCOMMON_OPT += -qarch=440

f_check

+3
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ else
117117
vendor=PGI
118118
openmp='-mp'
119119
;;
120+
*xlf*)
121+
vendor=IBM
122+
;;
120123
*)
121124
vendor=G77
122125
openmp=''

0 commit comments

Comments
 (0)