Commit a79c578f authored by Paul Eggert's avatar Paul Eggert
Browse files

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.
parent c22cf4d0
Pipeline #11376 failed with stages
in 12 seconds
......@@ -49,6 +49,8 @@ SEPCHAR = @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 = -I../src -I$(srcdir)/../src -I../lib -I$(srcdir)/../lib \
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:${SO}=.c) ../src/emacs-module.h
$(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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment