Replace -march=native with specific architecture flags to support cross-compiling, and add icc support for Intel architectures.

This commit is contained in:
Devin Matthews
2016-03-25 20:06:48 -05:00
parent 76099f20be
commit 8442d65c9e
10 changed files with 40 additions and 19 deletions

View File

@@ -67,7 +67,7 @@ else
COPTFLAGS := -O2 -fomit-frame-pointer
endif
CVECFLAGS := -mavx -mfma -march=native -mfpmath=sse
CVECFLAGS := -mavx -mfma -march=bdver4 -mfpmath=sse
CKOPTFLAGS := $(COPTFLAGS)
# --- Determine the archiver and related flags ---

View File

@@ -67,7 +67,7 @@ else
COPTFLAGS := -O2
endif
CVECFLAGS := -march=armv7-a #-msse3 -march=native # -mfpmath=sse
CVECFLAGS := -march=armv7-a
CKOPTFLAGS := $(COPTFLAGS)
# --- Determine the archiver and related flags ---

View File

@@ -67,7 +67,7 @@ else
COPTFLAGS := -O2
endif
CVECFLAGS := -march=armv7-a #-msse3 -march=native # -mfpmath=sse
CVECFLAGS := -march=armv7-a
CKOPTFLAGS := $(COPTFLAGS)
# --- Determine the archiver and related flags ---

View File

@@ -47,9 +47,7 @@ ifeq ($(CC),)
CC := gcc
CC_VENDOR := gcc
endif
ifneq ($(CC_VENDOR),gcc)
$(error gcc is required for this configuration.)
endif
# Enable IEEE Standard 1003.1-2004 (POSIX.1d).
# NOTE: This is needed to enable posix_memalign().
CPPROCFLAGS := -D_POSIX_C_SOURCE=200112L
@@ -67,9 +65,18 @@ else
COPTFLAGS := -O2 -fomit-frame-pointer
endif
CVECFLAGS := -msse3 -march=native -mfpmath=sse
CKOPTFLAGS := $(COPTFLAGS)
ifeq ($(CC_VENDOR),gcc)
CVECFLAGS := -msse3 -march=nehalem -mfpmath=sse
else
ifeq ($(CC_VENDOR),icc)
CVECFLAGS := -xSSE4.2
else
$(error gcc or icc is required for this configuration.)
endif
endif
# --- Determine the archiver and related flags ---
AR := ar
ARFLAGS := cru

View File

@@ -47,9 +47,7 @@ ifeq ($(CC),)
CC := gcc
CC_VENDOR := gcc
endif
ifneq ($(CC_VENDOR),gcc)
$(error gcc is required for this configuration.)
endif
# Enable IEEE Standard 1003.1-2004 (POSIX.1d).
# NOTE: This is needed to enable posix_memalign().
CPPROCFLAGS := -D_POSIX_C_SOURCE=200112L
@@ -67,9 +65,18 @@ else
COPTFLAGS := -O3
endif
CVECFLAGS := -mavx2 -mfma -mfpmath=sse -march=native #-msse3 -march=native # -mfpmath=sse
CKOPTFLAGS := $(COPTFLAGS)
ifeq ($(CC_VENDOR),gcc)
CVECFLAGS := -mavx2 -mfma -mfpmath=sse -march=haswell
else
ifeq ($(CC_VENDOR),icc)
CVECFLAGS := -xCORE-AVX2
else
$(error gcc or icc is required for this configuration.)
endif
endif
# --- Determine the archiver and related flags ---
AR := ar
ARFLAGS := cru

View File

@@ -67,7 +67,7 @@ else
COPTFLAGS := -O3 -mtune=loongson3a
endif
CVECFLAGS := -march=loongson3a #-msse3 -march=native # -mfpmath=sse
CVECFLAGS := -march=loongson3a
CKOPTFLAGS := $(COPTFLAGS)
# --- Determine the archiver and related flags ---

View File

@@ -67,7 +67,7 @@ else
COPTFLAGS := -O2 -fomit-frame-pointer
endif
CVECFLAGS := -mavx -mfma -march=native -mfpmath=sse
CVECFLAGS := -mavx -mfma -march=bdver2 -mfpmath=sse
CKOPTFLAGS := $(COPTFLAGS)
# --- Determine the archiver and related flags ---

View File

@@ -67,7 +67,7 @@ else
COPTFLAGS := -O2
endif
CVECFLAGS := #-msse3 -march=native # -mfpmath=sse
CVECFLAGS :=
CKOPTFLAGS := $(COPTFLAGS)
# --- Determine the archiver and related flags ---

View File

@@ -47,9 +47,7 @@ ifeq ($(CC),)
CC := gcc
CC_VENDOR := gcc
endif
ifneq ($(CC_VENDOR),gcc)
$(error gcc is required for this configuration.)
endif
# Enable IEEE Standard 1003.1-2004 (POSIX.1d).
# NOTE: This is needed to enable posix_memalign().
CPPROCFLAGS := -D_POSIX_C_SOURCE=200112L
@@ -67,9 +65,18 @@ else
COPTFLAGS := -O3
endif
CVECFLAGS := -mavx -mfpmath=sse -march=native #-msse3 -march=native # -mfpmath=sse
CKOPTFLAGS := $(COPTFLAGS)
ifeq ($(CC_VENDOR),gcc)
CVECFLAGS := -mavx -mfpmath=sse -march=sandybridge
else
ifeq ($(CC_VENDOR),icc)
CVECFLAGS := -xAVX
else
$(error gcc or icc is required for this configuration.)
endif
endif
# --- Determine the archiver and related flags ---
AR := ar
ARFLAGS := cru

View File

@@ -67,7 +67,7 @@ else
COPTFLAGS := -O2
endif
CVECFLAGS := #-msse3 -march=native # -mfpmath=sse
CVECFLAGS := #-msse3 -march=core2 # -mfpmath=sse
CKOPTFLAGS := $(COPTFLAGS)
# --- Determine the archiver and related flags ---