From 38cc63859131921885b80ed5139304dc80c5a163 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Tue, 11 Dec 2018 21:09:26 +0100 Subject: [PATCH 1/3] Avoid adding blanket march=skylake-avx512 to dynamic_arch builds --- Makefile.x86_64 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile.x86_64 b/Makefile.x86_64 index f2647fb7d..dbee28079 100644 --- a/Makefile.x86_64 +++ b/Makefile.x86_64 @@ -9,6 +9,7 @@ endif endif ifeq ($(CORE), SKYLAKEX) +ifndef DYNAMIC_ARCH ifndef NO_AVX512 CCOMMON_OPT += -march=skylake-avx512 FCOMMON_OPT += -march=skylake-avx512 @@ -22,6 +23,7 @@ endif endif endif endif +endif ifeq ($(OSNAME), Interix) ARFLAGS = -m x64 From 06f7d78d70b95f936765312b8c8b3cadf7265ae5 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Tue, 11 Dec 2018 21:10:38 +0100 Subject: [PATCH 2/3] Add -march=skylake-avx512 to SkylakeX part of DYNAMIC_ARCH builds --- kernel/Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/Makefile b/kernel/Makefile index 923ffc363..6e178f80b 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -6,7 +6,11 @@ TOPDIR = .. include $(TOPDIR)/Makefile.system ifdef TARGET_CORE +ifeq ($(TARGET_CORE), SKYLAKEX) +override CFLAGS += -DBUILD_KERNEL -DTABLE_NAME=gotoblas_$(TARGET_CORE) -march=skylake-avx512 +else override CFLAGS += -DBUILD_KERNEL -DTABLE_NAME=gotoblas_$(TARGET_CORE) +endif BUILD_KERNEL = 1 KDIR = TSUFFIX = _$(TARGET_CORE) From 51aec8e96b78f93f9a6dcbbf1edd212c5f1ab2ca Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Tue, 11 Dec 2018 22:47:32 +0100 Subject: [PATCH 3/3] make sure the added march=skylake-avx512 does not cause problems on Windows --- kernel/Makefile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/kernel/Makefile b/kernel/Makefile index 6e178f80b..a441bde7c 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -7,7 +7,15 @@ include $(TOPDIR)/Makefile.system ifdef TARGET_CORE ifeq ($(TARGET_CORE), SKYLAKEX) -override CFLAGS += -DBUILD_KERNEL -DTABLE_NAME=gotoblas_$(TARGET_CORE) -march=skylake-avx512 + override CFLAGS += -DBUILD_KERNEL -DTABLE_NAME=gotoblas_$(TARGET_CORE) -march=skylake-avx512 + ifeq ($(OSNAME), CYGWIN_NT) + override CFLAGS += -fno-asynchronous-unwind-tables + endif + ifeq ($(OSNAME), WINNT) + ifeq ($(C_COMPILER), GCC) + override CFLAGS += -fno-asynchronous-unwind-tables + endif + endif else override CFLAGS += -DBUILD_KERNEL -DTABLE_NAME=gotoblas_$(TARGET_CORE) endif