Skip to content

Commit 4d36711

Browse files
authored
Merge pull request #2820 from RajalakshmiSR/clang
POWER9: Fix mcpu option with clang
2 parents c61771e + 718f674 commit 4d36711

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Makefile.power

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,32 @@ endif
1717
ifeq ($(CORE), POWER9)
1818
ifneq ($(C_COMPILER), PGI)
1919
CCOMMON_OPT += -Ofast -mvsx -fno-fast-math
20+
ifeq ($(C_COMPILER), GCC)
2021
ifneq ($(GCCVERSIONGT4), 1)
2122
$(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended)
2223
CCOMMON_OPT += -mcpu=power8 -mtune=power8
2324
else
2425
CCOMMON_OPT += -mcpu=power9 -mtune=power9
2526
endif
2627
else
28+
CCOMMON_OPT += -mcpu=power9 -mtune=power9
29+
endif
30+
else
2731
CCOMMON_OPT += -fast -Mvect=simd -Mcache_align
2832
endif
2933
ifneq ($(F_COMPILER), PGI)
3034
FCOMMON_OPT += -O2 -frecursive -fno-fast-math
35+
ifeq ($(C_COMPILER), GCC)
3136
ifneq ($(GCCVERSIONGT4), 1)
3237
$(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended)
3338
FCOMMON_OPT += -mcpu=power8 -mtune=power8
3439
else
3540
FCOMMON_OPT += -mcpu=power9 -mtune=power9
3641
endif
3742
else
43+
FCOMMON_OPT += -mcpu=power9 -mtune=power9
44+
endif
45+
else
3846
FCOMMON_OPT += -O2 -Mrecursive
3947
endif
4048
endif

0 commit comments

Comments
 (0)