diff options
-rw-r--r-- | config.make.in | 1 | ||||
-rwxr-xr-x | configure | 6 | ||||
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | csu/Makefile | 11 | ||||
-rw-r--r-- | nptl/Makefile | 10 |
5 files changed, 23 insertions, 10 deletions
diff --git a/config.make.in b/config.make.in index fd2dbc91d1..bd84a5747d 100644 --- a/config.make.in +++ b/config.make.in @@ -21,6 +21,7 @@ includedir = @includedir@ datarootdir = @datarootdir@ localstatedir = @libc_cv_localstatedir@ localedir = @localedir@ +multidir= @libc_cv_multidir@ # Should we use and build ldconfig? use-ldconfig = @use_ldconfig@ diff --git a/configure b/configure index 6010977c58..c8697d9b1a 100755 --- a/configure +++ b/configure @@ -594,6 +594,7 @@ mach_interface_list DEFINES static_nss profile +libc_cv_multidir libc_cv_pie_default libc_cv_pic_default shared @@ -6698,6 +6699,11 @@ fi $as_echo "$libc_cv_pie_default" >&6; } +# Set the `multidir' variable by grabbing the variable from the compiler. +# We do it once and save the result in a generated makefile. +libc_cv_multidir=`${CC-cc} $CFLAGS $CPPFLAGS -print-multi-directory` + + diff --git a/configure.ac b/configure.ac index 148f7d1682..9f25c9fa0f 100644 --- a/configure.ac +++ b/configure.ac @@ -1783,6 +1783,11 @@ fi rm -f conftest.*]) AC_SUBST(libc_cv_pie_default) +# Set the `multidir' variable by grabbing the variable from the compiler. +# We do it once and save the result in a generated makefile. +libc_cv_multidir=`${CC-cc} $CFLAGS $CPPFLAGS -print-multi-directory` +AC_SUBST(libc_cv_multidir) + AC_SUBST(profile) AC_SUBST(static_nss) diff --git a/csu/Makefile b/csu/Makefile index fd668a5d00..b9803be0ff 100644 --- a/csu/Makefile +++ b/csu/Makefile @@ -77,6 +77,11 @@ crtstuff = crti crtn install-lib += $(crtstuff:=.o) extra-objs += $(crtstuff:=.o) +ifneq ($(multidir),.) +multilib-extra-objs = $(addprefix $(multidir)/, $(install-lib)) +extra-objs += $(multilib-extra-objs) +endif + extra-objs += abi-note.o init.o asm-CPPFLAGS += -I$(objpfx). @@ -147,3 +152,9 @@ $(objpfx)abi-tag.h: $(..)abi-tags done if test -r $@.new; then mv -f $@.new $@; \ else echo >&2 'This configuration not matched in $<'; exit 1; fi + +ifneq ($(multidir),.) +$(addprefix $(objpfx)$(multidir)/, $(install-lib)): $(addprefix $(objpfx), $(install-lib)) + $(make-target-directory) + ln -f $(objpfx)/$(@F) $@ +endif diff --git a/nptl/Makefile b/nptl/Makefile index d819349f43..314cbda46a 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -401,16 +401,6 @@ tests: $(test-modules) endif ifeq ($(build-shared),yes) - -# Set the `multidir' variable by grabbing the variable from the compiler. -# We do it once and save the result in a generated makefile. --include $(objpfx)multidir.mk -$(objpfx)multidir.mk: $(common-objpfx)config.make - $(make-target-directory) - dir=`$(CC) $(CFLAGS) $(CPPFLAGS) -print-multi-directory`; \ - echo "multidir := $$dir" > $@T - mv -f $@T $@ - crti-objs := crti.o crtn-objs := crtn.o ifneq (,$(patsubst .,,$(multidir))) |