DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: "Mody, Rasesh" <Rasesh.Mody@cavium.com>
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
Date: Wed, 26 Oct 2016 23:40:45 +0200	[thread overview]
Message-ID: <4958892.sIoVxbTeGS@xps13> (raw)
In-Reply-To: <BLUPR0701MB15720701BD38B1C2B178C3639FAB0@BLUPR0701MB1572.namprd07.prod.outlook.com>

2016-10-26 21:01, Mody, Rasesh:
> > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> > Sent: Wednesday, October 26, 2016 9:54 AM
> > 
> > 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 <rasesh.mody@qlogic.com>
> > [...]
> > >  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 += -Wno-unused-but-set-variable
> > > +endif
> > >  CFLAGS_BASE_DRIVER += -Wno-missing-declarations
> > > +ifeq ($(shell gcc -Wno-maybe-uninitialized -Werror -E - < /dev/null >
> > > +/dev/null 2>&1; echo $$?),0)
> > >  CFLAGS_BASE_DRIVER += -Wno-maybe-uninitialized
> > > +endif
> > >  CFLAGS_BASE_DRIVER += -Wno-strict-prototypes  ifeq ($(shell test
> > > $(GCC_VERSION) -ge 60 && echo 1), 1)  CFLAGS_BASE_DRIVER +=
> > > -Wno-shift-negative-value
> > 
> > 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-variable and -Wno-maybe-uninitialized options are available with gcc only then include them for compilation.

Have you tried to look what is done for other drivers?
It is using GCC_VERSION to check the compatibility.

> > 1/ You should better fix "unused-but-set-variable" errors 2/ It won't work
> > 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. Errors related to "unused-but-set-variable" option were not seen. The only errors 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_TOOLCHAIN_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.

Cross-compilation is using $(CROSS) prefix, e.g. when compiling for ARM on x86.

> However, I do agree it is better to use $(CC). We could change that with a follow on patch.

Please fix this patch by using GCC_VERSION.

  reply	other threads:[~2016-10-26 21:40 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-19  4:11 [dpdk-dev] [PATCH v4 00/32] net/qede: update qede pmd to 1.2.0.1 and enable by default Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 01/32] net/qede/base: add new init files and rearrange the code Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 02/32] net/qede/base: formatting changes Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 03/32] net/qede: use FW CONFIG defines as needed Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 04/32] net/qede/base: add HSI changes and register defines Rasesh Mody
2016-10-19 12:37   ` Ferruh Yigit
2016-10-19 13:46     ` Mody, Rasesh
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 05/32] net/qede/base: add attention formatting string Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 06/32] net/qede/base: additional formatting/comment changes Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 07/32] net/qede: fix 32 bit compilation Rasesh Mody
2016-10-26 16:54   ` Thomas Monjalon
2016-10-26 21:01     ` Mody, Rasesh
2016-10-26 21:40       ` Thomas Monjalon [this message]
2016-10-28  6:37         ` [dpdk-dev] [PATCH] net/qede: fix gcc compiler option checks Rasesh Mody
2016-10-28 22:12           ` Stephen Hemminger
2016-10-28 22:49             ` Mody, Rasesh
2016-11-07 19:54               ` Thomas Monjalon
2016-11-07 20:10           ` Thomas Monjalon
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 08/32] net/qede: change signature of MCP command API Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 09/32] net/qede: serialize access to MFW mbox Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 10/32] net/qede: add NIC selftest and query sensor info support Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 11/32] net/qede/base: update base driver Rasesh Mody
2021-03-24 14:07   ` Ferruh Yigit
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 12/32] net/qede/base: rename structure and defines Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 13/32] net/qede/base: comment enhancements Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 14/32] net/qede/base: add MFW crash dump support Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 15/32] net/qede: enable support for unequal number of Rx/Tx queues Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 16/32] net/qede: fix port (re)configuration issue Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 17/32] net/qede/base: allow MTU change via vport-update Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 18/32] net/qede: add missing 100G link speed capability Rasesh Mody
2016-10-26 15:41   ` Thomas Monjalon
2016-10-26 15:54     ` Bruce Richardson
2016-10-26 21:28     ` Harish Patil
2016-10-26 21:43       ` Thomas Monjalon
2016-10-28  6:42         ` [dpdk-dev] [PATCH] net/qede: fix advertising " Rasesh Mody
2016-10-28  7:26           ` Thomas Monjalon
2016-10-29  1:11             ` Harish Patil
2016-10-29  6:14             ` [dpdk-dev] [PATCH v2] " Rasesh Mody
2016-10-31 18:35               ` [dpdk-dev] [PATCH v3] " Rasesh Mody
2016-10-31 18:35                 ` Rasesh Mody
2016-11-07 19:48                   ` Thomas Monjalon
2016-11-10  2:54                     ` Harish Patil
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 19/32] net/qede: remove unused/dead code Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 20/32] net/qede: fixes for VLAN filters Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 21/32] net/qede: add enable/disable VLAN filtering Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 22/32] net/qede: fix RSS related issues Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 23/32] net/qede: add scatter gather support Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 24/32] net/qede/base: change Rx Tx queue start APIs Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 25/32] net/qede/base: add support to initiate PF FLR Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 26/32] net/qede: skip slowpath polling for 100G VF device Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 27/32] net/qede: fix driver version string Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 28/32] net/qede: fix status block index for VF queues Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 29/32] net/qede: add support for queue statistics Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 30/32] net/qede: remove zlib dependency and enable PMD by default Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 31/32] doc: update qede pmd documentation Rasesh Mody
2016-10-19  4:11 ` [dpdk-dev] [PATCH v4 32/32] net/qede: update driver version Rasesh Mody
2016-10-24 13:41 ` [dpdk-dev] [PATCH v4 00/32] net/qede: update qede pmd to 1.2.0.1 and enable by default Bruce Richardson
2016-10-26 15:20   ` Thomas Monjalon
2016-10-26 17:01     ` Mody, Rasesh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4958892.sIoVxbTeGS@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=Dept-EngDPDKDev@qlogic.com \
    --cc=Rasesh.Mody@cavium.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).