From: Anton Protopopov <aspsk@isovalent.com>
To: sdf@google.com
Cc: bpf@vger.kernel.org, Quentin Monnet <quentin@isovalent.com>,
Jean-Philippe Brucker <jean-philippe@linaro.org>
Subject: Re: [PATCH bpf-next] bpftool: fix linkage with statically built libllvm
Date: Thu, 22 Dec 2022 11:20:06 +0100 [thread overview]
Message-ID: <Y6QvVuuPvmMbsZPB@lavr> (raw)
In-Reply-To: <Y6NfpU8zo6t3dEhC@google.com>
On 22/12/21 11:33, sdf@google.com wrote:
> On 12/21, Anton Protopopov wrote:
> > [...]
>
> > diff --git a/tools/bpf/bpftool/Makefile b/tools/bpf/bpftool/Makefile
> > index 787b857d3fb5..e4c15095eac7 100644
> > --- a/tools/bpf/bpftool/Makefile
> > +++ b/tools/bpf/bpftool/Makefile
> > @@ -144,7 +144,7 @@ ifeq ($(feature-llvm),1)
> > CFLAGS += -DHAVE_LLVM_SUPPORT
> > LLVM_CONFIG_LIB_COMPONENTS := mcdisassembler all-targets
> > CFLAGS += $(shell $(LLVM_CONFIG) --cflags --libs
> > $(LLVM_CONFIG_LIB_COMPONENTS))
> > - LIBS += $(shell $(LLVM_CONFIG) --libs $(LLVM_CONFIG_LIB_COMPONENTS))
> > + LIBS += $(shell $(LLVM_CONFIG) --libs --system-libs
> > $(LLVM_CONFIG_LIB_COMPONENTS)) -lstdc++
>
>
> Why not do separate lines? We can then maybe do a bit safer approach?
>
> LIBS += $(shell $(LLVM_CONFIG) --libs $(LLVM_CONFIG_LIB_COMPONENTS))
> ifeq ($(USE_STATIC_COMPONENTS), static)
> LIBS += $(shell $(LLVM_CONFIG) --system-libs))
> LIBS += -lstdc++
> endif
>
> Can we use `llvm-config --shared-mode` to get USE_STATIC_COMPONENTS?
Thanks, I didn't know about the --shared-mode thing. I will send the v2.
>
> > LDFLAGS += $(shell $(LLVM_CONFIG) --ldflags)
> > else
> > # Fall back on libbfd
> > --
> > 2.34.1
>
prev parent reply other threads:[~2022-12-22 10:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-21 10:30 [PATCH bpf-next] bpftool: fix linkage with statically built libllvm Anton Protopopov
2022-12-21 19:33 ` sdf
2022-12-22 10:20 ` Anton Protopopov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y6QvVuuPvmMbsZPB@lavr \
--to=aspsk@isovalent.com \
--cc=bpf@vger.kernel.org \
--cc=jean-philippe@linaro.org \
--cc=quentin@isovalent.com \
--cc=sdf@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.