From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH] mk: fix link with glibc < 2.17 Date: Mon, 25 Jul 2016 17:59:16 +0200 Message-ID: <1896818.PTnbAv7U2t@xps13> References: <1469444274-11595-1-git-send-email-thomas.monjalon@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: piotrx.t.azarewicz@intel.com Return-path: Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id C9E5A2BD9 for ; Mon, 25 Jul 2016 17:59:17 +0200 (CEST) Received: by mail-wm0-f48.google.com with SMTP id i5so163546082wmg.0 for ; Mon, 25 Jul 2016 08:59:17 -0700 (PDT) In-Reply-To: <1469444274-11595-1-git-send-email-thomas.monjalon@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2016-07-25 12:57, Thomas Monjalon: > There is a dependency on librt with old glibc. > The -lrt option was added everywhere it is needed but was also > added in some applications makefiles as the first link option. > The problem is this option is really useful only if added after > the objects or libraries using it (except if using --whole-archive). > And the -lrt options put after were removed to avoid duplicates. > > It was resulting in errors linking test application: > eal_timer.c:(.text+0x128): undefined reference to `clock_gettime' > eal_timer.c:(.text+0x166): undefined reference to `clock_gettime' > eal_alarm.c:(.text+0xda): undefined reference to `clock_gettime' > eal_alarm.c:(.text+0x211): undefined reference to `clock_gettime' > > It is fixed by removing superflous -lrt in app makefiles. > > Fixes: 281948b4753e ("mk: fix missing librt dependencies") > Fixes: 2f6414f4baf1 ("mk: fix static link with glibc < 2.17") > > Signed-off-by: Thomas Monjalon Reported-by: Piotr Azarewicz Applied, thanks