From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f47.google.com (mail-wm0-f47.google.com [74.125.82.47]) by dpdk.org (Postfix) with ESMTP id 6C9712C8 for ; Wed, 13 Jul 2016 09:42:19 +0200 (CEST) Received: by mail-wm0-f47.google.com with SMTP id i5so55112640wmg.0 for ; Wed, 13 Jul 2016 00:42:19 -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:in-reply-to:references; bh=f68ZNEJBCttNSkC4yi9UybBpmkgMGbLrL6VKwcNGvIU=; b=BvzRoNO/duJPGg+2Pb2ubsjbkxzlvqWJLZK/Vvwt1fdWdH2vHLyHqRTq3aewUJexmB W7T2WDnkGAdlskJDDVs5nD9o9yDlv9EJZKlb7KEFUAQicCzGz5j7ryyr9VpNV3Cc6vqR ENbaU898uESvScjApFifxf0NjZ0ufWDtp5EcMYcwjlimsq0NZT8DkwJqvfg4YY8yz75Y DR+hqWmHCg50Wa7D4nTkxMHOZKsb0cvUOjsXCztqt9uDJ4K6APp+gah939hgsvcNhyVY F/OMzYwjQoiIgTlUj1g2H6XWGvM/3NdlwjmF0FH7FgL+Rl6HnC4AcqAMibL8WfxAJtHl GmPw== 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:in-reply-to :references; bh=f68ZNEJBCttNSkC4yi9UybBpmkgMGbLrL6VKwcNGvIU=; b=ajkSNjlUPevF70DtxiXACoagdW9qCMBQuYAvm1Q23/1QtZXQaeuGh+Ygd1eUuA0i12 OfLc1Ny5U2EbvDMX27AcFdJ2M+IukaAr4uq9JMaAY/IsfY6Ax98qL6w7Pr6aakNoTPHp yuLKKfA5vlvIpgnPSvmQ3hQCOVzbhPZaoKN0F1shbEeOVWijvwB7PjtjtoEcBUjIqvLd hVOLHnLS1lamFp2reJLLxiwURXKAluUkHgOEBnTYuwdENtjgn04vOU8xR70iiwkboC3T hbJYHJtJA0qM3M1YjtxgFN7dcbxnr7aPh90rf9NyjRigF2zu2z+t4D1U9k4NK2nalfTw quTw== X-Gm-Message-State: ALyK8tKRi4kh8e4ddgTCiO8CfjoXV0FUyRTs4MMsNPbxQwGB93YM3KGMeIzN9GO+NXmtVGLY X-Received: by 10.28.4.77 with SMTP id 74mr8992184wme.84.1468395739049; Wed, 13 Jul 2016 00:42:19 -0700 (PDT) Received: from XPS13.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id a191sm8732538wme.5.2016.07.13.00.42.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 13 Jul 2016 00:42:18 -0700 (PDT) From: Thomas Monjalon To: dev@dpdk.org Date: Wed, 13 Jul 2016 09:42:08 +0200 Message-Id: <1468395728-6968-2-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1468395728-6968-1-git-send-email-thomas.monjalon@6wind.com> References: <1468395728-6968-1-git-send-email-thomas.monjalon@6wind.com> Subject: [dpdk-dev] [PATCH 2/2] mk: fix dependency on toolchain libraries 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, 13 Jul 2016 07:42:19 -0000 The -l options specifying libraries to link with are in LDLIBS. But it can happen to have some libraries in other variables. In case of a low level dependency specified in some environments via EXTRA_LDFLAGS, there can be an unresolved issue due to a wrong linking order. Indeed the libraries must be specified from the higher level (dependency consumers) to the lower level (dependencies). It is fixed by moving LDLIBS before LDFLAGS variables in the link command line. Signed-off-by: Thomas Monjalon Tested-by: Raslan Darawsheh --- mk/rte.app.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mk/rte.app.mk b/mk/rte.app.mk index f9acb74..886dbdd 100644 --- a/mk/rte.app.mk +++ b/mk/rte.app.mk @@ -193,11 +193,11 @@ exe2cmd = $(strip $(call dotfile,$(patsubst %,%.cmd,$(1)))) ifeq ($(LINK_USING_CC),1) O_TO_EXE = $(CC) -o $@ $(CFLAGS) $(OBJS-y) $(call linkerprefix, \ - $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) $(LDLIBS) \ + $(LDLIBS) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \ $(MAPFLAGS)) else O_TO_EXE = $(LD) -o $@ $(OBJS-y) \ - $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) $(LDLIBS) \ + $(LDLIBS) $(LDFLAGS) $(LDFLAGS_$(@)) $(EXTRA_LDFLAGS) \ $(MAPFLAGS) endif O_TO_EXE_STR = $(subst ','\'',$(O_TO_EXE)) #'# fix syntax highlight -- 2.7.0