[patch?] Cross-compiling regression tests

Dan Kegel dank@kegel.com
Fri Jul 25 03:58:00 GMT 2003


I found that many of the regression tests in elf and dlfnc fail when
cross-compiling because the modules they need aren't built.
Normally, tests depends on *.out, and *.out depends on the test
modules, but when cross-compiling, tests depends directly on
the test executables, and nothing forces the test modules to be built.

The following trivial patch against glibc-2.2.5 seems to fix that.
(I had a quick look at HEAD, and didn't see this was fixed there yet,
but I'm often wrong.)

--- glibc-2.2.5/dlfcn/Makefile.old	Thu Jul 24 16:30:20 2003
+++ glibc-2.2.5/dlfcn/Makefile	Thu Jul 24 17:25:01 2003
@@ -60,6 +60,8 @@
  test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(modules-names)))
  $(test-modules): $(objpfx)%.so: $(objpfx)%.os
  	$(build-module)
+# without following rule, test-modules don't get built when cross-compiling
+tests: $(test-modules)

  $(objpfx)glrefmain: $(libdl)
  $(objpfx)glrefmain.out: $(objpfx)glrefmain \
--- glibc-2.2.5/elf/Makefile.old	Thu Jul 24 18:17:12 2003
+++ glibc-2.2.5/elf/Makefile	Thu Jul 24 18:18:58 2003
@@ -263,6 +263,9 @@
  test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(strip $(modules-names))))
  generated += $(addsuffix .so,$(strip $(modules-names)))

+# without following rule, test-modules don't get built when cross-compiling
+tests: $(test-modules)
+
  ifeq (yes,$(build-shared))
  ifeq ($(cross-compiling),no)
  tests: $(objpfx)tst-pathopt.out

-- 
Dan Kegel
http://www.kegel.com
http://counter.li.org/cgi-bin/runscript/display-person.cgi?user=78045



More information about the Libc-alpha mailing list