summaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2015-01-23 16:47:35 +0100
committerThomas Schwinge <thomas@codesourcery.com>2015-01-23 16:47:35 +0100
commita4f32dac3aa9fd9fd00dfb2dacaf039674437be0 (patch)
tree22c063ae6d7784a889621c30f5215099bbb159e6 /Makerules
parentd4e923339bd73d86f99c63b5ed00dcad0e817671 (diff)
parent58695b88a9deaecbcf7794760cc333177edaa2b4 (diff)
Merge branch 'baseline' into refs/top-bases/tschwinge/Roger_Whittaker
Conflicts: hurd/hurdsocket.h sysdeps/mach/hurd/errno-loc.c
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules34
1 files changed, 33 insertions, 1 deletions
diff --git a/Makerules b/Makerules
index 584e797b11..4745fcbc68 100644
--- a/Makerules
+++ b/Makerules
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2013 Free Software Foundation, Inc.
+# Copyright (C) 1991-2014 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -1223,6 +1223,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
@@ -1232,18 +1240,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 \