From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0050.outbound.protection.outlook.com [104.47.40.50]) by dpdk.org (Postfix) with ESMTP id DD0DE326E for ; Wed, 26 Oct 2016 23:01:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=fvqNCfhTEu01OuONpujB5Hj/cw/ZpFQgBr2U0/uM8aM=; b=InZBTTDDgVDJiY3dIvPe2zC71jgNouurY/SCVxG+lUGI0IVp0hE5oUS2HvhwVpgGtlDxjSEAG5gqqMHXhauf/k5KtifG2P4PWKOQKwPkFDLey9DrwgUA2uhz6pmhgGEoRdE5MrPVVdLZ+6AkA9pZRh0SFEkb0Es9Rc5uFfXlzGw= Received: from BLUPR0701MB1572.namprd07.prod.outlook.com (10.163.84.146) by BLUPR0701MB1569.namprd07.prod.outlook.com (10.163.84.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.679.12; Wed, 26 Oct 2016 21:01:16 +0000 Received: from BLUPR0701MB1572.namprd07.prod.outlook.com ([10.163.84.146]) by BLUPR0701MB1572.namprd07.prod.outlook.com ([10.163.84.146]) with mapi id 15.01.0679.015; Wed, 26 Oct 2016 21:01:16 +0000 From: "Mody, Rasesh" To: Thomas Monjalon , Rasesh Mody Thread-Topic: [PATCH v4 07/32] net/qede: fix 32 bit compilation Thread-Index: AQHSKb8YqO9l4/Dfe0+A/Rayhl+CTaC6/58AgAAcG4A= Date: Wed, 26 Oct 2016 21:01:15 +0000 Message-ID: References: <1476850306-2141-1-git-send-email-rasesh.mody@qlogic.com> <1476850306-2141-8-git-send-email-rasesh.mody@qlogic.com> <1638805.EFUnSErrGQ@xps13> In-Reply-To: <1638805.EFUnSErrGQ@xps13> 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=Rasesh.Mody@cavium.com; x-originating-ip: [173.186.134.106] x-ms-office365-filtering-correlation-id: d7f9d485-cdce-49c6-297f-08d3fde339fd x-microsoft-exchange-diagnostics: 1; BLUPR0701MB1569; 7:6zJN0U/0gngsXLpxHu51B95Fj5QWoUhTVWEWckwsAzmDrgy7FcbPMGVJWFPigt4HcB3ymFjksG0F0IC8+hhnczrwLsNOHr2JH5U5EEqgRzscyc7jpJQTuWSxwoXJuyVnfvKv/SGommOb/7OaNjRaQ2+139f1cLXv/rACLPbDAQmN2TtodpyeY/PhyAbGrIjpyQuh2ri0dq9X2918qj1T0/YkzFzeMCa7IddJJZZs0jDaZUdAAxixhrZ1YxKAo7R1VcCa1J5Of8ZxDSVrktY1Rl+j73wTS/MF97eD+FV5c0cddAM+IziY451uaaAuWP+gfmS5uMuM98zzNiUY/e6+RLeXMjeCsROnjLqe3hOx06U= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR0701MB1569; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:BLUPR0701MB1569; BCL:0; PCL:0; RULEID:; SRVR:BLUPR0701MB1569; x-forefront-prvs: 0107098B6C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(377424004)(199003)(377454003)(189002)(19580405001)(101416001)(2900100001)(76576001)(77096005)(76176999)(9686002)(5660300001)(2950100002)(8676002)(87936001)(86362001)(99286002)(7846002)(105586002)(305945005)(74316002)(106356001)(7736002)(106116001)(54356999)(122556002)(66066001)(50986999)(7696004)(3280700002)(3660700001)(2906002)(4326007)(33656002)(11100500001)(5001770100001)(5002640100001)(97736004)(10400500002)(6116002)(102836003)(8936002)(68736007)(586003)(92566002)(81166006)(19580395003)(81156014)(189998001)(3846002)(4001150100001); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0701MB1569; H:BLUPR0701MB1572.namprd07.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Oct 2016 21:01:15.9792 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0701MB1569 Cc: "dev@dpdk.org" , "Dept-EngDPDKDev@qlogic.com" , "ferruh.yigit@intel.com" Subject: Re: [dpdk-dev] [PATCH v4 07/32] net/qede: fix 32 bit compilation 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, 26 Oct 2016 21:01:19 -0000 > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Wednesday, October 26, 2016 9:54 AM >=20 > 2016-10-18 21:11, Rasesh Mody: > > Fix 32 bit compilation for gcc version 4.3.4. > > > > Fixes: ec94dbc57362 ("qede: add base driver") > > > > Signed-off-by: Rasesh Mody > [...] > > ifeq ($(CONFIG_RTE_TOOLCHAIN_GCC),y) > > +ifeq ($(shell gcc -Wno-unused-but-set-variable -Werror -E - < > > +/dev/null > /dev/null 2>&1; echo $$?),0) > > CFLAGS_BASE_DRIVER +=3D -Wno-unused-but-set-variable > > +endif > > CFLAGS_BASE_DRIVER +=3D -Wno-missing-declarations > > +ifeq ($(shell gcc -Wno-maybe-uninitialized -Werror -E - < /dev/null > > > +/dev/null 2>&1; echo $$?),0) > > CFLAGS_BASE_DRIVER +=3D -Wno-maybe-uninitialized > > +endif > > CFLAGS_BASE_DRIVER +=3D -Wno-strict-prototypes ifeq ($(shell test > > $(GCC_VERSION) -ge 60 && echo 1), 1) CFLAGS_BASE_DRIVER +=3D > > -Wno-shift-negative-value >=20 > What the hell are you doing here? In one of our compilation testing on i586, we have gcc version 4.3.4. This = version of gcc gives us following errors: cc1: error: unrecognized command line option "-Wno-unused-but-set-variable" cc1: error: unrecognized command line option "-Wno-maybe-uninitialized" -Wno-unused-but-set-variable option was added only in gcc version 5.1.0 -Wno-maybe-uninitialized option was added only in gcc version 4.7.0 All that above change does is that it checks if -Wno-unused-but-set-variabl= e and -Wno-maybe-uninitialized options are available with gcc only then inc= lude them for compilation. > 1/ You should better fix "unused-but-set-variable" errors 2/ It won't wor= k > when cross-compiling because you do not use $(CC) > in $(shell gcc We tested on gcc version 6.2.0 on x86_64 without applying this patch. Error= s related to "unused-but-set-variable" option were not seen. The only error= s we saw are as noted above due to an older version of gcc. We do use $(shell gcc, however, it is used under ifeq ($(CONFIG_RTE_TOOLCHA= IN_GCC),y), so, I believe it should work when cross-compiling. For example,= in one of our compilation testing on clang version 3.8.0, with this patch = applied, we did not see any errors. Please let us know if you see otherwise= . However, I do agree it is better to use $(CC). We could change that with a = follow on patch. Thanks! -Rasesh >=20 > I really do not want to look at the qede patches. > But each time my eyes stop on one of them, I'm struggling.