Skip to contentSkip to conversation

package/util-linux: Remove -lpthread from uuid.pc for non-threaded builds

PATCH New Bernd Kuhls 1 participant 1 message Nov 2, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/util-linux: Remove -lpthread from uuid.pc for non-threaded builds

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.

Upstream was notified:
https://github.com/util-linux/util-linux/issues/3210#issuecomment-3477915953

Fixes:
https://autobuild.buildroot.net/results/582/5827995db2a805e0c8a04fde8498eff6f28aa6d8/

---
 package/util-linux/util-linux.mk | 7 +++++++
 1 file changed, 7 insertions(+)
package/util-linux/util-linux.mk +7 -0
index 555a1e74c0..5b58154c09 100644
@@ -37,6 +37,13 @@ UTIL_LINUX_LICENSE_FILES = README.licensing \
 
 UTIL_LINUX_CPE_ID_VENDOR = kernel
 
+define UTIL_LINUX_POST_EXTRACT_FIXUP
+	$(SED) 's/-lpthread//' $(@D)/libuuid/uuid.pc.in
+endef
+ifneq ($(BR2_TOOLCHAIN_HAS_THREADS),y)
+UTIL_LINUX_POST_EXTRACT_HOOKS += UTIL_LINUX_POST_EXTRACT_FIXUP
+endif
+
 UTIL_LINUX_INSTALL_STAGING = YES
 UTIL_LINUX_DEPENDENCIES = \
 	host-pkgconf \
Signature · 6 lines
2.47.3

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot