public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Andrii Nakryiko <andriin@fb.com>
Cc: ast@fb.com, dwarves@vger.kernel.org, bpf@vger.kernel.org,
	kernel-team@fb.com, andrii.nakryiko@gmail.com
Subject: Re: [PATCH pahole 1/2] libbpf: pull latest libbpf and build libbpf as shared lib
Date: Mon, 18 Feb 2019 09:48:10 -0300	[thread overview]
Message-ID: <20190218124810.GO31177@kernel.org> (raw)
In-Reply-To: <20190217082018.1008069-2-andriin@fb.com>

Em Sun, Feb 17, 2019 at 12:20:17AM -0800, Andrii Nakryiko escreveu:
> Bring in latest changes from libbpf which allow to use btf__dedup() for
> big binaries (e.g., linux kernel image).

I'm splitting this patch into two, one for the above part and another
for the part in the end of this commit message.

Thanks,
 
> This patch also changes CMakeLists.txt to build libbpf as shared
> library to satisfy libdwarves shared library compilation.
> 
> Signed-off-by: Andrii Nakryiko <andriin@fb.com>
> ---
>  CMakeLists.txt | 13 +++++++++----
>  lib/bpf        |  2 +-
>  2 files changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index 0cc383a..d6929b4 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -72,9 +72,14 @@ if (NOT HAVE_REALLOCARRAY_SUPPORT)
>  endif()
>  
>  file(GLOB libbpf_sources "lib/bpf/src/*.c")
> -add_library(bpf STATIC ${libbpf_sources})
> -set_target_properties(bpf PROPERTIES OUTPUT_NAME bpf)
> -target_include_directories(bpf PRIVATE
> +add_library(bpf-static STATIC ${libbpf_sources})
> +set_target_properties(bpf-static PROPERTIES OUTPUT_NAME bpf)
> +target_include_directories(bpf-static PRIVATE
> +			   ${CMAKE_CURRENT_SOURCE_DIR}/lib/bpf/include
> +			   ${CMAKE_CURRENT_SOURCE_DIR}/lib/bpf/include/uapi)
> +add_library(bpf-shared SHARED ${libbpf_sources})
> +set_target_properties(bpf-shared PROPERTIES OUTPUT_NAME bpf)
> +target_include_directories(bpf-shared PRIVATE
>  			   ${CMAKE_CURRENT_SOURCE_DIR}/lib/bpf/include
>  			   ${CMAKE_CURRENT_SOURCE_DIR}/lib/bpf/include/uapi)
>  
> @@ -84,7 +89,7 @@ set(dwarves_LIB_SRCS dwarves.c dwarves_fprintf.c gobuffer strings
>  add_library(dwarves SHARED ${dwarves_LIB_SRCS})
>  set_target_properties(dwarves PROPERTIES VERSION 1.0.0 SOVERSION 1)
>  set_target_properties(dwarves PROPERTIES INTERFACE_LINK_LIBRARIES "")
> -target_link_libraries(dwarves ${DWARF_LIBRARIES} ${ZLIB_LIBRARIES} bpf)
> +target_link_libraries(dwarves ${DWARF_LIBRARIES} ${ZLIB_LIBRARIES} bpf-shared)
>  
>  set(dwarves_emit_LIB_SRCS dwarves_emit.c)
>  add_library(dwarves_emit SHARED ${dwarves_emit_LIB_SRCS})
> diff --git a/lib/bpf b/lib/bpf
> index b19c6dc..d5fa415 160000
> --- a/lib/bpf
> +++ b/lib/bpf
> @@ -1 +1 @@
> -Subproject commit b19c6dcf623a7adc9e538ddbe2964c2f58dd2417
> +Subproject commit d5fa4150f0c3a36e3ce458e1301531bd2edbf74d
> -- 
> 2.17.1

-- 

- Arnaldo

  reply	other threads:[~2019-02-18 12:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-17  8:20 [PATCH pahole 0/2] Add support for BTF deduplication Andrii Nakryiko
2019-02-17  8:20 ` [PATCH pahole 1/2] libbpf: pull latest libbpf and build libbpf as shared lib Andrii Nakryiko
2019-02-18 12:48   ` Arnaldo Carvalho de Melo [this message]
2019-02-17  8:20 ` [PATCH pahole 2/2] btf_encoder: run BTF deduplication before writing out to ELF Andrii Nakryiko
     [not found]   ` <20190218142900.GR31177@kernel.org>
2019-02-18 19:38     ` Andrii Nakryiko
2019-02-18 19:55       ` Arnaldo Carvalho de Melo
2019-02-19  2:44         ` Andrii Nakryiko
2019-02-19  2:46           ` Alexei Starovoitov
2019-02-19 13:56       ` Arnaldo Carvalho de Melo

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=20190218124810.GO31177@kernel.org \
    --to=acme@kernel.org \
    --cc=andrii.nakryiko@gmail.com \
    --cc=andriin@fb.com \
    --cc=ast@fb.com \
    --cc=bpf@vger.kernel.org \
    --cc=dwarves@vger.kernel.org \
    --cc=kernel-team@fb.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox