]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
Tweak backends makefile rules to avoid make -j bug.
authorRoland McGrath <roland@redhat.com>
Thu, 18 Feb 2010 22:33:48 +0000 (14:33 -0800)
committerRoland McGrath <roland@redhat.com>
Thu, 18 Feb 2010 22:33:48 +0000 (14:33 -0800)
backends/ChangeLog
backends/Makefile.am

index ff32f3c2e7a900f3d55fb011da567c9768fce396..4ec13fd8892261a9381c3dd251eba83b7283c0e0 100644 (file)
@@ -1,3 +1,9 @@
+2010-02-18  Roland McGrath  <roland@redhat.com>
+
+       * 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  <roland@redhat.com>
 
        * Makefile.am: Use config/eu.am for common stuff.
index d859cc97569b4e0fccef98a6150e71aebb19eced..a18454d62c3c5e52d2a4b627c44c53f6ade53393 100644 (file)
@@ -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))