From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 1F83A2BB5 for ; Wed, 28 Sep 2016 02:08:34 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 27 Sep 2016 17:08:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,407,1470726000"; d="scan'208";a="1037376406" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga001.jf.intel.com with ESMTP; 27 Sep 2016 17:08:32 -0700 Date: Wed, 28 Sep 2016 08:09:08 +0800 From: Yuanhan Liu To: "Chen, Jing D" Cc: "dev@dpdk.org" , Jerin Jacob , "Liang, Cunming" , "Richardson, Bruce" , Thomas Monjalon Message-ID: <20160928000908.GB1597@yliu-dev.sh.intel.com> References: <1474611309-20325-1-git-send-email-yuanhan.liu@linux.intel.com> <1474864153-11847-1-git-send-email-yuanhan.liu@linux.intel.com> <20160927121951.GP25823@yliu-dev.sh.intel.com> <4341B239C0EFF9468EE453F9E9F4604D3A384822@shsmsx102.ccr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4341B239C0EFF9468EE453F9E9F4604D3A384822@shsmsx102.ccr.corp.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v3] net: fix build error with clang X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Sep 2016 00:08:35 -0000 On Tue, Sep 27, 2016 at 05:24:35PM +0000, Chen, Jing D wrote: > > On Mon, Sep 26, 2016 at 12:29:13PM +0800, Yuanhan Liu wrote: > > > Interestingly, clang and gcc has different prototype for _mm_prefetch(). > > > For gcc, we have > > > > > > _mm_prefetch (const void *__P, enum _mm_hint __I) > > > > > > While for clang, it's > > > > > > #define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a), 0, > > > (sel))) > > > > > > That's how the following error comes with clang: > > > > > > error: cast from 'const void *' to 'void *' drops const qualifier > > > [-Werror,-Wcast-qual] > > > _mm_prefetch((const void *)rused, _MM_HINT_T0); > > > /usr/lib/llvm-3.8/bin/../lib/clang/3.8.0/include/xmmintrin.h:684:58: > > > note: expanded from macro '_mm_prefetch' > > > #define _mm_prefetch(a, sel) (__builtin_prefetch((void *)(a), > > > 0, (sel))) > > > > > > What's weird is that the build was actaully Okay before. I met it > > > while apply Jerin's vector support for ARM patch set: he just move > > > this peiece of code to another file, nothing else changed. > > > > > > This patch fix the issue when Jerin's patchset is applied. Thus, I > > > think it's still needed. > > > > > > Similarly, make the same change to other _mm_prefetch users, just in > > > case this weird issue shows up again somehow later. ... > > > Signed-off-by: Yuanhan Liu > Acked-by: Jing Chen Mark, thank you! Applied to dpdk-next-virtio. --yliu