From a79c578f3d77101964b837e8fa8b8109f21c7a88 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 12 Jul 2021 00:11:22 -0700 Subject: [PATCH 5/5] Port test module to glibc 2.33 * test/Makefile.in (REPLACE_FREE, FREE_SOURCE_0, FREE_SOURCE_1): New macros. ($(test_module)): Improve accuracy of test as to whether free.c should be compiled; glibc 2.33 does not need it compiled and the compilation breaks if you try, if you build with --enable-gcc-warnings. --- test/Makefile.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/Makefile.in b/test/Makefile.in index c1518d3dcd..7047c24482 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -49,6 +49,8 @@ SEPCHAR = HAVE_NATIVE_COMP = @HAVE_NATIVE_COMP@ +REPLACE_FREE = @REPLACE_FREE@ + -include ${top_builddir}/src/verbose.mk # Load any GNU ELPA dependencies that are present, for optional tests. @@ -274,6 +276,9 @@ MODULE_CFLAGS = test_module = $(test_module_dir)/mod-test${SO} src/emacs-module-tests.log src/emacs-module-tests.elc: $(test_module) +FREE_SOURCE_0 = +FREE_SOURCE_1 = $(srcdir)/../lib/free.c + # In the compilation command, we can't use any object or archive file # as source because those are not compiled with -fPIC. Therefore we # use only source files. @@ -282,7 +287,7 @@ $(test_module): $(test_module: $(AM_V_CCLD)$(CC) -shared $(CPPFLAGS) $(MODULE_CFLAGS) $(LDFLAGS) \ -o $@ $< $(LIBGMP) \ $(and $(GMP_H),$(srcdir)/../lib/mini-gmp-gnulib.c) \ - $(if $(OMIT_GNULIB_MODULE_free-posix),,$(srcdir)/../lib/free.c) \ + $(FREE_SOURCE_$(REPLACE_FREE)) \ $(srcdir)/../lib/timespec.c $(srcdir)/../lib/gettime.c endif -- 2.30.2