Add -mtune=native option to makefile

Added for Solaris 11 .3 on SPARC64
pull/853/head^2
Jeffrey Walton 2019-06-07 13:02:25 -04:00
parent ed4996f652
commit afffba7b7b
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
1 changed files with 9 additions and 0 deletions

View File

@ -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