From a54eb7297f816b4bc521c6e7f38f5b61ebc7e3b3 Mon Sep 17 00:00:00 2001 From: Michael Pratt Date: Sat, 4 Jul 2026 03:21:49 -0400 Subject: [PATCH] tools: gnulib: rename macro file for cond module It was reported that cond.m4 in gnulib is a name clash with cond.m4 provided by Automake, where they are for completely different purposes instead of different versions of the same macros. A quick survey of all the macro files in the build directory reveals that this is the only case where the gnulib copy is signficantly smaller than the rest of the copies of the same macro name distributed in the rest of the build system, and the only one that name clashes with Automake. A previous fix added a prefix to all macros from gnulib, but the name must match how it is described in the respective modules files as a functional requirement to build certain tools for certain (older) hosts, so patch the problematic module instead of renaming all macros from gnulib. Ref: c820f097e0be ("tools: gnulib: install .m4 file with gl_ prefix") Ref: 78a8cfb57772 ("tools: gnulib: fix broken install of .m4 files") Reported-by: Christian Marangi Signed-off-by: Michael Pratt Link: https://github.com/openwrt/openwrt/pull/24136 Signed-off-by: Robert Marko --- tools/gnulib/patches/310-modules-cond.patch | 41 +++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 tools/gnulib/patches/310-modules-cond.patch diff --git a/tools/gnulib/patches/310-modules-cond.patch b/tools/gnulib/patches/310-modules-cond.patch new file mode 100644 index 00000000000..04994e8df88 --- /dev/null +++ b/tools/gnulib/patches/310-modules-cond.patch @@ -0,0 +1,41 @@ +--- a/m4/cond.m4 ++++ /dev/null +@@ -1,12 +0,0 @@ +-# cond.m4 +-# serial 2 +-dnl Copyright (C) 2008-2025 Free Software Foundation, Inc. +-dnl This file is free software; the Free Software Foundation +-dnl gives unlimited permission to copy and/or distribute it, +-dnl with or without modifications, as long as this notice is preserved. +-dnl This file is offered as-is, without any warranty. +- +-AC_DEFUN([gl_COND], +-[ +- AC_REQUIRE([gl_THREADLIB]) +-]) +--- /dev/null ++++ b/m4/glthread_cond.m4 +@@ -0,0 +1,12 @@ ++# glthread_cond.m4 ++# serial 2 ++dnl Copyright (C) 2008-2025 Free Software Foundation, Inc. ++dnl This file is free software; the Free Software Foundation ++dnl gives unlimited permission to copy and/or distribute it, ++dnl with or without modifications, as long as this notice is preserved. ++dnl This file is offered as-is, without any warranty. ++ ++AC_DEFUN([gl_COND], ++[ ++ AC_REQUIRE([gl_THREADLIB]) ++]) +--- a/modules/cond ++++ b/modules/cond +@@ -4,7 +4,7 @@ Condition variables for multithreading. + Files: + lib/glthread/cond.h + lib/glthread/cond.c +-m4/cond.m4 ++m4/glthread_cond.m4 + + Depends-on: + threadlib