From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] lib/librte_sched: Fix compile with gcc 4.3.4 Date: Thu, 26 Nov 2015 22:28:06 +0100 Message-ID: <40264692.U54vlS2tjY@xps13> References: <1448534997-24297-1-git-send-email-michael.qiu@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Michael Qiu Return-path: Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by dpdk.org (Postfix) with ESMTP id 723A58E83 for ; Thu, 26 Nov 2015 22:29:25 +0100 (CET) Received: by wmec201 with SMTP id c201so36320003wme.1 for ; Thu, 26 Nov 2015 13:29:25 -0800 (PST) In-Reply-To: <1448534997-24297-1-git-send-email-michael.qiu@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2015-11-26 18:49, Michael Qiu: > gcc 4.3.4 does not include "immintrin.h", and will post below error: > lib/librte_sched/rte_sched.c:56:23: error: > immintrin.h: No such file or directory > > To avoid this issue, a gcc version check is need and a flag to indicate > vector ablility. [...] > +#if (defined(__ICC) || (__GNUC__ == 4 && __GNUC_MINOR__ < 4)) > + > +#if defined(__AVX__) > #include > +#define SCHED_VECTOR_ENABLE > +#endif > + > +#else > + > +#include > +#define SCHED_VECTOR_ENABLE > + > +#endif This kind of complication is managed by EAL. I think we should include rte_vect.h.