1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

makefiles: slight change in .export.sym

Avoid emitting Local symbol and sort symbols from
start and add dependency on previous version
Should not change anything, just better followup
linkage guidlines.
This commit is contained in:
Zdenek Kabelac 2021-04-04 13:06:09 +02:00
parent 1398e66a55
commit 40b277ae17
2 changed files with 14 additions and 12 deletions

View File

@ -509,20 +509,21 @@ EXPORTED_SYMBOLS := $(wildcard $(srcdir)/.exported_symbols.Base $(srcdir)/.expor
ifeq (,$(firstword $(EXPORTED_SYMBOLS))) ifeq (,$(firstword $(EXPORTED_SYMBOLS)))
$(Q) set -e; (echo "Base {"; echo " global:";\ $(Q) set -e; (echo "Base {"; echo " global:";\
$(SED) "/^#/d;s/^/ /;s/$$/;/" $<;\ $(SED) "/^#/d;s/^/ /;s/$$/;/" $<;\
echo " local:"; echo " *;";\
echo "};";\ echo "};";\
echo "Local {"; echo " local:"; echo " *;"; echo "};";\
) > $@ ) > $@
else else
$(Q) set -e;\ $(Q) set -e;\
R=$$($(SORT) $^ | $(GREP) -v "^#" | uniq -u);\ R=$$($(SORT) $^ | $(GREP) -v "^#" | uniq -u);\
test -z "$$R" || { echo "Mismatch between symbols in shared library and lists in .exported_symbols.* files: $$R"; false; } ;\ test -z "$$R" || { echo "Mismatch between symbols in shared library and lists in .exported_symbols.* files: $$R"; false; } ;\
( for i in $$(echo $(EXPORTED_SYMBOLS) | tr ' ' '\n' | $(SORT) -rnt_ -k5 ); do\ LAST=;\
for i in $$(echo $(EXPORTED_SYMBOLS) | tr ' ' '\n' | $(SORT) -nt_ -k5 ); do\
echo "$${i##*.} {"; echo " global:";\ echo "$${i##*.} {"; echo " global:";\
$(SED) "/^#/d;s/^/ /;s/$$/;/" $$i;\ $(SED) "/^#/d;s/^/ /;s/$$/;/" $$i;\
echo "};";\ if test -z "$$LAST"; then echo " local:"; echo " *;";fi;\
done;\ echo "}$$LAST;";\
echo "Local {"; echo " local:"; echo " *;"; echo "};";\ LAST=" $${i##*.}";\
) > $@ done > $@
endif endif
ifeq ("@USE_TRACKING@","yes") ifeq ("@USE_TRACKING@","yes")

View File

@ -551,20 +551,21 @@ EXPORTED_SYMBOLS := $(wildcard $(srcdir)/.exported_symbols.Base $(srcdir)/.expor
ifeq (,$(firstword $(EXPORTED_SYMBOLS))) ifeq (,$(firstword $(EXPORTED_SYMBOLS)))
$(Q) set -e; (echo "Base {"; echo " global:";\ $(Q) set -e; (echo "Base {"; echo " global:";\
$(SED) "/^#/d;s/^/ /;s/$$/;/" $<;\ $(SED) "/^#/d;s/^/ /;s/$$/;/" $<;\
echo " local:"; echo " *;";\
echo "};";\ echo "};";\
echo "Local {"; echo " local:"; echo " *;"; echo "};";\
) > $@ ) > $@
else else
$(Q) set -e;\ $(Q) set -e;\
R=$$($(SORT) $^ | $(GREP) -v "^#" | uniq -u);\ R=$$($(SORT) $^ | $(GREP) -v "^#" | uniq -u);\
test -z "$$R" || { echo "Mismatch between symbols in shared library and lists in .exported_symbols.* files: $$R"; false; } ;\ test -z "$$R" || { echo "Mismatch between symbols in shared library and lists in .exported_symbols.* files: $$R"; false; } ;\
( for i in $$(echo $(EXPORTED_SYMBOLS) | tr ' ' '\n' | $(SORT) -rnt_ -k5 ); do\ LAST=;\
for i in $$(echo $(EXPORTED_SYMBOLS) | tr ' ' '\n' | $(SORT) -nt_ -k5 ); do\
echo "$${i##*.} {"; echo " global:";\ echo "$${i##*.} {"; echo " global:";\
$(SED) "/^#/d;s/^/ /;s/$$/;/" $$i;\ $(SED) "/^#/d;s/^/ /;s/$$/;/" $$i;\
echo "};";\ if test -z "$$LAST"; then echo " local:"; echo " *;";fi;\
done;\ echo "}$$LAST;";\
echo "Local {"; echo " local:"; echo " *;"; echo "};";\ LAST=" $${i##*.}";\
) > $@ done > $@
endif endif
ifeq ("$(USE_TRACKING)","yes") ifeq ("$(USE_TRACKING)","yes")