From: Roland McGrath Date: Thu, 18 Feb 2010 22:33:48 +0000 (-0800) Subject: Tweak backends makefile rules to avoid make -j bug. X-Git-Tag: elfutils-0.145~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9e92418c74381805f392dbf562ef44f31a7bc716;p=thirdparty%2Felfutils.git Tweak backends makefile rules to avoid make -j bug. --- diff --git a/backends/ChangeLog b/backends/ChangeLog index ff32f3c2e..4ec13fd88 100644 --- a/backends/ChangeLog +++ b/backends/ChangeLog @@ -1,3 +1,9 @@ +2010-02-18 Roland McGrath + + * Makefile.am (libebl_%.so): Use multi-target pattern rule instead of + intermediate dependency file for libebl_%.map, working around apparent + make -j timing-sensitive bugs. + 2010-02-15 Roland McGrath * Makefile.am: Use config/eu.am for common stuff. diff --git a/backends/Makefile.am b/backends/Makefile.am index d859cc975..a18454d62 100644 --- a/backends/Makefile.am +++ b/backends/Makefile.am @@ -96,21 +96,19 @@ libebl_s390_pic_a_SOURCES = $(s390_SRCS) am_libebl_s390_pic_a_OBJECTS = $(s390_SRCS:.c=.os) -libebl_%.so: libebl_%_pic.a libebl_%.map $(libelf) $(libdw) \ - $(cpu_$(@:libebl_%.so=%) - $(LINK) -shared -o $@ -Wl,--whole-archive,$<\ - $(cpu_$(@:libebl_%.so=%)) -Wl,--no-whole-archive \ - -Wl,--version-script,$(word 2,$^) \ +libebl_%.so libebl_%.map: libebl_%_pic.a $(libelf) $(libdw) + @rm -f $(@:.so=.map) + echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' \ + > $(@:.so=.map) + $(LINK) -shared -o $(@:.map=.so) \ + -Wl,--whole-archive $< $(cpu_$*) -Wl,--no-whole-archive \ + -Wl,--version-script,$(@:.so=.map) \ -Wl,-z,defs -Wl,--as-needed $(libelf) $(libdw) $(libmudflap) $(textrel_check) -# XXX Should not be needed... libebl_i386.so: $(cpu_i386) libebl_x86_64.so: $(cpu_x86_64) -libebl_%.map: Makefile - echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' > $@ - install: install-am install-ebl-modules install-ebl-modules: $(mkinstalldirs) $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR) @@ -130,4 +128,5 @@ noinst_HEADERS = libebl_CPU.h common-reloc.c linux-core-note.c x86_corenote.c EXTRA_DIST = $(foreach m,$(modules),$($(m)_SRCS)) $(modules:=_reloc.def) CLEANFILES += $(foreach m,$(modules),\ - libebl_$(m).so $(am_libebl_$(m)_pic_a_OBJECTS)) + libebl_$(m).map libebl_$(m).so \ + $(am_libebl_$(m)_pic_a_OBJECTS))