Merge pull request #2110 from pc2/cpu-detection
Fix detection of Skylake processors when using GCC
This commit is contained in:
commit
417efd41c6
|
@ -9,6 +9,11 @@ ifndef TOPDIR
|
||||||
TOPDIR = .
|
TOPDIR = .
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# If ARCH is not set, we use the host system's architecture.
|
||||||
|
ifndef ARCH
|
||||||
|
ARCH := $(shell uname -m)
|
||||||
|
endif
|
||||||
|
|
||||||
# Catch conflicting usage of ARCH in some BSD environments
|
# Catch conflicting usage of ARCH in some BSD environments
|
||||||
ifeq ($(ARCH), amd64)
|
ifeq ($(ARCH), amd64)
|
||||||
override ARCH=x86_64
|
override ARCH=x86_64
|
||||||
|
@ -137,6 +142,10 @@ endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
# On x86_64 build getarch with march=native. This is required to detect AVX512 support in getarch.
|
||||||
|
ifeq ($(ARCH), x86_64)
|
||||||
|
GETARCH_FLAGS += -march=native
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
ifdef INTERFACE64
|
ifdef INTERFACE64
|
||||||
|
|
2
c_check
2
c_check
|
@ -240,7 +240,7 @@ if (($architecture eq "x86") || ($architecture eq "x86_64")) {
|
||||||
} else {
|
} else {
|
||||||
$no_avx512 = 0;
|
$no_avx512 = 0;
|
||||||
}
|
}
|
||||||
unlink("tmpf.o");
|
unlink("$tmpf.o");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,11 @@ if (DEFINED TARGET)
|
||||||
set(GETARCH_FLAGS "-DFORCE_${TARGET}")
|
set(GETARCH_FLAGS "-DFORCE_${TARGET}")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
# On x86_64 build getarch with march=native. This is required to detect AVX512 support in getarch.
|
||||||
|
if (X86_64)
|
||||||
|
set(GETARCH_FLAGS "${GETARCH_FLAGS} -march=native")
|
||||||
|
endif ()
|
||||||
|
|
||||||
if (INTERFACE64)
|
if (INTERFACE64)
|
||||||
message(STATUS "Using 64-bit integers.")
|
message(STATUS "Using 64-bit integers.")
|
||||||
set(GETARCH_FLAGS "${GETARCH_FLAGS} -DUSE64BITINT")
|
set(GETARCH_FLAGS "${GETARCH_FLAGS} -DUSE64BITINT")
|
||||||
|
|
Loading…
Reference in New Issue