From afffba7b7bc81e135ca0d10e3ee97774a6574361 Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 7 Jun 2019 13:02:25 -0400 Subject: [PATCH] Add -mtune=native option to makefile Added for Solaris 11 .3 on SPARC64 --- GNUmakefile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/GNUmakefile b/GNUmakefile index 5e98825d..5f3c30c3 100755 --- a/GNUmakefile +++ b/GNUmakefile @@ -860,6 +860,15 @@ ifeq ($(findstring native,$(MAKECMDGOALS)),native) NATIVE_OPT = -march=native endif # NATIVE_OPT + # And tune + ifeq ($(NATIVE_OPT),) + TOPT = -mtune=native + HAVE_OPT = $(shell $(CXX) $(TCXXFLAGS) $(ZOPT) $(TOPT) $(TPROG) -o $(TOUT) 2>&1 | tr ' ' '\n' | wc -l) + ifeq ($(strip $(HAVE_OPT)),0) + NATIVE_OPT = -mtune=native + endif # NATIVE_OPT + endif + # Try SunCC next ifeq ($(NATIVE_OPT),) TOPT = -native