From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id AADD28051 for ; Wed, 17 Dec 2014 11:41:47 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 17 Dec 2014 02:39:28 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.07,593,1413270000"; d="scan'208";a="625171478" Received: from irsmsx110.ger.corp.intel.com ([163.33.3.25]) by orsmga001.jf.intel.com with ESMTP; 17 Dec 2014 02:41:45 -0800 Received: from irsmsx107.ger.corp.intel.com ([169.254.10.190]) by IRSMSX110.ger.corp.intel.com ([169.254.15.55]) with mapi id 14.03.0195.001; Wed, 17 Dec 2014 10:41:44 +0000 From: "Gonzalez Monroy, Sergio" To: Thomas Monjalon Thread-Topic: [PATCH v2] mk: link combined shared lib using CC Thread-Index: AQHQGWiRKqc+/lmvUUmbuw+Xq+Mn5pyS4SqAgACzhVA= Date: Wed, 17 Dec 2014 10:41:44 +0000 Message-ID: <91383E96CE459D47BCE92EFBF5CE73B004F0B593@IRSMSX107.ger.corp.intel.com> References: <1414078550-692-1-git-send-email-sergio.gonzalez.monroy@intel.com> <1414511329-3948-1-git-send-email-sergio.gonzalez.monroy@intel.com> <5049551.Sg4yn1HA6q@xps13> <1505130.0FLpEfacGg@xps13> In-Reply-To: <1505130.0FLpEfacGg@xps13> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "dev@dpdk.org" Subject: Re: [dpdk-dev] [PATCH v2] mk: link combined shared lib using CC 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, 17 Dec 2014 10:41:48 -0000 > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Tuesday, December 16, 2014 11:43 PM >=20 > 2014-12-16 19:48, Thomas Monjalon: > > 2014-10-28 15:48, Sergio Gonzalez Monroy: > > > If we set EXTRA_CFLAGS=3D-O0, build fails with following error: > > > > > > /usr/bin/ld: test: hidden symbol `mknod' in > > > /usr/lib64/libc_nonshared.a(mknod.oS) is referenced by DSO > > > > > > Fix: link combined shared lib using CC if LINK_USING_CC is enabled. > > > > > > Signed-off-by: Sergio Gonzalez Monroy > > > > > > --- > > > mk/rte.lib.mk | 1 - > > > mk/rte.sharelib.mk | 12 +++++++++++- > > [...] > > > --- a/mk/rte.lib.mk > > > +++ b/mk/rte.lib.mk > > > @@ -63,7 +63,6 @@ ifeq ($(LINK_USING_CC),1) # Override the > > > definition of LD here, since we're linking with CC LD :=3D $(CC) > > > LD_MULDEFS :=3D $(call linkerprefix,-z$(comma)muldefs) -CPU_LDFLAGS := =3D > > > $(call linkerprefix,$(CPU_LDFLAGS)) endif > > > > Why are you removing this line? >=20 Hi Thomas, Basically the problem is when CPU_LDFLAGS has a value, which in the current= ly only happens if we set CPU_LDFLAGS in the command line or build i686 (se= tting CPU_LDFLAGS=3D-melf_i386). In those cases, given the way the makefiles are being included, CPU_LDFLAGS= is being 'linkerprefixed' twice, resulting in build error. Removing that line avoided the second linker prefix of the CPU_LDFLAGS (not= e that we reset the original var instead of using a different var name). There probably is a better way but I could not see an straightforward fix f= or it. I planned to improve the current build system (already sent an RFC) and was= waiting until 1.8 release to resume the work on it. Thanks, Sergio > If it's really needed, it could be another patch. >=20 > > > --- a/mk/rte.sharelib.mk > > > +++ b/mk/rte.sharelib.mk > > [...] >=20 > Acked-by: Thomas Monjalon >=20 > Applied without the change to rte.lib.mk. >=20 > Thanks > -- > Thomas