From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <yongjiex.gu@intel.com>
Received: from mga04.intel.com (mga04.intel.com [192.55.52.120])
 by dpdk.org (Postfix) with ESMTP id A0BA03978
 for <dev@dpdk.org>; Wed, 20 Jul 2016 03:19:33 +0200 (CEST)
Received: from fmsmga002.fm.intel.com ([10.253.24.26])
 by fmsmga104.fm.intel.com with ESMTP; 19 Jul 2016 18:19:34 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.28,391,1464678000"; 
 d="scan'208,217";a="1025193539"
Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203])
 by fmsmga002.fm.intel.com with ESMTP; 19 Jul 2016 18:19:32 -0700
Received: from fmsmsx121.amr.corp.intel.com (10.18.125.36) by
 FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS)
 id 14.3.248.2; Tue, 19 Jul 2016 18:19:32 -0700
Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by
 fmsmsx121.amr.corp.intel.com (10.18.125.36) with Microsoft SMTP Server (TLS)
 id 14.3.248.2; Tue, 19 Jul 2016 18:19:32 -0700
Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.8]) by
 SHSMSX104.ccr.corp.intel.com ([169.254.5.116]) with mapi id 14.03.0248.002;
 Wed, 20 Jul 2016 09:19:30 +0800
From: "Gu, YongjieX" <yongjiex.gu@intel.com>
To: Thomas Monjalon <thomas.monjalon@6wind.com>, "dev@dpdk.org" <dev@dpdk.org>
Thread-Topic: [dpdk-dev] [PATCH] mk: fix static link with glibc < 2.17
Thread-Index: AQHR4NkIU2wVWo/QNUmgJyS04ItOlqAfdjeg
Date: Wed, 20 Jul 2016 01:19:29 +0000
Message-ID: <E1E7EC9273ACA248A8E9BE46A66CE0A03EBCFC54@SHSMSX101.ccr.corp.intel.com>
References: <1468835025-3333-1-git-send-email-thomas.monjalon@6wind.com>
In-Reply-To: <1468835025-3333-1-git-send-email-thomas.monjalon@6wind.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-originating-ip: [10.239.127.40]
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
X-Content-Filtered-By: Mailman/MimeDel 2.1.15
Subject: Re: [dpdk-dev] [PATCH] mk: fix static link with glibc < 2.17
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>
X-List-Received-Date: Wed, 20 Jul 2016 01:19:34 -0000

Tested-by: Yongjie Gu <yongjiex.gu@intel.com>



- Check patch: success

- Apply patch: success

- compilation: success

     OS: fedora20

     GCC: gcc_x86-64, 4.8.3

     ICC: 16.0.2

Commit: 608487f3fc96704271c624d0f3fe9d7fb2187aea<http://dpdk.org/browse/dpd=
k/commit/?id=3D608487f3fc96704271c624d0f3fe9d7fb2187aea>

     i686-native-linuxapp-icc: compile pass

     x86_64-native-linuxapp-gcc-combined: compile pass

     i686-native-linuxapp-gcc: compile pass

     x86_64-native-linuxapp-gcc: compile pass

     x86_64-native-linuxapp-icc: compile pass

     x86_64-native-linuxapp-gcc-debug: compile pass

     x86_64-native-linuxapp-gcc-shared: compile pass

     x86_64-native-linuxapp-clang: compile pass



     OS: UB1204

     GCC: 4.6.3

     Kernel: 3.8.0-29

Commit: 608487f3fc96704271c624d0f3fe9d7fb2187aea<http://dpdk.org/browse/dpd=
k/commit/?id=3D608487f3fc96704271c624d0f3fe9d7fb2187aea>

X86_64-ivshmem-linuxapp-gcc: compile pass







Thanks

Yongjie



-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon
Sent: Monday, July 18, 2016 5:44 PM
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH] mk: fix static link with glibc < 2.17



There is an error when linking static EAL library with an application:



eal_alarm.c:(.text+0xd7): undefined reference to `clock_gettime'

eal_alarm.c:(.text+0x20f): undefined reference to `clock_gettime'

eal_timer.c:(.text+0x108): undefined reference to `clock_gettime'

eal_timer.c:(.text+0x146): undefined reference to `clock_gettime'



The function clock_gettime() is in librt for old glibc.



Fixes: 281948b4753e ("mk: fix missing librt dependencies")



Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com<mailto:thomas.mon=
jalon@6wind.com>>

---

mk/rte.app.mk | 1 +

1 file changed, 1 insertion(+)



diff --git a/mk/rte.app.mk b/mk/rte.app.mk index 886dbdd..eb28e11 100644

--- a/mk/rte.app.mk

+++ b/mk/rte.app.mk

@@ -151,6 +151,7 @@ _LDLIBS-y +=3D --no-whole-archive  ifeq ($(CONFIG_RTE_B=
UILD_SHARED_LIB),n)

# The static libraries do not know their dependencies.

# So linking with static library requires explicit dependencies.

+_LDLIBS-$(CONFIG_RTE_LIBRTE_EAL)            +=3D -lrt

_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          +=3D -lm

_LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          +=3D -lrt

_LDLIBS-$(CONFIG_RTE_LIBRTE_METER)          +=3D -lm

--

2.7.0