From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk0-f171.google.com (mail-qk0-f171.google.com [209.85.220.171]) by dpdk.org (Postfix) with ESMTP id 385A558C3 for ; Tue, 24 May 2016 12:12:19 +0200 (CEST) Received: by mail-qk0-f171.google.com with SMTP id y126so7474462qke.1 for ; Tue, 24 May 2016 03:12:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=l6E8SLJp08bEeQodllfBHY41ig2wggl2IdCELvsXEY8=; b=V6WBUVEaz0DJwPiNTnTKIKtUi6qg06kCWD3PKzdDuEsQpRaP9cbyKd4+bdHpcvXfXr 7l6zzJXJAnR6Yp9lKGBi2BYQNaXjxtqt7/NYcexAgpML+qc6OQuvDDuchvpo7YXq5qHm ovK3pQaiwHb4ryg4XwUeNS71Bfq6jr7Dgy/LJ4ZjrguZpq9dWJ99FIEzAsIzviDJ3bBh HSCN6gvu1t4btV42LGr8Cqy9AJW7UnGmE6hVDuUsac3NsylAy3o8tDumTZ2MOlBpU8Ze gv4v6dzJdfPOXIrWWxnOhchf34MKUk9pw3jfh2XtVLbDjLPoO9bhdS5Jj9tWWuCYusI5 27hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=l6E8SLJp08bEeQodllfBHY41ig2wggl2IdCELvsXEY8=; b=HPUJsqtP6YcYOtx6gQ0e2BQPRalux7GE13UCYoeqjloTPH25XPavTpEaahehpKhtNT B/e1bTEP66QK3f4QSjk3gCZO/YiiSNCvc18yJs+dUbL7fTgUOS937TXGxTwX+5IVCyIN fcDjpiJ6Q9rcuYMaaHjYkAN2xeh/W2qcGPelxdQNB7qp/elsqK9UDiUtwW2O2wopBap0 A3WpuPinwtdsw3rURPKJXjkwHAgsLmO23HiE2h4E30ORNnu1l4xOVNs2uWyiePd8VBAl nV5N/aOHP4nHfdJI7PtwU9ZNnoqbDmEdP5AXO3uvyfOUwdy2Es25cKSWkZKg/6ymKCBP QUgw== X-Gm-Message-State: ALyK8tLxZtH2JYn3uYy+MWjxQA8gJ8R5vjTjBn+W8Q4Gsik76uZ8raHsYpj7EqdDJK7HgepagOqn+SvLoG5wrBYY X-Received: by 10.200.46.82 with SMTP id s18mr3252510qta.12.1464084738547; Tue, 24 May 2016 03:12:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.55.97.3 with HTTP; Tue, 24 May 2016 03:11:58 -0700 (PDT) In-Reply-To: <78bbf74c-9621-9094-a280-76ed9fc88393@redhat.com> References: <1463763022-6673-1-git-send-email-christian.ehrhardt@canonical.com> <7920424.umDpp4ukym@xps13> <78bbf74c-9621-9094-a280-76ed9fc88393@redhat.com> From: Christian Ehrhardt Date: Tue, 24 May 2016 12:11:58 +0200 Message-ID: To: Panu Matilainen Cc: Thomas Monjalon , dev Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] mk: fix underlinking issues of most librte 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: Tue, 24 May 2016 10:12:19 -0000 Hi Panu, I already agreed to Thomas on IRC but won't have time until next week. Thanks for making a patch that does that already - I'll give it a look and some test on my end next week then. Christian Ehrhardt Software Engineer, Ubuntu Server Canonical Ltd On Tue, May 24, 2016 at 11:56 AM, Panu Matilainen wrote: > On 05/20/2016 08:08 PM, Thomas Monjalon wrote: > >> 2016-05-20 18:50, Christian Ehrhardt: >> >>> The individual libraries have various cross dependencies. >>> This is already refelcted in the DEPDIR dependency, but not yet in >>> proper DT_NEEDED flags in the .so's. >>> This adds the -l flags so that is properly stored in the .so's ELF >>> headers. >>> >> >> Why not filling LDLIBS by parsing DEPDIRS-y in rte.lib.mk? >> >> > A fair question :) The thought has passed my mind too, but I thought it'd > be too messy with differing library vs directory names and other > exceptions. But in reality manually maintained separate LDLIBS is only > going to get out of sync sooner or later, and turns out its not that bad > anyway: > > diff --git a/mk/rte.lib.mk b/mk/rte.lib.mk > index b420280..88b4e98 100644 > --- a/mk/rte.lib.mk > +++ b/mk/rte.lib.mk > @@ -77,6 +77,12 @@ else > _CPU_LDFLAGS := $(CPU_LDFLAGS) > endif > > +# Translate DEPDIRS-y into LDLIBS > +IGNORE_DEPS = -lrte_eal/% -lrte_net -lrte_compat > +_LDDIRS = $(subst librte_ether,libethdev,$(DEPDIRS-y)) > +_LDDEPS = $(subst lib/lib,-l,$(_LDDIRS)) > +LDLIBS += $(filter-out $(IGNORE_DEPS), $(_LDDEPS)) > + > O_TO_A = $(AR) crDs $(LIB) $(OBJS-y) > O_TO_A_STR = $(subst ','\'',$(O_TO_A)) #'# fix syntax highlight > O_TO_A_DISP = $(if $(V),"$(O_TO_A_STR)"," AR $(@)") > > I'm also sure somebody more familiar with gmake could improve it, but it > seems to work quite fine here. I'll wait a bit to see if there are other > suggestions before sending it as a proper patch. > > - Panu - >