From: Anton Blanchard Date: Thu, 19 Nov 2020 09:50:42 +0000 (+1100) Subject: POWER10: Fix ld version detection X-Git-Tag: upstream/0.3.21~22^2~4^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fdf71d66b3799f730bae282edf84345ccdf7c21b;p=platform%2Fupstream%2Fopenblas.git 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. --- diff --git a/Makefile.system b/Makefile.system index aae7ba5..6ee8bef 100644 --- a/Makefile.system +++ b/Makefile.system @@ -672,7 +672,7 @@ DYNAMIC_CORE += POWER9 else $(info, OpenBLAS: Your gcc version is too old to build the POWER9 kernels.) endif -LDVERSIONGTEQ35 := $(shell expr `ld --version | head -1 | cut -f2 -d "." | cut -f1 -d "-"` >= 35) +LDVERSIONGTEQ35 := $(shell expr `$(CC) -Wl,--version 2> /dev/null | head -1 | cut -f2 -d "." | cut -f1 -d "-"` \>= 35) ifeq ($(GCCVERSIONGTEQ11)$(LDVERSIONGTEQ35), 11) DYNAMIC_CORE += POWER10 CCOMMON_OPT += -DHAVE_P10_SUPPORT