Skip to content

Commit fdf71d6

Browse files
POWER10: Fix ld version detection
LDVERSIONGTEQ35 needs to escape the '>' character. LDVERSIONGTEQ35 is checking the system ld version which may be different to the toolchain being used to compile OpenBLAS. We don't have a path to the linker in our Makefiles, so (ab)use gcc -Wl,--version to get the version of ld in our toolchain.
1 parent 7e9cb39 commit fdf71d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile.system

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -672,7 +672,7 @@ DYNAMIC_CORE += POWER9
672672
else
673673
$(info, OpenBLAS: Your gcc version is too old to build the POWER9 kernels.)
674674
endif
675-
LDVERSIONGTEQ35 := $(shell expr `ld --version | head -1 | cut -f2 -d "." | cut -f1 -d "-"` >= 35)
675+
LDVERSIONGTEQ35 := $(shell expr `$(CC) -Wl,--version 2> /dev/null | head -1 | cut -f2 -d "." | cut -f1 -d "-"` \>= 35)
676676
ifeq ($(GCCVERSIONGTEQ11)$(LDVERSIONGTEQ35), 11)
677677
DYNAMIC_CORE += POWER10
678678
CCOMMON_OPT += -DHAVE_P10_SUPPORT

0 commit comments

Comments
 (0)