Message ID | 1413995782-8716-1-git-send-email-sergio.gonzalez.monroy@intel.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id E6F097E89; Wed, 22 Oct 2014 18:30:20 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 3A3A0593A for <dev@dpdk.org>; Wed, 22 Oct 2014 18:30:17 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 22 Oct 2014 09:37:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,769,1406617200"; d="scan'208";a="623321346" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga002.jf.intel.com with ESMTP; 22 Oct 2014 09:36:23 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id s9MGaMQZ018189 for <dev@dpdk.org>; Wed, 22 Oct 2014 17:36:22 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id s9MGaMjp008755 for <dev@dpdk.org>; Wed, 22 Oct 2014 17:36:22 +0100 Received: (from smonroy@localhost) by sivswdev02.ir.intel.com with id s9MGaMxQ008751 for dev@dpdk.org; Wed, 22 Oct 2014 17:36:22 +0100 From: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com> To: dev@dpdk.org Date: Wed, 22 Oct 2014 17:36:22 +0100 Message-Id: <1413995782-8716-1-git-send-email-sergio.gonzalez.monroy@intel.com> X-Mailer: git-send-email 1.8.5.4 Subject: [dpdk-dev] [PATCH] mk: fix build 32bits shared libs on 64bits system X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
Sergio Gonzalez Monroy
Oct. 22, 2014, 4:36 p.m. UTC
Incompatible libraries error when building shared libraries for 32bits on
a 64bits system.
Fix issue by passing CPU_CFLAGS to CC when LINK_USING_CC is enabled.
Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
---
mk/rte.lib.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
> -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Sergio Gonzalez > Monroy > Sent: Wednesday, October 22, 2014 5:36 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH] mk: fix build 32bits shared libs on 64bits system > > Incompatible libraries error when building shared libraries for 32bits on > a 64bits system. > Fix issue by passing CPU_CFLAGS to CC when LINK_USING_CC is enabled. > > Signed-off-by: Sergio Gonzalez Monroy > <sergio.gonzalez.monroy@intel.com> Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Hi Sergio, 2014-10-22 17:36, Sergio Gonzalez Monroy: > Incompatible libraries error when building shared libraries for 32bits on > a 64bits system. > Fix issue by passing CPU_CFLAGS to CC when LINK_USING_CC is enabled. This issue looks really strange. If that's the only way to fix it, it would be better to have a comment in the makefile and a detailed explanation in the commit log. Thanks
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Friday, November 28, 2014 3:49 PM > > Hi Sergio, > > 2014-10-22 17:36, Sergio Gonzalez Monroy: > > Incompatible libraries error when building shared libraries for 32bits > > on a 64bits system. > > Fix issue by passing CPU_CFLAGS to CC when LINK_USING_CC is enabled. > > This issue looks really strange. If that's the only way to fix it, it would be > better to have a comment in the makefile and a detailed explanation in the > commit log. > Hi Thomas, There may be a better way to deal with this, please feel free to suggest alternate method. We do specify -m32 or -m64 when building the DPDK. The issue is that we were not specifying -m32 when linking, therefore the wrong libraries were being picked. At the time CPU_CFLAGS was only being set with -m32/-m64, reason why I used such variable. Would it be better to create another var and pass it down? Thanks, Sergio > Thanks > -- > Thomas
On Wed, Oct 22, 2014 at 05:36:22PM +0100, Sergio Gonzalez Monroy wrote: > Incompatible libraries error when building shared libraries for 32bits on > a 64bits system. > Fix issue by passing CPU_CFLAGS to CC when LINK_USING_CC is enabled. > > Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com> > Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> > > --- > mk/rte.lib.mk | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk > index f458258..d83e808 100644 > --- a/mk/rte.lib.mk > +++ b/mk/rte.lib.mk > @@ -61,7 +61,7 @@ exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1)))) > > ifeq ($(LINK_USING_CC),1) > # Override the definition of LD here, since we're linking with CC > -LD := $(CC) > +LD := $(CC) $(CPU_CFLAGS) > LD_MULDEFS := $(call linkerprefix,-z$(comma)muldefs) > CPU_LDFLAGS := $(call linkerprefix,$(CPU_LDFLAGS)) > endif Acked-by: Neil Horman <nhorman@tuxdriver.com>
> > Incompatible libraries error when building shared libraries for 32bits on > > a 64bits system. > > Fix issue by passing CPU_CFLAGS to CC when LINK_USING_CC is enabled. > > > > Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com> > > Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> > > Acked-by: Neil Horman <nhorman@tuxdriver.com> Applied Thanks
diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk index f458258..d83e808 100644 --- a/mk/rte.lib.mk +++ b/mk/rte.lib.mk @@ -61,7 +61,7 @@ exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1)))) ifeq ($(LINK_USING_CC),1) # Override the definition of LD here, since we're linking with CC -LD := $(CC) +LD := $(CC) $(CPU_CFLAGS) LD_MULDEFS := $(call linkerprefix,-z$(comma)muldefs) CPU_LDFLAGS := $(call linkerprefix,$(CPU_LDFLAGS)) endif