* [Buildroot] [PATCH] package/zlog: bump to version 1.2.20 and switch to the CMake build
@ 2026-10-08 7:52 Yegor Yefremov via buildroot
2026-10-22 21:45 ` Thomas Petazzoni via buildroot
0 siblings, 1 reply; 2+ messages in thread
From: Yegor Yefremov via buildroot @ 2026-10-08 7:52 UTC (permalink / raw)
To: buildroot
zlog ships two build systems: the hand written makefiles used so far and
a CMake one, which 1.2.19 reworked. Switch to the latter and use the
cmake-package infrastructure, because the CMake build not only installs
zlog.pc like the makefiles do, but also the CMake package files
(zlogConfig.cmake and friends), so that dependent packages can use
find_package(zlog) and the zlog::zlog imported target.
Dropping the custom build and install commands also restores the ability
to build zlog in parallel, as the makefile build had to be serialized
with MAKE1.
An out of source build is needed, as zlog rejects an in source one since
1.2.19: CMake would generate its own makefiles over the hand written
ones that are part of the source tree.
-DZLOG_WERROR=OFF disables the -Werror upstream turns on by default,
following the usual Buildroot practice of not letting a new compiler
warning break the build.
zlog uses C11 atomics since 1.2.19, and 1.2.20 adds 64-bit ones, which
need libatomic on e.g. ARMv5:
libzlog.so.1.2.20: undefined reference to `__atomic_store_8'
So depend on BR2_TOOLCHAIN_HAS_ATOMIC and link the library against
libatomic when the toolchain provides it.
The CMake build installs the same set of files as the makefile build did
(zlog.h, zlog-chk-conf, libzlog.so.1.2.20 and libzlog.a) plus zlog.pc
and the CMake package files. The soname is libzlog.so.1.2 with either
build system.
Changelog: https://github.com/HardySimpson/zlog/blob/1.2.20/Changelog
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
---
package/zlog/Config.in | 2 ++
package/zlog/zlog.hash | 2 +-
package/zlog/zlog.mk | 22 +++++++++-------------
3 files changed, 12 insertions(+), 14 deletions(-)
diff --git a/package/zlog/Config.in b/package/zlog/Config.in
index cf86a26174..b764705362 100644
--- a/package/zlog/Config.in
+++ b/package/zlog/Config.in
@@ -1,5 +1,6 @@
config BR2_PACKAGE_ZLOG
bool "zlog"
+ depends on BR2_TOOLCHAIN_HAS_ATOMIC
depends on BR2_TOOLCHAIN_HAS_THREADS
depends on !BR2_STATIC_LIBS
help
@@ -9,4 +10,5 @@ config BR2_PACKAGE_ZLOG
https://github.com/HardySimpson/zlog
comment "zlog needs a toolchain w/ threads, dynamic library"
+ depends on BR2_TOOLCHAIN_HAS_ATOMIC
depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
diff --git a/package/zlog/zlog.hash b/package/zlog/zlog.hash
index f000b08f37..4f2d22dce2 100644
--- a/package/zlog/zlog.hash
+++ b/package/zlog/zlog.hash
@@ -1,3 +1,3 @@
# Locally computed
-sha256 3977dc8ea0069139816ec4025b320d9a7fc2035398775ea91429e83cb0d1ce4e zlog-1.2.18.tar.gz
+sha256 432723ccd9a5b07ec1e4b8cc985d9011d768633b1e4c4facfc0e3e9a7ad5fcf7 zlog-1.2.20.tar.gz
sha256 c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4 LICENSE
diff --git a/package/zlog/zlog.mk b/package/zlog/zlog.mk
index 0d56471559..15a2951520 100644
--- a/package/zlog/zlog.mk
+++ b/package/zlog/zlog.mk
@@ -4,25 +4,21 @@
#
################################################################################
-ZLOG_VERSION = 1.2.18
+ZLOG_VERSION = 1.2.20
ZLOG_SITE = $(call github,HardySimpson,zlog,$(ZLOG_VERSION))
ZLOG_LICENSE = Apache-2.0
ZLOG_LICENSE_FILES = LICENSE
ZLOG_CPE_ID_VALID = YES
ZLOG_INSTALL_STAGING = YES
-define ZLOG_BUILD_CMDS
- $(TARGET_MAKE_ENV) $(MAKE1) \
- CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_LDFLAGS)" \
- WARNINGS="" -C $(@D) all
-endef
+# CMakeLists.txt refuses an in source build, as it would overwrite the hand
+# written makefiles that are part of the source tree
+ZLOG_SUPPORTS_IN_SOURCE_BUILD = NO
-define ZLOG_INSTALL_STAGING_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) PREFIX=$(STAGING_DIR)/usr -C $(@D) install
-endef
+ZLOG_CONF_OPTS = -DZLOG_WERROR=OFF
-define ZLOG_INSTALL_TARGET_CMDS
- $(TARGET_MAKE_ENV) $(MAKE) PREFIX=$(TARGET_DIR)/usr -C $(@D) install
-endef
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+ZLOG_CONF_OPTS += -DCMAKE_SHARED_LINKER_FLAGS=-latomic
+endif
-$(eval $(generic-package))
+$(eval $(cmake-package))
--
2.34.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH] package/zlog: bump to version 1.2.20 and switch to the CMake build
2026-10-08 7:52 [Buildroot] [PATCH] package/zlog: bump to version 1.2.20 and switch to the CMake build Yegor Yefremov via buildroot
@ 2026-10-22 21:45 ` Thomas Petazzoni via buildroot
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-10-22 21:45 UTC (permalink / raw)
To: Yegor Yefremov; +Cc: buildroot
On Thu, Oct 08, 2026 at 09:52:24AM +0200, Yegor Yefremov via buildroot wrote:
> zlog ships two build systems: the hand written makefiles used so far and
> a CMake one, which 1.2.19 reworked. Switch to the latter and use the
> cmake-package infrastructure, because the CMake build not only installs
> zlog.pc like the makefiles do, but also the CMake package files
> (zlogConfig.cmake and friends), so that dependent packages can use
> find_package(zlog) and the zlog::zlog imported target.
>
> Dropping the custom build and install commands also restores the ability
> to build zlog in parallel, as the makefile build had to be serialized
> with MAKE1.
>
> An out of source build is needed, as zlog rejects an in source one since
> 1.2.19: CMake would generate its own makefiles over the hand written
> ones that are part of the source tree.
>
> -DZLOG_WERROR=OFF disables the -Werror upstream turns on by default,
> following the usual Buildroot practice of not letting a new compiler
> warning break the build.
>
> zlog uses C11 atomics since 1.2.19, and 1.2.20 adds 64-bit ones, which
> need libatomic on e.g. ARMv5:
>
> libzlog.so.1.2.20: undefined reference to `__atomic_store_8'
>
> So depend on BR2_TOOLCHAIN_HAS_ATOMIC and link the library against
> libatomic when the toolchain provides it.
>
> The CMake build installs the same set of files as the makefile build did
> (zlog.h, zlog-chk-conf, libzlog.so.1.2.20 and libzlog.a) plus zlog.pc
> and the CMake package files. The soname is libzlog.so.1.2 with either
> build system.
>
> Changelog: https://github.com/HardySimpson/zlog/blob/1.2.20/Changelog
>
> Assisted-by: Claude:claude-opus-5-5
> Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Applied to master, thanks!
Best regards,
Thomas Petazzoni
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-22 21:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-08 7:52 [Buildroot] [PATCH] package/zlog: bump to version 1.2.20 and switch to the CMake build Yegor Yefremov via buildroot
2026-10-22 21:45 ` Thomas Petazzoni via buildroot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox