summaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2016-10-09 20:15:32 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2016-10-09 20:15:32 +0200
commitcbe8b6f603fbea1d64e3570f299a2bf25adfa6fc (patch)
treea62a92aded65b2e0834a4d72701415ed3cca4299 /Makerules
parentd6a8ab3c9097ce211e9aa7780ddd31b4f62d380f (diff)
parent0b113e90a20146a2783f7cb2f3e7de716b892d5f (diff)
Merge branch 't/tls' into refs/top-bases/tschwinge/Roger_Whittaker
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules37
1 files changed, 33 insertions, 4 deletions
diff --git a/Makerules b/Makerules
index 47530d8385..c67bc8d04f 100644
--- a/Makerules
+++ b/Makerules
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2015 Free Software Foundation, Inc.
+# Copyright (C) 1991-2016 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
@@ -518,7 +518,7 @@ lib%.so: lib%_pic.a $(+preinit) $(+postinit) $(link-libc-deps)
$(call after-link,$@)
define build-shlib-helper
-$(LINK.o) -shared $(static-libgcc) -Wl,-O1 $(sysdep-LDFLAGS) \
+$(LINK.o) -shared -static-libgcc -Wl,-O1 $(sysdep-LDFLAGS) \
$(if $($(@F)-no-z-defs)$(no-z-defs),,-Wl,-z,defs) $(rtld-LDFLAGS) \
$(extra-B-$(@F:lib%.so=%).so) -B$(csu-objpfx) \
$(extra-B-$(@F:lib%.so=%).so) $(load-map-file) \
@@ -625,7 +625,7 @@ $(build-shlib-helper) -o $@ $(shlib-lds-flags) \
endef
define build-module-helper
-$(LINK.o) -shared $(static-libgcc) $(sysdep-LDFLAGS) $(rtld-LDFLAGS) \
+$(LINK.o) -shared -static-libgcc $(sysdep-LDFLAGS) $(rtld-LDFLAGS) \
$(if $($(@F)-no-z-defs)$(no-z-defs),,-Wl,-z,defs) \
-B$(csu-objpfx) $(load-map-file) \
$(LDFLAGS.so) $(LDFLAGS-$(@F:%.so=%).so) \
@@ -1398,25 +1398,54 @@ define update-abi
fi
endef
-.PHONY: update-abi check-abi
+# Patch all .abilist files for one DSO. The find command locates
+# abilist files for all architectures. The regular expression in the
+# find invocation is needed to separate libc.abilist and
+# libcrypt.abilist, for example. It assumes that abilist-pattern, if
+# set, is of the form "%-SUFFIX", and not "%SUFFIX", that is, there is
+# a non-alphanumeric seperator between the pattern and the suffix
+# added. The abilist files in /generic/ are filtered out because
+# these are expected to remain empty.
+define update-all-abi
+$(SHELL) $(..)scripts/update-abilist.sh $^ \
+ $$(find $(..)sysdeps \
+ -regextype posix-egrep -regex '.*/$*([^a-z0-9].*)?\.abilist$$' \
+ \! -regex '.*/generic/.*')
+endef
+ifdef abilist-pattern
+update-all-abi-%: $(abilist-pattern) $(objpfx)%.symlist
+ $(update-all-abi)
+update-all-abi-%: $(abilist-pattern) $(common-objpfx)%.symlist
+ $(update-all-abi)
+endif
+update-all-abi-%: %.abilist $(objpfx)%.symlist
+ $(update-all-abi)
+update-all-abi-%: %.abilist $(common-objpfx)%.symlist
+ $(update-all-abi)
+
+.PHONY: update-abi update-all-abi check-abi
update-abi: $(patsubst %.so,update-abi-%,$(install-lib.so-versioned))
+update-all-abi: $(patsubst %.so,update-all-abi-%,$(install-lib.so-versioned))
check-abi-list = $(patsubst %.so,$(objpfx)check-abi-%.out, \
$(install-lib.so-versioned))
check-abi: $(check-abi-list)
ifdef subdir
subdir_check-abi: check-abi
subdir_update-abi: update-abi
+subdir_update-all-abi: update-all-abi
else
check-abi: subdir_check-abi
if grep -q '^FAIL:' $(objpfx)*/check-abi*.test-result; then \
cat $(objpfx)*/check-abi*.out && exit 1; fi
update-abi: subdir_update-abi
+update-all-abi: subdir_update-all-abi
endif
ifeq ($(subdir),elf)
check-abi: $(objpfx)check-abi-libc.out
tests-special += $(objpfx)check-abi-libc.out
update-abi: update-abi-libc
+update-all-abi: update-all-abi-libc
common-generated += libc.symlist
endif