Question about filtmod1 build rule
Andreas Jaeger
aj@suse.de
Fri Jul 21 06:37:00 GMT 2000
Hi Uli,
you've added to elf/Makefile the following rule:
$(objpfx)filtmod1.so: $(objpfx)filtmod1.os $(objpfx)filtmod2.so
$(LINK.o) -shared -o $@ -B$(csu-objpfx) $(LDFLAGS.so) \
-L$(subst :, -L,$(rpath-link)) \
-Wl,-rpath-link=$(rpath-link) \
$< -Wl,-F,$(objpfx)filtmod2.so
The normal rule is (in Makerules):
define build-module
$(LINK.o) -shared -o $@ $(sysdep-LDFLAGS) $(config-LDFLAGS) \
-B$(csu-objpfx) $(load-map-file) \
$(LDFLAGS.so) $(LDFLAGS-$(@F:%.so=%).so) \
-L$(subst :, -L,$(rpath-link)) -Wl,-rpath-link=$(rpath-link) \
-Wl,--whole-archive \
$(filter-out $(map-file) $(+preinit) $(+postinit),$^) \
$(no-whole-archive) $(LDLIBS-$(@F:%.so=%).so)
endef
You've added "-Wl,-F,$(objpfx)filtmod2.so" and removed the
whole-archive declaration. Was the later really intented? Why
couldn't you use LDFLAGS-filtmod2.so and write (untested):
$(objpfx)filtmod1.so: $(objpfx)filtmod1.os $(objpfx)filtmod2.so
LDFLAGS-filtmod2.so = -Wl,-F,$(objpfx)filtmod2.so
Btw. your rules also lead to the following warnings:
Makefile:317: warning: overriding commands for target `/usr/src/aj/build-glibc-2.2/elf/filtmod1.so'
Makefile:247: warning: ignoring old commands for target `/usr/src/aj/build-glibc-2.2/elf/filtmod1.so'
I've added the appended patch to glibc.
Andreas
2000-07-21 Andreas Jaeger <aj@suse.de>
* elf/Makefile ($(test-modules)): Exclude filtmod1.so, it has its
own rule.
============================================================
Index: elf/Makefile
--- elf/Makefile 2000/07/21 07:21:02 1.163
+++ elf/Makefile 2000/07/21 13:20:42
@@ -244,7 +244,8 @@
$(objpfx)dep4.so: $(objpfx)dep3.so
$(objpfx)nodelmod3.so: $(objpfx)nodelmod4.so
-$(test-modules): $(objpfx)%.so: $(objpfx)%.os
+# filtmod1.so has a special rule
+$(filter-out $(objpfx)filtmod1.so, $(test-modules)): $(objpfx)%.so: $(objpfx)%.os
$(build-module)
$(objpfx)loadtest: $(libdl)
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
More information about the Libc-hacker
mailing list