X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=mk%2Ftoolchain%2Fgcc%2Frte.toolchain-compat.mk;h=280dde2a65118eb10993bddc6d68d4d3755c9cd1;hb=531b17a780dc5f486e8be8d82d1ccd077ea25f14;hp=05aa37f3d87982235289986c92d28a76c59b8a92;hpb=6eb85c0e443fada3a74a7a45559cfeac6befcc6c;p=dpdk.git diff --git a/mk/toolchain/gcc/rte.toolchain-compat.mk b/mk/toolchain/gcc/rte.toolchain-compat.mk index 05aa37f3d8..280dde2a65 100644 --- a/mk/toolchain/gcc/rte.toolchain-compat.mk +++ b/mk/toolchain/gcc/rte.toolchain-compat.mk @@ -38,7 +38,9 @@ #find out GCC version -GCC_VERSION = $(subst .,,$(shell $(CC) -dumpversion | cut -f1-2 -d.)) +GCC_MAJOR = $(shell echo __GNUC__ | $(CC) -E -x c - | tail -n 1) +GCC_MINOR = $(shell echo __GNUC_MINOR__ | $(CC) -E -x c - | tail -n 1) +GCC_VERSION = $(GCC_MAJOR)$(GCC_MINOR) # if GCC is older than 4.x ifeq ($(shell test $(GCC_VERSION) -lt 40 && echo 1), 1) @@ -54,7 +56,11 @@ else # GCC 4.5.x - added support for atom # GCC 4.6.x - added support for corei7, corei7-avx # GCC 4.7.x - added support for fsgsbase, rdrnd, f16c, core-avx-i, core-avx2 - +# GCC 4.9.x - added support for armv8-a+crc +# + ifeq ($(shell test $(GCC_VERSION) -le 49 && echo 1), 1) + MACHINE_CFLAGS := $(patsubst -march=armv8-a+crc,-march=armv8-a+crc -D__ARM_FEATURE_CRC32=1,$(MACHINE_CFLAGS)) + endif ifeq ($(shell test $(GCC_VERSION) -le 47 && echo 1), 1) MACHINE_CFLAGS := $(patsubst -march=core-avx-i,-march=corei7-avx,$(MACHINE_CFLAGS)) MACHINE_CFLAGS := $(patsubst -march=core-avx2,-march=core-avx2,$(MACHINE_CFLAGS)) @@ -83,5 +89,9 @@ else ifeq ($(shell test $(GCC_VERSION) -lt 42 && echo 1), 1) MACHINE_CFLAGS := $(filter-out -march% -mtune% -msse%,$(MACHINE_CFLAGS)) endif -endif + # Disable thunderx PMD for gcc < 4.7 + ifeq ($(shell test $(GCC_VERSION) -lt 47 && echo 1), 1) + CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=d + endif +endif