From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 49AFAA0A0F; Fri, 4 Jun 2021 23:40:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id ACBB74068F; Fri, 4 Jun 2021 23:40:28 +0200 (CEST) Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) by mails.dpdk.org (Postfix) with ESMTP id 85F9D40147 for ; Fri, 4 Jun 2021 23:40:27 +0200 (CEST) Received: by mail-lj1-f169.google.com with SMTP id w15so13314908ljo.10 for ; Fri, 04 Jun 2021 14:40:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=nxj8iByBrOuPfglehHQfb78R1139eXM+sk7pdCppw+8=; b=NVQiA4+xbSW2aGL+1k+rFZ2m+KDQGPhGX8y1+oo4hH8NC8iqMzs5hs/KRSpx4hLA3V wwp+PFSoaS3ZEZeExsGdFsYg0Pq1jTo5VFl/WlsmTtPjd089kMx2pHdr48wH+7AzfW3Z khpK1mhS+UTqEBhGCuhTiTBGXsOVFc4+yNuJbNX9q/9SfW7y/nJGC7l2lnTsdz+dPOgi wlsWNzfKezqIKw/4d/i/rGbEWt2TUeyXeCMCCRONm33vkJxgcxwIowEXvfaRuW7gFfw/ WYTe/xRbft5sYF5eGtSaJLVsEWDl2Ru+DnuoHwibD1wnDKT1WsXcxV75iPqKK2cpCTH9 xrkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=nxj8iByBrOuPfglehHQfb78R1139eXM+sk7pdCppw+8=; b=dGXtDbBvQQyUdyKKwZ3TZFG4e5tDq8QfVAK7Fbdm+xxYg3ehDU+soTYQvzg42/FTI+ zI3/7tOWdRNnaY/mz3ZCU3r5wUzjv1IFlzlPFSIfEyRUl0KKMXjVxKiO5bbbYoJPktD+ ZhCXvI+KIRvStJ9poHknMRqE8MfUzAnHKHjDBPB9CH4t4S0AZMfQwqF3EK7V0l+QdX3g ZAAyGLpb/8dfMUF5ansX1oJxs8cw+65xLajVzrG3OU8k5UKcrWpyRWRyr396Wwi4/Pez IU+jfLkAanAKsDdKj+xZ6/9Y+yhg1W0Cn4cg3bTsT4CfmoEuQEu7hmuW21HU37nFj24s o2CA== X-Gm-Message-State: AOAM533UQNSwuMoww86/uk6RQooXqtRiDRqIhkjBmHoMuCqmzedfHqmV rRAhYWm4eH6vdNH54x/fzTg= X-Google-Smtp-Source: ABdhPJwXfeoixXnGs2lGn/E/s5IRqDGAcyjHCeehdh1wI+bgfBiv3l+8IW5ywZnt3Ig5qx+FL+hYBA== X-Received: by 2002:a2e:7d19:: with SMTP id y25mr5012147ljc.82.1622842826830; Fri, 04 Jun 2021 14:40:26 -0700 (PDT) Received: from sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id a25sm837489ljp.11.2021.06.04.14.40.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Jun 2021 14:40:25 -0700 (PDT) Date: Sat, 5 Jun 2021 00:40:24 +0300 From: Dmitry Kozlyuk To: David Marchand Cc: dev , Igor Russkikh , Aaron Conole , Michael Santana , Bruce Richardson , Rasesh Mody , Shahed Shaikh , Qiming Yang , Qi Zhang , Heinrich Kuhn , Devendra Singh Rawat , Ray Kinsella , Neil Horman , Narcisa Ana Maria Vasile , Dmitry Malloy , Pallavi Kadam Message-ID: <20210605004024.660267a1@sovereign> In-Reply-To: References: <20210602095836.24901-1-david.marchand@redhat.com> <20210603165512.7357-1-david.marchand@redhat.com> <20210603165512.7357-3-david.marchand@redhat.com> <20210604012922.63574cff@sovereign> X-Mailer: Claws Mail 3.17.6 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH v2 2/2] eal: handle compressed firmwares X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2021-06-04 09:27 (UTC+0200), David Marchand: > On Fri, Jun 4, 2021 at 12:29 AM Dmitry Kozlyuk = wrote: > > > > 2021-06-03 18:55 (UTC+0200), David Marchand: > > [...] =20 > > > diff --git a/config/meson.build b/config/meson.build > > > index 017bb2efbb..c6985139b4 100644 > > > --- a/config/meson.build > > > +++ b/config/meson.build > > > @@ -172,6 +172,13 @@ if libexecinfo.found() and cc.has_header('execin= fo.h') > > > dpdk_extra_ldflags +=3D '-lexecinfo' > > > endif > > > > > > +libarchive =3D dependency('libarchive', required: false, method: 'pk= g-config') > > > +if libarchive.found() > > > + dpdk_conf.set('RTE_HAS_LIBARCHIVE', 1) > > > + add_project_link_arguments('-larchive', language: 'c') > > > + dpdk_extra_ldflags +=3D '-larchive' > > > +endif > > > + =20 > > > > Suggestion: > > > > diff --git a/config/meson.build b/config/meson.build > > index c6985139b4..c3668798c1 100644 > > --- a/config/meson.build > > +++ b/config/meson.build > > @@ -175,7 +175,6 @@ endif > > libarchive =3D dependency('libarchive', required: false, method: 'pkg-= config') > > if libarchive.found() > > dpdk_conf.set('RTE_HAS_LIBARCHIVE', 1) > > - add_project_link_arguments('-larchive', language: 'c') > > dpdk_extra_ldflags +=3D '-larchive' > > endif > > > > diff --git a/lib/eal/meson.build b/lib/eal/meson.build > > index 1722924f67..5a018d97d6 100644 > > --- a/lib/eal/meson.build > > +++ b/lib/eal/meson.build > > @@ -16,6 +16,7 @@ subdir(exec_env) > > subdir(arch_subdir) > > > > deps +=3D ['kvargs'] > > +ext_deps +=3D libarchive > > if not is_windows > > deps +=3D ['telemetry'] > > endif > > =20 >=20 > I had tried something close when preparing v2 (only keeping > RTE_HAS_LIBARCHIVE in config/meson.build and putting extra_ldflags and > ext_deps in lib/eal/unix/meson.build) but both my try and your > suggestion break static compilation for the helloworld example. >=20 >=20 > $ ./devtools/test-meson-builds.sh -vv > ... > ## Building helloworld [snip] Thanks for details. Indeed, libarchive.pc lists all libraries present at libarchive build time in Libs.private, despite that libarchive static linkage doesn't require the= m. We'll have to go your way, sorry for misdirection. Maybe it's worth a comment. =46rom libarchive README: I've attempted to minimize static link pollution. If you don't explicitly invoke a particular feature (such as support for a particular compression or format), it won't get pulled in to statically-linked programs. In particular, if you don't explicitly enable a particular compression or decompression support, you won't need to link against the corresponding compression or decompression libraries. This also reduces the size of statically-linked binaries in environments where that matters.