From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 65394A051F for ; Wed, 10 Jun 2020 16:40:09 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2E1891BF80; Wed, 10 Jun 2020 16:40:09 +0200 (CEST) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id F3A491BF80 for ; Wed, 10 Jun 2020 16:40:07 +0200 (CEST) Received: by mail-wr1-f66.google.com with SMTP id x14so2579076wrp.2 for ; Wed, 10 Jun 2020 07:40:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:user-agent:mime-version; bh=aA9XG9h05xc3d3pafsCor7SQRVUNe3PXObuRB8qgpUA=; b=c0MHSvRZVnN3ZC9fy5ax1YitBYOhwnNrVrLHrFkM9FXOlVfolg/ULezr573uyEzite V/r9uL9rmgW82TblhK6cWZ5SRASrkXVQ2YbvAj1FTwPKQADBoigLLuDp288EQgTzL+Ux OdZBt6R5YwbI3exmDo8KFe8JMesxWsVw5YvfUt9qbF+orVI17SjO5+cKhxRBpvqKqipA pifO14htgwVffE0gcuwlJp8GfJazvq72yQCdyJ/b342lN4k8jhYknrdCZZ/doXxTj7EX tJLWhVq93o0AsJTniC/j+arWF9phUcLVf5VpbFH4DdBKkOHFcZH8bsu9d77PH+S++Dm4 xysA== X-Gm-Message-State: AOAM532fsXX2zuAIHXpfHPHAiwMfmm/SpJzhlzToabwuVKVg1wdgPxAp rRIqyVstjlALs1SQ08lMHYM= X-Google-Smtp-Source: ABdhPJwp1awUi+J8uVbZu7F0ZRLy3+MjkPOo9YSSOr05bG5lhVeAPW6msR6LoZO/uH8BBEYF1AblkA== X-Received: by 2002:a5d:5084:: with SMTP id a4mr4206645wrt.416.1591800007558; Wed, 10 Jun 2020 07:40:07 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id k16sm1848wrp.66.2020.06.10.07.40.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Jun 2020 07:40:06 -0700 (PDT) Message-ID: <78e8681401d594db1c02089d261dca024b7fcc20.camel@debian.org> From: Luca Boccassi To: Thomas Monjalon , stable@dpdk.org Cc: Bruce Richardson , Matan Azrad , Shahaf Shuler , Viacheslav Ovsiienko Date: Wed, 10 Jun 2020 15:40:06 +0100 In-Reply-To: <20200610140209.3576455-1-thomas@monjalon.net> References: <20200610140209.3576455-1-thomas@monjalon.net> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Subject: Re: [dpdk-stable] [PATCH 19.11] buildtools: get static mlx dependencies for meson X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" On Wed, 2020-06-10 at 16:02 +0200, Thomas Monjalon wrote: > [ upstream commit 2cca60310a0bca86483e3b62a1143a50f7484069 ] >=20 > The shell script options-ibverbs-static.sh was used with make > in forcing static linkage of ibverbs libraries. >=20 > When choosing to link with a static dependency in meson, > the generated .pc file will not force such static linkage. > The solution will rely on using this script in meson. >=20 > If linking with libraries installed in a non-standard path, > an option -L is provided via EXTRA_LDFLAGS in case of using make. > With meson, tuning PKG_CONFIG_PATH for pkg-config should be enough. > When statically linking an application, the .pc file must save the > -L path so the application link will work without any extra option. > That's why --libs-only-l is replaced with --libs which includes -L. > Options which are neither -l or -L are filtered out because not needed > and can cause compilation issues with the legacy system using make. >=20 > The other change in this script is to drop the first occurrences of the > main library file (libiverbs.a). Only the last occurrence is kept. > It fixes some undefined references when linking a static application > using libdpdk.pc. >=20 > Signed-off-by: Thomas Monjalon > Acked-by: Bruce Richardson > --- >=20 > The patches > net/mlx: add static ibverbs linkage with meson > and > net/mlx: workaround static linkage with meson > were backported in 19.11 without this patch, > so static ibverbs linkage with meson is broken (libs not found). >=20 > --- > buildtools/options-ibverbs-static.sh | 11 +++++++++-- > 1 file changed, 9 insertions(+), 2 deletions(-) >=20 > diff --git a/buildtools/options-ibverbs-static.sh b/buildtools/options-ib= verbs-static.sh > index 0f285a343b..0740a711ff 100755 > --- a/buildtools/options-ibverbs-static.sh > +++ b/buildtools/options-ibverbs-static.sh > @@ -9,6 +9,13 @@ > # > # PKG_CONFIG_PATH may be required to be set if libibverbs.pc is not inst= alled. > =20 > -pkg-config --libs-only-l --static libibverbs | > +lib=3D'libibverbs' > +deps=3D'pthread|nl' > + > +pkg-config --libs --static $lib | > tr '[:space:]' '\n' | > - sed -r '/^-l(pthread|nl)/! s,(^-l)(.*),\1:lib\2.a,' > + sed -r "/^-l($deps)/! s,(^-l)(.*),\1:lib\2.a," | # explicit .a > + sed -n '/^-[Ll]/p' | # extra link options may break with make > + tac | > + awk "/^-l:$lib.a/&&c++ {next} 1" | # drop first duplicates of main lib > + tac Thanks, applied and pushed. --=20 Kind regards, Luca Boccassi