From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id CF51114EC; Mon, 28 May 2018 15:24:06 +0200 (CEST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN 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; 28 May 2018 06:24:05 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,452,1520924400"; d="scan'208";a="227957849" Received: from bricha3-mobl.ger.corp.intel.com ([10.237.221.55]) by orsmga005.jf.intel.com with SMTP; 28 May 2018 06:24:03 -0700 Received: by (sSMTP sendmail emulation); Mon, 28 May 2018 14:24:02 +0100 Date: Mon, 28 May 2018 14:24:02 +0100 From: Bruce Richardson To: Gavin Hu Cc: dev@dpdk.org, stable@dpdk.org Message-ID: <20180528132402.GC8752@bricha3-MOBL.ger.corp.intel.com> References: <1527133127-29407-1-git-send-email-gavin.hu@arm.com> <1527490428-15540-1-git-send-email-gavin.hu@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1527490428-15540-1-git-send-email-gavin.hu@arm.com> Organization: Intel Research and Development Ireland Ltd. User-Agent: Mutt/1.9.4 (2018-02-28) Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v2 1/2] mk: fix cross build errors X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 May 2018 13:24:07 -0000 On Mon, May 28, 2018 at 02:53:47AM -0400, Gavin Hu wrote: > The "-Wimplicit-fallthrough=2" option was introduced into gcc 7.0, it was > enabled when the cross compiler gcc is greater than 7.0, but for the host > side buildtools/pmdinfogen, if the native is older than 7.0, it should not > be enabled. > > The fix is to differentiate the host gcc Werror options from the cross gcc. > > gcc -Wp,-MD,./.pmdinfogen.o.d.tmp -W -Wall -Wstrict-prototypes > -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition > -Wpointer-arith -Wcast-align -Wnested-externs -Wcast-qual > -Wformat-nonliteral -Wformat-security -Wundef -Wwrite-strings -Wdeprecated > -Werror -Wimplicit-fallthrough=2 -Dbbb -Wno-format-truncation -g > -I/home/gavin/arm_repo/dpdk/build/include -o pmdinfogen.o -c > ~/dpdk/buildtools/pmdinfogen/pmdinfogen.c gcc: error: > unrecognized command line option ‘-Wimplicit-fallthrough=2’ > ~/dpdk/mk/internal/rte.compile-pre.mk:114: recipe for target 'pmdinfogen.o' > failed make[3]: *** [pmdinfogen.o] Error 1 > > Fixes: ced3e6f8 ("mk: adjust gcc flags for new gcc 7 warnings") > Cc: stable@dpdk.org > > Signed-off-by: Gavin Hu > Reviewed-by: Honnappa Nagarahalli > Reviewed-by: Steve Capper > Reviewed-by: Thomas Monjalon > --- Would a simpler solution for this not be to put "-Wno-implicit-fallthrough" for pmdinfogen? GCC will not give a warning for an unrecognised "-Wno" flag when compiling, unless there are other errors. This means we can just use the flag without bothering with version checks. /Bruce