+2017-11-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #22362]
+ * Makerules (make-link-multidir): New.
+ * config.make.in (multidir): New.
+ * configure.ac (libc_cv_multidir): New. AC_SUBST.
+ * configure: Regenerated.
+ * csu/Makefile [$(multidir) != .](multilib-extra-objs): New.
+ [$(multidir) != .](extra-objs): Add $(multilib-extra-objs).
+ [$(multidir) != .]($(addprefix $(objpfx)$(multidir)/, $(install-lib))):
+ New target.
+
2017-11-06 Joseph Myers <joseph@codesourcery.com>
[BZ #22402]
$(SHELL) $(..)scripts/rellns-sh $< $@.new
mv -f $@.new $@
endef
+define make-link-multidir
+$(patsubst %/,cd %,$(objpfx)); \
+ $(LN_S) . $(multidir) 2> /dev/null; \
+ test -L $(multidir)
+endef
else
# If we have no symbolic links don't bother with rellns-sh.
define make-link
$(LN_S) $< $@.new
mv -f $@.new $@
endef
+define make-link-multidir
+$(make-target-directory)
+ln -f $(objpfx)/$(@F) $@
+endef
endif
ifeq (yes,$(build-shared))
datarootdir = @datarootdir@
localstatedir = @libc_cv_localstatedir@
localedir = @localedir@
+multidir= @libc_cv_multidir@
# Should we use and build ldconfig?
use-ldconfig = @use_ldconfig@
DEFINES
static_nss
profile
+libc_cv_multidir
libc_cv_pie_default
libc_cv_pic_default
shared
$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`
+
+
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)
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).
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-link-multidir)
+endif