summaryrefslogtreecommitdiff
path: root/libc/Makerules
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2014-02-07 21:04:10 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2014-02-07 21:04:10 +0000
commit85f4cc52a11508e42daa5625283410e0d6f3a993 (patch)
treedeca25a1076f1a24479cbca3bd7d162123fae742 /libc/Makerules
parenta1055d384d75c28f09a47c2d8628bc330f892955 (diff)
downloadeglibc2-85f4cc52a11508e42daa5625283410e0d6f3a993.tar.gz
Merge changes between r25087 and r25236 from /fsf/trunk.HEADmaster
git-svn-id: svn://svn.eglibc.org/trunk@25237 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/Makerules')
-rw-r--r--libc/Makerules32
1 files changed, 32 insertions, 0 deletions
diff --git a/libc/Makerules b/libc/Makerules
index 2899d94ec..6143432a9 100644
--- a/libc/Makerules
+++ b/libc/Makerules
@@ -1232,6 +1232,14 @@ ifeq ($(build-shared),yes)
LC_ALL=C $(OBJDUMP) --dynamic-syms $< > $@T
mv -f $@T $@
+# A sysdeps/.../Makefile can set abilist-pattern to something like
+# %-foo.abilist to look for libc-foo.abilist instead of libc.abilist.
+# This makes sense if multiple ABIs can be most cleanly supported by a
+# configuration without using separate sysdeps directories for each.
+ifdef abilist-pattern
+vpath $(abilist-pattern) $(+sysdep_dirs)
+endif
+
vpath %.abilist $(+sysdep_dirs)
# The .PRECIOUS rule prevents the files built by an implicit rule whose
@@ -1241,18 +1249,42 @@ vpath %.abilist $(+sysdep_dirs)
.PRECIOUS: %.symlist
generated += $(extra-libs:=.symlist)
+ifdef abilist-pattern
+check-abi-%: $(common-objpfx)config.make $(abilist-pattern) $(objpfx)%.symlist
+ $(check-abi-pattern)
+check-abi-%: $(common-objpfx)config.make $(abilist-pattern) \
+ $(common-objpfx)%.symlist
+ $(check-abi-pattern)
+endif
check-abi-%: $(common-objpfx)config.make %.abilist $(objpfx)%.symlist
$(check-abi)
check-abi-%: $(common-objpfx)config.make %.abilist $(common-objpfx)%.symlist
$(check-abi)
+define check-abi-pattern
+ diff -p -U 0 $(filter $(abilist-pattern),$^) $(filter %.symlist,$^)
+endef
define check-abi
diff -p -U 0 $(filter %.abilist,$^) $(filter %.symlist,$^)
endef
+ifdef abilist-pattern
+update-abi-%: $(objpfx)%.symlist $(abilist-pattern)
+ $(update-abi-pattern)
+update-abi-%: $(common-objpfx)%.symlist $(abilist-pattern)
+ $(update-abi-pattern)
+endif
update-abi-%: $(objpfx)%.symlist %.abilist
$(update-abi)
update-abi-%: $(common-objpfx)%.symlist %.abilist
$(update-abi)
+define update-abi-pattern
+@if cmp -s $^ 2> /dev/null; \
+ then \
+ echo '+++ $(filter $(abilist-pattern),$^) is unchanged'; \
+ else cp -f $^; \
+ echo '*** Now check $(filter $(abilist-pattern),$^) changes for correctness ***'; \
+ fi
+endef
define update-abi
@if cmp -s $^ 2> /dev/null; \
then \