summaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules85
1 files changed, 84 insertions, 1 deletions
diff --git a/Makerules b/Makerules
index 92c2872612..bd95656ed5 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
@@ -482,6 +482,54 @@ $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules
PROVIDE(__start___libc_thread_subfreeres = .);\
__libc_thread_subfreeres : { *(__libc_thread_subfreeres) }\
PROVIDE(__stop___libc_thread_subfreeres = .);\
+ PROVIDE(__start__hurd_fd_subinit = .);\
+ _hurd_fd_subinit : { *(_hurd_fd_subinit) }\
+ PROVIDE(__stop__hurd_fd_subinit = .);\
+ PROVIDE(__start__hurd_XXX = .);\
+ _hurd_XXX : { *(_hurd_XXX) }\
+ PROVIDE(__stop__hurd_XXX = .);\
+ PROVIDE(__start__hurd_subinit = .);\
+ _hurd_subinit : { *(_hurd_subinit) }\
+ PROVIDE(__stop__hurd_subinit = .);\
+ PROVIDE(__start__hurd_proc_subinit = .);\
+ _hurd_proc_subinit : { *(_hurd_proc_subinit) }\
+ PROVIDE(__stop__hurd_proc_subinit = .);\
+ PROVIDE(__start__hurd_reauth_hook = .);\
+ _hurd_reauth_hook : { *(_hurd_reauth_hook) }\
+ PROVIDE(__stop__hurd_reauth_hook = .);\
+ PROVIDE(__start__hurd_pgrp_changed_hook = .);\
+ _hurd_pgrp_changed_hook : { *(_hurd_pgrp_changed_hook) }\
+ PROVIDE(__stop__hurd_pgrp_changed_hook = .);\
+ PROVIDE(__start__hurd_preinit_hook = .);\
+ _hurd_preinit_hook : { *(_hurd_preinit_hook) }\
+ PROVIDE(__stop__hurd_preinit_hook = .);\
+ PROVIDE(__start__hurd_fork_prepare_hook = .);\
+ _hurd_fork_prepare_hook : { *(_hurd_fork_prepare_hook) }\
+ PROVIDE(__stop__hurd_fork_prepare_hook = .);\
+ PROVIDE(__start__hurd_fork_setup_hook = .);\
+ _hurd_fork_setup_hook : { *(_hurd_fork_setup_hook) }\
+ PROVIDE(__stop__hurd_fork_setup_hook = .);\
+ PROVIDE(__start__hurd_fork_child_hook = .);\
+ _hurd_fork_child_hook : { *(_hurd_fork_child_hook) }\
+ PROVIDE(__stop__hurd_fork_child_hook = .);\
+ PROVIDE(__start__hurd_fork_parent_hook = .);\
+ _hurd_fork_parent_hook : { *(_hurd_fork_parent_hook) }\
+ PROVIDE(__stop__hurd_fork_parent_hook = .);\
+ PROVIDE(__start__hurd_atfork_prepare_hook = .);\
+ _hurd_atfork_prepare_hook : { *(_hurd_atfork_prepare_hook) }\
+ PROVIDE(__stop__hurd_atfork_prepare_hook = .);\
+ PROVIDE(__start__hurd_atfork_child_hook = .);\
+ _hurd_atfork_child_hook : { *(_hurd_atfork_child_hook) }\
+ PROVIDE(__stop__hurd_atfork_child_hook = .);\
+ PROVIDE(__start__hurd_atfork_parent_hook = .);\
+ _hurd_atfork_parent_hook : { *(_hurd_atfork_parent_hook) }\
+ PROVIDE(__stop__hurd_atfork_parent_hook = .);\
+ PROVIDE(__start__hurd_fork_locks = .);\
+ _hurd_fork_locks : { *(_hurd_fork_locks) }\
+ PROVIDE(__stop__hurd_fork_locks = .);\
+ PROVIDE(__start___pthread_init = .);\
+ __pthread_init : { *(__pthread_init) }\
+ PROVIDE(__stop___pthread_init = .);\
/DISCARD/ : { *(.gnu.glibc-stub.*) }@'
test -s $@T
mv -f $@T $@
@@ -962,6 +1010,9 @@ $(inst_libdir)/libc.so: $(common-objpfx)format.lds \
'$(libdir)/$(patsubst %,$(libtype.oS),$(libprefix)$(libc-name))'\
' AS_NEEDED (' $(rtlddir)/$(rtld-installed-name) ') )' \
) > $@.new
+ifeq ($(patsubst gnu%,,$(config-os)),)
+ echo 'INPUT ( AS_NEEDED ( -lmachuser -lhurduser ) )' >> $@.new
+endif
mv -f $@.new $@
endif
@@ -1175,6 +1226,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
@@ -1184,18 +1243,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 \