From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by dpdk.org (Postfix) with ESMTP id C3DBE2B98 for ; Wed, 26 Oct 2016 23:40:46 +0200 (CEST) Received: by mail-wm0-f53.google.com with SMTP id 140so40067809wmv.0 for ; Wed, 26 Oct 2016 14:40:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=YEHN4brgHWFXVDqEwp7KVmUFr0B+n4NJmIshyHuWVfQ=; b=fkhd0yWls7FTSKxWkrwBeON/yYZHUkGc3OG1HWcpZRPvp8ZGSzGmrH1juKb/cFXvVb HB2Vg18WTMsj6XB1DINCBwBPrke1j0QjBCQUr6HFoFzzAHSRGfHQBdXaMm2hmOUEUifP CTGMs6i6FG5Jh876trJYSnj3xcSU0A8i6/X46CUsIrye/JbmLdx0ocP9jbE5Oc8bLNLg 7UganexH7kp4zxL7LWG1qY/+rmHAPZTJaDRU03pl9b45DPcnRKv64KSm+7VE6GmH2b+l DJJmUTpEnPUO14qYcKb+rchAfwNiei+vU0lKKi8qH5Ww3bxtjzcjDD83qBDIcr0Yxg8P lDoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=YEHN4brgHWFXVDqEwp7KVmUFr0B+n4NJmIshyHuWVfQ=; b=fm5CzSQVsq0lokaDEanS4u+//SshY73Cel6ZzAS8Of67PAhWfgsFOuQ65NynDFHAIV wb2cnwP1nwZ8KSJDLPT9V5QNOB0aV0N7I5Nxid0SeoTstn/5vdBt5/bBBtutyKtsdJJ5 Yt/w5lV/nbOAF7GoeU2dZ2QJgmKJJNrl3nsO/v1R4UMyanDX0/IgJVeqaBJV0k/aumEg lKqkieXnjUovYROYf0rff8kLnjhWAo8lvM+mRzgCHuBa8RecFnhSbKGb6LDRa4BwrBER EMCruFU20du0QH8jMqA9WOCcGkOM3g1Y9Tlt0VxyR6NC45nGU/PGKBwYuXUpEVkcnepS LxdQ== X-Gm-Message-State: ABUngvdkaER8p68DbiQEU/ajnSe2kASdjsfIybxjHqSSU3PlN39jZHlZVW+zNjm4Gqn8VR/q X-Received: by 10.194.82.163 with SMTP id j3mr4646263wjy.56.1477518046426; Wed, 26 Oct 2016 14:40:46 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id l130sm11710846wmb.18.2016.10.26.14.40.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Oct 2016 14:40:45 -0700 (PDT) From: Thomas Monjalon To: "Mody, Rasesh" Date: Wed, 26 Oct 2016 23:40:45 +0200 Message-ID: <4958892.sIoVxbTeGS@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: References: <1476850306-2141-1-git-send-email-rasesh.mody@qlogic.com> <1638805.EFUnSErrGQ@xps13> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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:40:47 -0000 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 > > [...] > > > 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.