From dd4161c39d97c7a651625dca18fa2aaab9298fa6 Mon Sep 17 00:00:00 2001 From: Bernd Kuhls Date: Sat, 17 Jan 2026 00:27:17 +0100 Subject: [PATCH] package/util-linux: optionally add libpthread to uuid.pc Buildroot commit 31af509b4f4fe52f67bd9109b8732a55b8f9cd2d bumped util-linux from version 2.40.2 to 2.41.1. Upstream release 2.40.3 contains https://github.com/util-linux/util-linux/commit/e143539d30fd18afb3ba6d3c6e50a260d4219895 which unconditionally adds -lpthread to uuid.pc causing build errors for other packages using non-threaded toolchains like erofs-utils. Fixes: https://autobuild.buildroot.net/results/582/5827995db2a805e0c8a04fde8498eff6f28aa6d8/ Signed-off-by: Bernd Kuhls Signed-off-by: Thomas Petazzoni --- ...optionally-add-libpthread-to-uuid.pc.patch | 42 +++++++++++++++++++ ...optionally-add-libpthread-to-uuid.pc.patch | 42 +++++++++++++++++++ package/util-linux/util-linux.mk | 3 ++ 3 files changed, 87 insertions(+) create mode 100644 package/util-linux/0002-autotools-optionally-add-libpthread-to-uuid.pc.patch create mode 100644 package/util-linux/util-linux-libs/0002-autotools-optionally-add-libpthread-to-uuid.pc.patch diff --git a/package/util-linux/0002-autotools-optionally-add-libpthread-to-uuid.pc.patch b/package/util-linux/0002-autotools-optionally-add-libpthread-to-uuid.pc.patch new file mode 100644 index 0000000000..ef59e458e1 --- /dev/null +++ b/package/util-linux/0002-autotools-optionally-add-libpthread-to-uuid.pc.patch @@ -0,0 +1,42 @@ +From a06adacd1009174b7ca35f529a2db165f6c1f3aa Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Fri, 16 Jan 2026 23:33:34 +0100 +Subject: [PATCH] autotools: optionally add libpthread to uuid.pc + +Fixes https://github.com/util-linux/util-linux/issues/3210#issuecomment-3477915953 + +Upstream: https://github.com/util-linux/util-linux/commit/d88a62e4cd385e07b3cb8fb309bbb03981ea2970 + +[Bernd: backported to 2.41.3] +Signed-off-by: Bernd Kuhls +--- + Makefile.am | 1 + + libuuid/uuid.pc.in | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 01e99701d..cd1d157ce 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -189,6 +189,7 @@ edit_cmd = sed \ + -e 's|@usrbin_execdir[@]|$(usrbin_execdir)|g' \ + -e 's|@usrsbin_execdir[@]|$(usrsbin_execdir)|g' \ + -e 's|@SOCKET_LIBS[@]|$(SOCKET_LIBS)|g' \ ++ -e 's|@PTHREAD_LIBS[@]|$(PTHREAD_LIBS)|g' \ + -e 's|@VERSION[@]|$(VERSION)|g' \ + -e 's|@ADJTIME_PATH[@]|$(ADJTIME_PATH)|g' \ + -e 's|@LIBUUID_VERSION[@]|$(LIBUUID_VERSION)|g' \ +diff --git a/libuuid/uuid.pc.in b/libuuid/uuid.pc.in +index 51929fe80..a40dc6644 100644 +--- a/libuuid/uuid.pc.in ++++ b/libuuid/uuid.pc.in +@@ -7,5 +7,5 @@ Name: uuid + Description: Universally unique id library + Version: @LIBUUID_VERSION@ + Cflags: -I${includedir}/uuid +-Libs.private: @SOCKET_LIBS@ -lpthread ++Libs.private: @SOCKET_LIBS@ @PTHREAD_LIBS@ + Libs: -L${libdir} -luuid +-- +2.47.3 + diff --git a/package/util-linux/util-linux-libs/0002-autotools-optionally-add-libpthread-to-uuid.pc.patch b/package/util-linux/util-linux-libs/0002-autotools-optionally-add-libpthread-to-uuid.pc.patch new file mode 100644 index 0000000000..ef59e458e1 --- /dev/null +++ b/package/util-linux/util-linux-libs/0002-autotools-optionally-add-libpthread-to-uuid.pc.patch @@ -0,0 +1,42 @@ +From a06adacd1009174b7ca35f529a2db165f6c1f3aa Mon Sep 17 00:00:00 2001 +From: Bernd Kuhls +Date: Fri, 16 Jan 2026 23:33:34 +0100 +Subject: [PATCH] autotools: optionally add libpthread to uuid.pc + +Fixes https://github.com/util-linux/util-linux/issues/3210#issuecomment-3477915953 + +Upstream: https://github.com/util-linux/util-linux/commit/d88a62e4cd385e07b3cb8fb309bbb03981ea2970 + +[Bernd: backported to 2.41.3] +Signed-off-by: Bernd Kuhls +--- + Makefile.am | 1 + + libuuid/uuid.pc.in | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 01e99701d..cd1d157ce 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -189,6 +189,7 @@ edit_cmd = sed \ + -e 's|@usrbin_execdir[@]|$(usrbin_execdir)|g' \ + -e 's|@usrsbin_execdir[@]|$(usrsbin_execdir)|g' \ + -e 's|@SOCKET_LIBS[@]|$(SOCKET_LIBS)|g' \ ++ -e 's|@PTHREAD_LIBS[@]|$(PTHREAD_LIBS)|g' \ + -e 's|@VERSION[@]|$(VERSION)|g' \ + -e 's|@ADJTIME_PATH[@]|$(ADJTIME_PATH)|g' \ + -e 's|@LIBUUID_VERSION[@]|$(LIBUUID_VERSION)|g' \ +diff --git a/libuuid/uuid.pc.in b/libuuid/uuid.pc.in +index 51929fe80..a40dc6644 100644 +--- a/libuuid/uuid.pc.in ++++ b/libuuid/uuid.pc.in +@@ -7,5 +7,5 @@ Name: uuid + Description: Universally unique id library + Version: @LIBUUID_VERSION@ + Cflags: -I${includedir}/uuid +-Libs.private: @SOCKET_LIBS@ -lpthread ++Libs.private: @SOCKET_LIBS@ @PTHREAD_LIBS@ + Libs: -L${libdir} -luuid +-- +2.47.3 + diff --git a/package/util-linux/util-linux.mk b/package/util-linux/util-linux.mk index 1271bc7dc0..fcce9a7dc8 100644 --- a/package/util-linux/util-linux.mk +++ b/package/util-linux/util-linux.mk @@ -37,6 +37,9 @@ UTIL_LINUX_LICENSE_FILES = README.licensing \ UTIL_LINUX_CPE_ID_VENDOR = kernel +# 0002-autotools-optionally-add-libpthread-to-uuid.pc.patch +UTIL_LINUX_AUTORECONF = YES + UTIL_LINUX_INSTALL_STAGING = YES UTIL_LINUX_DEPENDENCIES = \ host-pkgconf \