diff --git a/config/armv7a/make_defs.mk b/config/armv7a/make_defs.mk index 40b6c179a..2b4125f3a 100644 --- a/config/armv7a/make_defs.mk +++ b/config/armv7a/make_defs.mk @@ -77,7 +77,9 @@ ARFLAGS := cru # --- Determine the linker and related flags --- LINKER := $(CC) SOFLAGS := -shared +ifneq ($(CC_VENDOR),icc) LDFLAGS := -lm +endif diff --git a/config/armv8a/make_defs.mk b/config/armv8a/make_defs.mk index 654a9ff92..3dc88e913 100644 --- a/config/armv8a/make_defs.mk +++ b/config/armv8a/make_defs.mk @@ -77,7 +77,9 @@ ARFLAGS := cru # --- Determine the linker and related flags --- LINKER := $(CC) SOFLAGS := -shared +ifneq ($(CC_VENDOR),icc) LDFLAGS := -lm +endif diff --git a/config/bulldozer/make_defs.mk b/config/bulldozer/make_defs.mk index 78f47d908..90d14d56b 100644 --- a/config/bulldozer/make_defs.mk +++ b/config/bulldozer/make_defs.mk @@ -77,7 +77,9 @@ ARFLAGS := cru # --- Determine the linker and related flags --- LINKER := $(CC) SOFLAGS := -shared +ifneq ($(CC_VENDOR),icc) LDFLAGS := -lm +endif diff --git a/config/carrizo/make_defs.mk b/config/carrizo/make_defs.mk index aaecb2d2c..fd6b84cb0 100644 --- a/config/carrizo/make_defs.mk +++ b/config/carrizo/make_defs.mk @@ -77,7 +77,9 @@ ARFLAGS := cru # --- Determine the linker and related flags --- LINKER := $(CC) SOFLAGS := -shared +ifneq ($(CC_VENDOR),icc) LDFLAGS := -lm +endif diff --git a/config/cortex-a15/make_defs.mk b/config/cortex-a15/make_defs.mk index ec5360da4..52ab7a7c9 100644 --- a/config/cortex-a15/make_defs.mk +++ b/config/cortex-a15/make_defs.mk @@ -77,7 +77,9 @@ ARFLAGS := cru # --- Determine the linker and related flags --- LINKER := $(CC) SOFLAGS := -shared +ifneq ($(CC_VENDOR),icc) LDFLAGS := -lm +endif diff --git a/config/cortex-a9/make_defs.mk b/config/cortex-a9/make_defs.mk index ec5360da4..52ab7a7c9 100644 --- a/config/cortex-a9/make_defs.mk +++ b/config/cortex-a9/make_defs.mk @@ -77,7 +77,9 @@ ARFLAGS := cru # --- Determine the linker and related flags --- LINKER := $(CC) SOFLAGS := -shared +ifneq ($(CC_VENDOR),icc) LDFLAGS := -lm +endif diff --git a/config/dunnington/make_defs.mk b/config/dunnington/make_defs.mk index fed36506b..f8faa3b5b 100644 --- a/config/dunnington/make_defs.mk +++ b/config/dunnington/make_defs.mk @@ -88,7 +88,9 @@ ARFLAGS := cru # --- Determine the linker and related flags --- LINKER := $(CC) SOFLAGS := -shared +ifneq ($(CC_VENDOR),icc) LDFLAGS := -lm +endif diff --git a/config/haswell/make_defs.mk b/config/haswell/make_defs.mk index 1640a40b9..4c144846d 100644 --- a/config/haswell/make_defs.mk +++ b/config/haswell/make_defs.mk @@ -88,7 +88,9 @@ ARFLAGS := cru # --- Determine the linker and related flags --- LINKER := $(CC) SOFLAGS := -shared +ifneq ($(CC_VENDOR),icc) LDFLAGS := -lm +endif diff --git a/config/knl/make_defs.mk b/config/knl/make_defs.mk index e0385e6d5..6a750223d 100644 --- a/config/knl/make_defs.mk +++ b/config/knl/make_defs.mk @@ -95,7 +95,11 @@ ARFLAGS := cru # --- Determine the linker and related flags --- LINKER := $(CC) SOFLAGS := -shared -LDFLAGS := -lm -lmemkind +ifeq ($(CC_VENDOR),icc) +LDFLAGS := -lmemkind +else +LDFLAGS := -lmemkind -lm +endif diff --git a/config/loongson3a/make_defs.mk b/config/loongson3a/make_defs.mk index bb1248d37..2c7e9c58c 100644 --- a/config/loongson3a/make_defs.mk +++ b/config/loongson3a/make_defs.mk @@ -77,7 +77,9 @@ ARFLAGS := cru # --- Determine the linker and related flags --- LINKER := $(CC) SOFLAGS := -shared +ifneq ($(CC_VENDOR),icc) LDFLAGS := -lm +endif diff --git a/config/mic/make_defs.mk b/config/mic/make_defs.mk index 21af9e2e2..339112570 100644 --- a/config/mic/make_defs.mk +++ b/config/mic/make_defs.mk @@ -77,7 +77,11 @@ ARFLAGS := cru # --- Determine the linker and related flags --- LINKER := $(CC) SOFLAGS := -shared +ifeq ($(CC_VENDOR),icc) +LDFLAGS := -mmic +else LDFLAGS := -mmic -lm +endif diff --git a/config/piledriver/make_defs.mk b/config/piledriver/make_defs.mk index e241789dd..db46bd124 100644 --- a/config/piledriver/make_defs.mk +++ b/config/piledriver/make_defs.mk @@ -77,7 +77,9 @@ ARFLAGS := cru # --- Determine the linker and related flags --- LINKER := $(CC) SOFLAGS := -shared +ifneq ($(CC_VENDOR),icc) LDFLAGS := -lm +endif diff --git a/config/pnacl/make_defs.mk b/config/pnacl/make_defs.mk index e957cf429..9e2a3b4c5 100644 --- a/config/pnacl/make_defs.mk +++ b/config/pnacl/make_defs.mk @@ -63,7 +63,9 @@ ARFLAGS := rcs # --- Determine the linker and related flags --- LINKER := $(CC) SOFLAGS := +ifneq ($(CC_VENDOR),icc) LDFLAGS := -lm +endif # --- Determine the finalizer and related flags --- FINALIZER := pnacl-finalize diff --git a/config/power7/make_defs.mk b/config/power7/make_defs.mk index d03857a44..da4e5bff1 100644 --- a/config/power7/make_defs.mk +++ b/config/power7/make_defs.mk @@ -77,7 +77,9 @@ ARFLAGS := cru # --- Determine the linker and related flags --- LINKER := $(CC) SOFLAGS := -shared +ifneq ($(CC_VENDOR),icc) LDFLAGS := -lm +endif diff --git a/config/reference/make_defs.mk b/config/reference/make_defs.mk index 16e4b1294..4e856534d 100644 --- a/config/reference/make_defs.mk +++ b/config/reference/make_defs.mk @@ -86,7 +86,9 @@ ARFLAGS := cru # --- Determine the linker and related flags --- LINKER := $(CC) SOFLAGS := -shared +ifneq ($(CC_VENDOR),icc) LDFLAGS := -lm +endif diff --git a/config/sandybridge/make_defs.mk b/config/sandybridge/make_defs.mk index 082a73f92..0a779b188 100644 --- a/config/sandybridge/make_defs.mk +++ b/config/sandybridge/make_defs.mk @@ -88,7 +88,9 @@ ARFLAGS := cru # --- Determine the linker and related flags --- LINKER := $(CC) SOFLAGS := -shared +ifneq ($(CC_VENDOR),icc) LDFLAGS := -lm +endif diff --git a/config/template/make_defs.mk b/config/template/make_defs.mk index 37de32882..98f3222e0 100644 --- a/config/template/make_defs.mk +++ b/config/template/make_defs.mk @@ -77,7 +77,9 @@ ARFLAGS := cru # --- Determine the linker and related flags --- LINKER := $(CC) SOFLAGS := -shared +ifneq ($(CC_VENDOR),icc) LDFLAGS := -lm +endif