From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0052.outbound.protection.outlook.com [104.47.2.52]) by dpdk.org (Postfix) with ESMTP id 5D8252F4F for ; Wed, 30 May 2018 04:45:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=armh.onmicrosoft.com; s=selector1-arm-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8gQyCXaD7W6ChsmLohLPcm0M8kwfYChefw1ti6D90lo=; b=D1/wBjfA+1KU6seud5zXxcpJ8XVFmNUORg+PUbwyhfxeakon+3BNaAYkX9x7GzcUEzRQHlO0AbVM3Fq6g78rEzwtenLl5llSySAWUW/9lovHaOfZ80TOSuMqyrcYErJTPT4OiYcwPWCVGmA2lwVcuGaFpLZMw+YdHZM+Xz/yKUs= Received: from VI1PR08MB3167.eurprd08.prod.outlook.com (52.133.15.142) by VI1PR08MB3213.eurprd08.prod.outlook.com (52.133.15.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.797.11; Wed, 30 May 2018 02:45:20 +0000 Received: from VI1PR08MB3167.eurprd08.prod.outlook.com ([fe80::a105:3320:f324:a919]) by VI1PR08MB3167.eurprd08.prod.outlook.com ([fe80::a105:3320:f324:a919%13]) with mapi id 15.20.0797.015; Wed, 30 May 2018 02:45:20 +0000 From: Gavin Hu To: Bruce Richardson , Thomas Monjalon CC: "dev@dpdk.org" Thread-Topic: [dpdk-stable] [dpdk-dev] [PATCH v5 1/2] mk: fix cross build errors Thread-Index: AdP3vrRgN4jjc2YBQu6SVmzHn/eNtA== Date: Wed, 30 May 2018 02:45:19 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Gavin.Hu@arm.com; x-originating-ip: [113.29.88.7] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; VI1PR08MB3213; 7:1tuNntX57Pyfrg5Gn7jf5hhk333SXd3LvG4mEM//WlzjLFqc0AOEDbmeUf0pQafLhkcXG+6B3Ahs67W03dtfEUT5ZBOX+5lKVqvsED8zCNxQ64L+7ldBxNeLn/ZPQMH5YcbHtZqZUefsdmqT8DTEYU+LqTZG3PZBWcWyPV7vtKRvUMuAO8V8oTqL89g/DI5nk8RkOmsV4c2l/Fi8uzYn9pwBNHsCgxe/Q2iPU6hj4vkBzyadMU7frMT/IVGdBDg1 x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(48565401081)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:VI1PR08MB3213; x-ms-traffictypediagnostic: VI1PR08MB3213: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(180628864354917)(21748063052155)(228905959029699); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3231254)(944501410)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(149027)(150027)(6041310)(20161123558120)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(6072148)(201708071742011)(7699016); SRVR:VI1PR08MB3213; BCL:0; PCL:0; RULEID:; SRVR:VI1PR08MB3213; x-forefront-prvs: 0688BF9B46 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(376002)(346002)(396003)(39380400002)(366004)(189003)(199004)(40434004)(13464003)(66066001)(486006)(26005)(25786009)(74316002)(478600001)(305945005)(6306002)(3660700001)(186003)(6436002)(9686003)(99286004)(102836004)(14454004)(53936002)(7696005)(55016002)(6246003)(3846002)(6116002)(55236004)(72206003)(110136005)(2906002)(7736002)(966005)(4326008)(33656002)(59450400001)(5660300001)(3280700002)(6506007)(8936002)(97736004)(86362001)(8676002)(229853002)(68736007)(81156014)(81166006)(316002)(5890100001)(2900100001)(106356001)(105586002)(5250100002)(476003); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR08MB3213; H:VI1PR08MB3167.eurprd08.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: arm.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: jyFB1YnoV2AbCqf5dn0mSvsWgFMIJ6nMj3iTTnOmqpWtclW8OyhAaCVZhptEWgUVnuXs/n6T8vsZwRlvJqRZZqdI4oJrwrAKapyloJXPy4/uPl1KZTppX9RrgaUe0wfYgvVhhF0JAwXL1DK5ZM0J6SpxROyqcrJ8wVmM+pSmiSS4HuRqz/EANWFqeZTOiBag spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: ab13f0c2-1c4b-4ae4-4134-08d5c5d7624c X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-Network-Message-Id: ab13f0c2-1c4b-4ae4-4134-08d5c5d7624c X-MS-Exchange-CrossTenant-originalarrivaltime: 30 May 2018 02:45:19.9504 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR08MB3213 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v5 1/2] mk: fix cross build errors 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: Wed, 30 May 2018 02:45:22 -0000 > -----Original Message----- > From: Bruce Richardson > Sent: Tuesday, May 29, 2018 11:00 PM > To: Thomas Monjalon > Cc: Gavin Hu ; dev@dpdk.org > Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v2 1/2] mk: fix cross build > errors > > On Tue, May 29, 2018 at 04:45:55PM +0200, Thomas Monjalon wrote: > > 28/05/2018 15:24, Bruce Richardson: > > > 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. > > > > No, it does not work. > > I have this error with clang 5.0.1: > > error: unknown warning option '-Wno-format-truncation' > > > Yes, you still need to check for GCC to use the flag, just not for a spec= ific > version of GCC. > > /Bruce [Gavin Hu] Hi Thomas, '-Wno-format-truncation' is applied to gcc only, not = to clang. Gcc, icc and clang have their own WERROR_FLAGS, they should not mix up with= each other. @Bruce, Yes, in this sense, I am really concerned about to add -Wno-implicit-fallth= rough option in the pmdinfogen Makefile, as it impacts not only gcc, but al= so clang and icc. Maybe this not a best solution, as maybe it is not supported by all compile= rs. So should I fall back to the previous patch which check for the gcc ver= sion and apply the options for gcc only? toolchain/clang/rte.vars.mk:38:WERROR_FLAGS :=3D -W -Wall -Wstrict-prototyp= es -Wmissing-prototypes toolchain/clang/rte.vars.mk:39:WERROR_FLAGS +=3D -Wmissing-declarations -Wo= ld-style-definition -Wpointer-arith toolchain/clang/rte.vars.mk:40:WERROR_FLAGS +=3D -Wnested-externs -Wcast-qu= al toolchain/clang/rte.vars.mk:41:WERROR_FLAGS +=3D -Wformat-nonliteral -Wform= at-security toolchain/clang/rte.vars.mk:42:WERROR_FLAGS +=3D -Wundef -Wwrite-strings -W= deprecated toolchain/clang/rte.vars.mk:45:WERROR_FLAGS +=3D -Werror toolchain/clang/rte.vars.mk:52:WERROR_FLAGS +=3D -Wno-missing-field-initial= izers toolchain/clang/rte.vars.mk:56:WERROR_FLAGS +=3D -Wno-address-of-packed-mem= ber toolchain/gcc/rte.vars.mk:46:WERROR_FLAGS :=3D -W -Wall -Wstrict-prototypes= -Wmissing-prototypes toolchain/gcc/rte.vars.mk:47:WERROR_FLAGS +=3D -Wmissing-declarations -Wold= -style-definition -Wpointer-arith toolchain/gcc/rte.vars.mk:48:WERROR_FLAGS +=3D -Wcast-align -Wnested-extern= s -Wcast-qual toolchain/gcc/rte.vars.mk:49:WERROR_FLAGS +=3D -Wformat-nonliteral -Wformat= -security toolchain/gcc/rte.vars.mk:50:WERROR_FLAGS +=3D -Wundef -Wwrite-strings -Wde= precated toolchain/gcc/rte.vars.mk:53:WERROR_FLAGS +=3D -Werror toolchain/gcc/rte.vars.mk:59:WERROR_FLAGS +=3D -Wno-error=3Dcast-align toolchain/gcc/rte.vars.mk:67:WERROR_FLAGS +=3D -Wno-missing-field-initializ= ers toolchain/gcc/rte.vars.mk:71:WERROR_FLAGS +=3D -Wno-uninitialized toolchain/gcc/rte.vars.mk:76:WERROR_FLAGS +=3D -Wimplicit-fallthrough=3D2 toolchain/gcc/rte.vars.mk:78:WERROR_FLAGS +=3D -Wno-format-truncation I tried at my side with clang-3.5 on X86 and clang-6.0 on ARM64. The buildi= ngs were successful. Unfortunately I did not have clang-5.0 machines. clang -Wp,-MD,./.pmdinfogen.o.d.tmp -Wno-implicit-fallthrough -W -Wall -Ws= trict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wold-style-de= finition -Wpointer-arith -Wnested-externs -Wcast-qual -Wformat-nonliteral -= Wformat-security -Wundef -Wwrite-strings -Wdeprecated -Werror -Wno-missing-= field-initializers -g -I/home/gavin/community/dpdk/build/include -o pmdi= nfogen.o -c /home/gavin/community/dpdk/buildtools/pmdinfogen/pmdinfogen.c IMPORTANT NOTICE: The contents of this email and any attachments are confid= ential and may also be privileged. If you are not the intended recipient, p= lease notify the sender immediately and do not disclose the contents to any= other person, use it for any purpose, or store or copy the information in = any medium. Thank you.