about summary refs log tree commit diff
path: root/Makerules
diff options
context:
space:
mode:
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules22
1 files changed, 22 insertions, 0 deletions
diff --git a/Makerules b/Makerules
index 461451f8a4..1fab920a0a 100644
--- a/Makerules
+++ b/Makerules
@@ -1073,6 +1073,28 @@ endif
 
 # The include magic above causes those files to use this variable for flags.
 CPPFLAGS-nonlib = -DNOT_IN_libc=1
+
+
+ifeq ($(versioning),yes)
+# Generate normalized lists of symbols, versions, and data sizes.
+# This is handy for checking against existing library binaries.
+
+$(objpfx)%.symlist: $(..)scripts/abilist.awk $(objpfx)%.dynsym
+	$(AWK) -f $^ > $@T
+	mv -f $@T $@
+
+$(objpfx)%.dynsym: $(objpfx)%.so
+	$(OBJDUMP) --dynamic-syms $< > $@T
+	mv -f $@T $@
+
+tests: $(patsubst %.so,$(objpfx)%.symlist,$(install-lib.so-versioned))
+generated += $(install-lib.so-versioned:.so=.symlist)
+
+ifndef subdir
+tests: $(objpfx)libc.symlist
+generated += libc.symlist
+endif
+endif
 
 .PHONY: TAGS
 TAGS: $(objpfx)distinfo $(..)MakeTAGS