]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
tools: gnulib: rename macro file for cond module 24136/head
authorMichael Pratt <mcpratt@pm.me>
Sat, 4 Jul 2026 07:21:49 +0000 (03:21 -0400)
committerRobert Marko <robimarko@gmail.com>
Sun, 12 Jul 2026 09:26:53 +0000 (11:26 +0200)
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 <ansuelsmth@gmail.com>
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/24136
Signed-off-by: Robert Marko <robimarko@gmail.com>
tools/gnulib/patches/310-modules-cond.patch [new file with mode: 0644]

diff --git a/tools/gnulib/patches/310-modules-cond.patch b/tools/gnulib/patches/310-modules-cond.patch
new file mode 100644 (file)
index 0000000..04994e8
--- /dev/null
@@ -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