From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id F1335A04FD; Tue, 17 Dec 2019 15:08:47 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 507F61BEB2; Tue, 17 Dec 2019 15:08:47 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 5424B1BE9E for ; Tue, 17 Dec 2019 15:08:46 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Dec 2019 06:08:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,325,1571727600"; d="scan'208";a="389844069" Received: from silpixa00399126.ir.intel.com (HELO silpixa00399126.ger.corp.intel.com) ([10.237.223.2]) by orsmga005.jf.intel.com with ESMTP; 17 Dec 2019 06:08:44 -0800 From: Bruce Richardson To: david.marchand@redhat.com Cc: dev@dpdk.org, Bruce Richardson Date: Tue, 17 Dec 2019 14:08:38 +0000 Message-Id: <20191217140838.2711906-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] build: explicitly enable SSE4 for x86 meson builds X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" If the compiler does not recognise the specific CPU when building with the default "native" machine type, SSE4.2 instructions can be missing, causing a build error. Rather than advising the user to change the machine type, we can just turn on SSE4.2 directly. This can prevent issues with running automated tests with older compilers/distros on newer hardware. Fixes: a25a650be5f0 ("build: add infrastructure for meson and ninja builds") Signed-off-by: Bruce Richardson --- config/x86/meson.build | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/config/x86/meson.build b/config/x86/meson.build index 8b0fa3e6f..0d60204a5 100644 --- a/config/x86/meson.build +++ b/config/x86/meson.build @@ -15,11 +15,9 @@ if not is_windows endif # we require SSE4.2 for DPDK -sse_errormsg = '''SSE4.2 instruction set is required for DPDK. -Please set the machine type to "nehalem" or "corei7" or higher value''' - if cc.get_define('__SSE4_2__', args: machine_args) == '' - error(sse_errormsg) + message('SSE 4.2 not enabled by default, explicitly enabling') + machine_args += -msse4 endif base_flags = ['SSE', 'SSE2', 'SSE3','SSSE3', 'SSE4_1', 'SSE4_2'] -- 2.23.0