mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 1/2] libelf: add option for zstd support
@ 2025-03-17 11:31 Michael Tretter
  2025-03-17 11:31 ` [ptxdist] [PATCH 2/2] kernel/perf: enable " Michael Tretter
  2025-03-24  7:45 ` [ptxdist] [APPLIED] libelf: add option for " Michael Olbrich
  0 siblings, 2 replies; 4+ messages in thread
From: Michael Tretter @ 2025-03-17 11:31 UTC (permalink / raw)
  To: ptxdist; +Cc: Michael Tretter

Add an option to build libelf with Zstandard compression support.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
 rules/libelf.in   | 5 +++++
 rules/libelf.make | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/rules/libelf.in b/rules/libelf.in
index 0b4da9e682c8..fefe58219a0c 100644
--- a/rules/libelf.in
+++ b/rules/libelf.in
@@ -5,6 +5,7 @@ menuconfig LIBELF
 	prompt "libelf                        "
 	select ZLIB
 	select XZ		if LIBELF_XZ
+	select ZSTD		if LIBELF_ZSTD
 	help
 	  The libelf1 package provides a shared library which allows reading
 	  and writing ELF files on a high level.  Third party programs depend
@@ -16,6 +17,10 @@ config LIBELF_XZ
 	bool
 	prompt "xz compression support"
 
+config LIBELF_ZSTD
+	bool
+	prompt "zstd compression support"
+
 config LIBELF_LIBDW
 	bool
 	prompt "libdw"
diff --git a/rules/libelf.make b/rules/libelf.make
index 84e399e9f7a4..d36b4d67b372 100644
--- a/rules/libelf.make
+++ b/rules/libelf.make
@@ -62,7 +62,7 @@ LIBELF_CONF_OPT	:= \
 	--with-zlib \
 	--without-bzlib \
 	--$(call ptx/wwo, PTXCONF_LIBELF_XZ)-lzma \
-	--without-zstd \
+	--$(call ptx/wwo, PTXCONF_LIBELF_ZSTD)-zstd \
 	--without-biarch
 
 LIBELF_ARCH := $(call remove_quotes,$(PTXCONF_ARCH_STRING))
-- 
2.39.5




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ptxdist] [PATCH 2/2] kernel/perf: enable zstd support
  2025-03-17 11:31 [ptxdist] [PATCH 1/2] libelf: add option for zstd support Michael Tretter
@ 2025-03-17 11:31 ` Michael Tretter
  2025-03-24  7:45   ` [ptxdist] [APPLIED] " Michael Olbrich
  2025-03-24  7:45 ` [ptxdist] [APPLIED] libelf: add option for " Michael Olbrich
  1 sibling, 1 reply; 4+ messages in thread
From: Michael Tretter @ 2025-03-17 11:31 UTC (permalink / raw)
  To: ptxdist; +Cc: Michael Tretter

The Linux kernel Commit 44b44ffd5dce ("perf build: Minor improvement for
linking libzstd") adds a test if libzstd is installed and uses this as
heuristic if libelf is build with zstd support. Thus, if zstd is
installed, perf cannot be built without zstd support anymore.

Always build perf with zstd support and make sure that libelf is built
with zstd, too.

Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
 rules/kernel.in   | 1 +
 rules/kernel.make | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/rules/kernel.in b/rules/kernel.in
index 46c2267b6df3..488b08e25016 100644
--- a/rules/kernel.in
+++ b/rules/kernel.in
@@ -3,6 +3,7 @@
 menuconfig KERNEL
 	bool "kernel tools                  "
 	select LIBELF			if KERNEL_TOOL_PERF
+	select LIBELF_ZSTD		if KERNEL_TOOL_PERF
 	select LIBELF_LIBDW		if KERNEL_TOOL_PERF
 	select SLANG			if KERNEL_TOOL_PERF
 	select BINUTILS			if KERNEL_TOOL_PERF
diff --git a/rules/kernel.make b/rules/kernel.make
index f38661301d91..19b05811def2 100644
--- a/rules/kernel.make
+++ b/rules/kernel.make
@@ -229,7 +229,7 @@ KERNEL_TOOL_PERF_OPTS	:= \
 	NO_ZLIB= \
 	NO_LIBBABELTRACE=1 \
 	NO_LZMA=1 \
-	NO_LIBZSTD=1 \
+	NO_LIBZSTD= \
 	NO_AUXTRACE= \
 	NO_LIBBPF=1 \
 	NO_SDT=1 \
-- 
2.39.5




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [APPLIED] libelf: add option for zstd support
  2025-03-17 11:31 [ptxdist] [PATCH 1/2] libelf: add option for zstd support Michael Tretter
  2025-03-17 11:31 ` [ptxdist] [PATCH 2/2] kernel/perf: enable " Michael Tretter
@ 2025-03-24  7:45 ` Michael Olbrich
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2025-03-24  7:45 UTC (permalink / raw)
  To: ptxdist; +Cc: Michael Tretter

Thanks, applied as 8c11dee845773ff968727e0a95388ec3577f23af.

Michael

[sent from post-receive hook]

On Mon, 24 Mar 2025 08:45:54 +0100, Michael Tretter <m.tretter@pengutronix.de> wrote:
> Add an option to build libelf with Zstandard compression support.
> 
> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
> Message-Id: <20250317113146.1862763-1-m.tretter@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/rules/libelf.in b/rules/libelf.in
> index 0b4da9e682c8..fefe58219a0c 100644
> --- a/rules/libelf.in
> +++ b/rules/libelf.in
> @@ -5,6 +5,7 @@ menuconfig LIBELF
>  	prompt "libelf                        "
>  	select ZLIB
>  	select XZ		if LIBELF_XZ
> +	select ZSTD		if LIBELF_ZSTD
>  	help
>  	  The libelf1 package provides a shared library which allows reading
>  	  and writing ELF files on a high level.  Third party programs depend
> @@ -16,6 +17,10 @@ config LIBELF_XZ
>  	bool
>  	prompt "xz compression support"
>  
> +config LIBELF_ZSTD
> +	bool
> +	prompt "zstd compression support"
> +
>  config LIBELF_LIBDW
>  	bool
>  	prompt "libdw"
> diff --git a/rules/libelf.make b/rules/libelf.make
> index 84e399e9f7a4..d36b4d67b372 100644
> --- a/rules/libelf.make
> +++ b/rules/libelf.make
> @@ -62,7 +62,7 @@ LIBELF_CONF_OPT	:= \
>  	--with-zlib \
>  	--without-bzlib \
>  	--$(call ptx/wwo, PTXCONF_LIBELF_XZ)-lzma \
> -	--without-zstd \
> +	--$(call ptx/wwo, PTXCONF_LIBELF_ZSTD)-zstd \
>  	--without-biarch
>  
>  LIBELF_ARCH := $(call remove_quotes,$(PTXCONF_ARCH_STRING))



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [APPLIED] kernel/perf: enable zstd support
  2025-03-17 11:31 ` [ptxdist] [PATCH 2/2] kernel/perf: enable " Michael Tretter
@ 2025-03-24  7:45   ` Michael Olbrich
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2025-03-24  7:45 UTC (permalink / raw)
  To: ptxdist; +Cc: Michael Tretter

Thanks, applied as 820411c85ba1d351322162cd8e9998cc54f90c56.

Michael

[sent from post-receive hook]

On Mon, 24 Mar 2025 08:45:55 +0100, Michael Tretter <m.tretter@pengutronix.de> wrote:
> The Linux kernel Commit 44b44ffd5dce ("perf build: Minor improvement for
> linking libzstd") adds a test if libzstd is installed and uses this as
> heuristic if libelf is build with zstd support. Thus, if zstd is
> installed, perf cannot be built without zstd support anymore.
> 
> Always build perf with zstd support and make sure that libelf is built
> with zstd, too.
> 
> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
> Message-Id: <20250317113146.1862763-2-m.tretter@pengutronix.de>
> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> 
> diff --git a/rules/kernel.in b/rules/kernel.in
> index 46c2267b6df3..488b08e25016 100644
> --- a/rules/kernel.in
> +++ b/rules/kernel.in
> @@ -3,6 +3,7 @@
>  menuconfig KERNEL
>  	bool "kernel tools                  "
>  	select LIBELF			if KERNEL_TOOL_PERF
> +	select LIBELF_ZSTD		if KERNEL_TOOL_PERF
>  	select LIBELF_LIBDW		if KERNEL_TOOL_PERF
>  	select SLANG			if KERNEL_TOOL_PERF
>  	select BINUTILS			if KERNEL_TOOL_PERF
> diff --git a/rules/kernel.make b/rules/kernel.make
> index f38661301d91..19b05811def2 100644
> --- a/rules/kernel.make
> +++ b/rules/kernel.make
> @@ -229,7 +229,7 @@ KERNEL_TOOL_PERF_OPTS	:= \
>  	NO_ZLIB= \
>  	NO_LIBBABELTRACE=1 \
>  	NO_LZMA=1 \
> -	NO_LIBZSTD=1 \
> +	NO_LIBZSTD= \
>  	NO_AUXTRACE= \
>  	NO_LIBBPF=1 \
>  	NO_SDT=1 \



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-03-24  7:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-03-17 11:31 [ptxdist] [PATCH 1/2] libelf: add option for zstd support Michael Tretter
2025-03-17 11:31 ` [ptxdist] [PATCH 2/2] kernel/perf: enable " Michael Tretter
2025-03-24  7:45   ` [ptxdist] [APPLIED] " Michael Olbrich
2025-03-24  7:45 ` [ptxdist] [APPLIED] libelf: add option for " Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox