X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=mk%2Fmachine%2Fnative%2Frte.vars.mk;h=6ce0c723bd7e6ccf3a12c480e0603ee62427fc00;hb=7236d2bfe0acc48330e3c2a3dfac4ada9a792cd8;hp=da9aa7148e49056e53f3ed6764461800c174cc01;hpb=3031749c2df04a63cdcef186dcce3781e61436e8;p=dpdk.git diff --git a/mk/machine/native/rte.vars.mk b/mk/machine/native/rte.vars.mk index da9aa7148e..6ce0c723bd 100644 --- a/mk/machine/native/rte.vars.mk +++ b/mk/machine/native/rte.vars.mk @@ -56,3 +56,15 @@ # CPU_ASFLAGS = MACHINE_CFLAGS = -march=native + +# On FreeBSD systems, sometimes the correct CPU type is not picked up. +# To get everything to compile, we need SSE4.2 support, so check if that is +# reported by compiler. If not, check if the CPU actually supports it, and if +# so, set the compilation target to be a corei7, minimum target with SSE4.2. +SSE42_SUPPORT=$(shell $(CC) -march=native -dM -E - /dev/null) + ifneq ($(CPU_SSE42_SUPPORT),) + MACHINE_CFLAGS = -march=corei7 + endif +endif