From patchwork Mon Jul 25 10:57:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 15008 Return-Path: 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 09AE137AC; Mon, 25 Jul 2016 12:58:07 +0200 (CEST) Received: from mail-wm0-f49.google.com (mail-wm0-f49.google.com [74.125.82.49]) by dpdk.org (Postfix) with ESMTP id 6824E37A6 for ; Mon, 25 Jul 2016 12:58:05 +0200 (CEST) Received: by mail-wm0-f49.google.com with SMTP id o80so151023751wme.1 for ; Mon, 25 Jul 2016 03:58:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=gMH3cnPqBbFrQLFAZ62xNG4MW0KfMKYlqIpA5KLHAlc=; b=RCdPClV1gA/06Zw4c1EEeI6nWK7e536mVMktTQPZFxFko3oy+GRlZ+7ySyFkdOuaiP +ovK/rrK/6m+XyEtxOvjeB5DZeiHOfo0cVqKiUXVU9TS1ZY+kvBotRBiIlFDhBU88JhZ yJ6TRFzaBeRQg1DB7QMl4VaeuR4QMlc2YKA+44WWD7E08jAf32mWPR1itjyxm846tJ8I /gd+XLk0zTNl69OEc56Q5oQ1Pv5PQGv2htJgWoIAdbw4ocgzz1iL+SJNmY9ZVghdB8cj anZ+jTCy2nLNbE2Jw7DvasbF16p3Xmw6Z3VWmnG/wqpefmAAMjSzMUYXXNgEgv7Cnc4S S8cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=gMH3cnPqBbFrQLFAZ62xNG4MW0KfMKYlqIpA5KLHAlc=; b=G4IO41jd8iCP0f3jsVa2SQiczdNihZMA82W/pLh3lia0MRXd4cHxrXKRwOV7NnEvho s9RyWqSBSuzHq1slW72B1cqrwikwZT2Gkm/wbBXiyZfugbfLiGeYEmcdIrxwdlrE/+Qx rZzRA8XGjzPK1xGfIs1+qd6tvRJgMUzriuYncIjVqwG/AEjfgiDyenLrBqhO7f2xSlmj jAEoPcqMLE4hSjZQGEzRgLcTPy+z85QZjmeuhWe+f1WayTAIAo2VDNTBGzb3MLzjAivF wQjJPt1QdOO6rbWrWqXFUBmY5SdK9egmTzYR2//nHXBQQg+/73rWRzlmzsES3CAWt2a1 j5yg== X-Gm-Message-State: AEkooutN+Bu9QA7jkctVaZymo6ATZ9p5U7w3JB9kctrZqcwzPzbfrT7snwnLGaM3/QswNFnM X-Received: by 10.28.96.11 with SMTP id u11mr20152760wmb.5.1469444284919; Mon, 25 Jul 2016 03:58:04 -0700 (PDT) Received: from XPS13.localdomain (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id s184sm10699620wmb.11.2016.07.25.03.58.03 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 25 Jul 2016 03:58:04 -0700 (PDT) From: Thomas Monjalon To: dev@dpdk.org Date: Mon, 25 Jul 2016 12:57:54 +0200 Message-Id: <1469444274-11595-1-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 Subject: [dpdk-dev] [PATCH] mk: fix 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- app/test/Makefile | 1 - examples/ptpclient/Makefile | 1 - 2 files changed, 2 deletions(-) diff --git a/app/test/Makefile b/app/test/Makefile index 6015b19..49ea195 100644 --- a/app/test/Makefile +++ b/app/test/Makefile @@ -158,7 +158,6 @@ SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_string.c SRCS-$(CONFIG_RTE_LIBRTE_CMDLINE) += test_cmdline_lib.c ifeq ($(CONFIG_RTE_LIBRTE_SCHED),y) -LDLIBS += -lrt SRCS-y += test_red.c SRCS-y += test_sched.c endif diff --git a/examples/ptpclient/Makefile b/examples/ptpclient/Makefile index d241730..b77cf71 100644 --- a/examples/ptpclient/Makefile +++ b/examples/ptpclient/Makefile @@ -46,7 +46,6 @@ SRCS-y := ptpclient.c CFLAGS += -O3 CFLAGS += $(WERROR_FLAGS) -LDLIBS += -lrt # workaround for a gcc bug with noreturn attribute # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12603