Files
openwrt/tools/gnulib/Makefile
T
Josef Schlehofer c0262ed5af tools: gnulib: remove stale gl_-prefixed macros from staging
Commit c820f097e0 ("tools: gnulib: install .m4 file with gl_ prefix")
installed gnulib autoconf macros under gl_-prefixed file names. The
scheme was later reverted in commit cda598a595, but the previously
installed files were never removed from share/aclocal.

As aclocal reads the whole directory, stale gl_*.m4 files can override
the current unprefixed macros. This breaks elfutils builds on macOS
after the gnulib stable-202507 update, resulting in empty #if
expressions in the generated ctype.h.

Remove the stale files in Host/Uninstall. Host/Install calls it first,
so affected build trees are cleaned up automatically on the next
gnulib reinstall.

Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/24759
Signed-off-by: Robert Marko <robimarko@gmail.com>
2026-08-19 19:46:46 +02:00

30 lines
846 B
Makefile

include $(TOPDIR)/rules.mk
PKG_NAME:=gnulib
PKG_CPE_ID:=cpe:/a:gnu:$(PKG_NAME)
PKG_SOURCE_URL=git://git.git.savannah.gnu.org/$(PKG_NAME).git
PKG_SOURCE_DATE:=2026-07-04
PKG_SOURCE_VERSION:=b22f5a3037712a3c957a03071ce0b219cef4d65b# # stable-202507
PKG_MIRROR_HASH:=d1423a784794e3e08bd03b397544821ece257aa748566386bd97219d1edf98d5
include $(INCLUDE_DIR)/host-build.mk
define Host/Configure
endef
define Host/Install
$(call Host/Uninstall)
$(INSTALL_DIR) $(1)/share/aclocal
$(INSTALL_DATA) $(HOST_BUILD_DIR)/m4/*.m4 $(1)/share/aclocal/
$(CP) $(HOST_BUILD_DIR)/ $(1)/share/gnulib/
ln -sf ../share/gnulib/gnulib-tool $(STAGING_DIR_HOST)/bin/gnulib-tool
endef
define Host/Uninstall
rm -rf $(STAGING_DIR_HOST)/bin/gnulib-tool $(STAGING_DIR_HOST)/share/gnulib
rm -f $(STAGING_DIR_HOST)/share/aclocal/gl_*.m4
endef
$(eval $(call HostBuild))