From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id E39B91DCBE; Thu, 14 Jun 2018 12:42:55 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jun 2018 03:42:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,222,1526367600"; d="scan'208";a="49844592" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.107]) by orsmga006.jf.intel.com with SMTP; 14 Jun 2018 03:42:52 -0700 Received: by (sSMTP sendmail emulation); Thu, 14 Jun 2018 11:42:51 +0100 Date: Thu, 14 Jun 2018 11:42:51 +0100 From: Bruce Richardson To: Gavin Hu Cc: dev@dpdk.org, stable@dpdk.org Message-ID: <20180614104250.GD17264@bricha3-MOBL.ger.corp.intel.com> References: <1527590616-28299-1-git-send-email-gavin.hu@arm.com> <20180614095127.16245-1-gavin.hu@arm.com> <20180614095127.16245-7-gavin.hu@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180614095127.16245-7-gavin.hu@arm.com> Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.10.0 (2018-05-17) Subject: Re: [dpdk-dev] [PATCH v6 6/7] build: fix the meson cross compile error 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: , X-List-Received-Date: Thu, 14 Jun 2018 10:42:56 -0000 On Thu, Jun 14, 2018 at 05:51:26PM +0800, Gavin Hu wrote: > The following error hits if host cc compiler is clang(default one in most > linux distributions) and the cross compiler is gcc. > > The root cause is: the hybride compilers add the warning options to the > meson project as project arguments, which apply for both host compiling and > cross compiling. But some options such as '-Wno-format-truncation' are not > supported nor recognized by clang, so they have to be removed from the > project arguments for the host compiler to run smoothily and added back as > cflags for the cross compiler to compile for cross source files. > > The fix is remove unrecognized warning options from the meson project > arguments shared by gcc and clang, as add them specifically for gcc or > clang as cflags. > > [265/893] Compiling C object > 'buildtools/pmdinfogen/pmdinfogen@exe/pmdinfogen.c.o'. warning: unknown > warning option '-Wno-format-truncation' [-Wunknown-warning-option] > > Fixes: a55277a788 ("devtools: add test script for meson builds") > Cc: stable@dpdk.org > > Signed-off-by: Gavin Hu > Reviewed-by: Phil Yang > Reviewed-by: Song Zhu > Reviewed-by: Steve Capper > --- Yes, I think this solution works. A cleaner fix might be to move away from having these flags as meson project arguments, and instead manage them directly in our files as arrays of native and cross cflags, but that can be a job for later. As it is: Acked-by: Bruce Richardson