Skip to content

Commit bb8c3f6

Browse files
authored
Add ld/binutils version check for POWER10 support
1 parent ff65952 commit bb8c3f6

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Makefile.system

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -641,18 +641,22 @@ DYNAMIC_CORE += POWER8
641641
ifneq ($(C_COMPILER), GCC)
642642
DYNAMIC_CORE += POWER9
643643
DYNAMIC_CORE += POWER10
644+
CCOMMON_OPT += -DHAVE_P10_SUPPORT
644645
endif
645646
ifeq ($(C_COMPILER), GCC)
646647
ifeq ($(GCCVERSIONGT5), 1)
647648
DYNAMIC_CORE += POWER9
648649
else
649650
$(info, OpenBLAS: Your gcc version is too old to build the POWER9 kernels.)
650651
endif
651-
ifeq ($(GCCVERSIONGTEQ11), 1)
652+
LDVERSIONGTEQ35 := $(shell expr ld --version | head -1 | cut -f2 -d "." | cut -f1 -d "-" >= 35)
653+
ifeq ($(GCCVERSIONGTEQ11)$(LDVERSIONGTEQ35), 11)
652654
DYNAMIC_CORE += POWER10
655+
CCOMMON_OPT += -DHAVE_P10_SUPPORT
653656
else ifeq ($(GCCVERSIONGTEQ10), 1)
654-
ifeq ($(GCCMINORVERSIONGTEQ2), 1)
657+
ifeq ($(GCCMINORVERSIONGTEQ2)$(LDVERSIONGTEQ35), 11)
655658
DYNAMIC_CORE += POWER10
659+
CCOMMON_OPT += -DHAVE_P10_SUPPORT
656660
endif
657661
else
658662
$(info, OpenBLAS: Your gcc version is too old to build the POWER10 kernels.)

0 commit comments

Comments
 (0)