From aa072e593433eafd8ab42529793137304066dcc8 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Sun, 23 Mar 2003 10:16:44 +0000 Subject: [PATCH] * Makefile.in (MULTIOSDIR): New macro. Use $(CC) $(LIBCFLAGS) instead of $$CC alone. (install_to_tooldir): Use it. --- libiberty/ChangeLog | 6 ++++++ libiberty/Makefile.in | 13 +++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index 667d93b..61f6b98 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,9 @@ +2003-03-23 Alexandre Oliva + + * Makefile.in (MULTIOSDIR): New macro. Use $(CC) $(LIBCFLAGS) + instead of $$CC alone. + (install_to_tooldir): Use it. + 2003-17-03 Jan Hubicka * hashtab.c (htab_traverse_noresize): Break out from ... diff --git a/libiberty/Makefile.in b/libiberty/Makefile.in index 0641796..737d239 100644 --- a/libiberty/Makefile.in +++ b/libiberty/Makefile.in @@ -286,11 +286,16 @@ install_to_libdir: all fi @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install +# This is tricky. Even though CC in the Makefile contains +# multilib-specific flags, it's overridden by FLAGS_TO_PASS from the +# default multilib, so we have to take LIBCFLAGS into account as well, +# since it will be passed the multilib flags. +MULTIOSDIR = `$(CC) $(LIBCFLAGS) -print-multi-os-directory` install_to_tooldir: all - ${mkinstalldirs} $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory` - $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory`/$(TARGETLIB)n - ( cd $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory` ; $(RANLIB) $(TARGETLIB)n ) - mv -f $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory`/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib/`$$CC -print-multi-os-directory`/$(TARGETLIB) + ${mkinstalldirs} $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR) + $(INSTALL_DATA) $(TARGETLIB) $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)n + ( cd $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR) ; $(RANLIB) $(TARGETLIB)n ) + mv -f $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB)n $(DESTDIR)$(tooldir)/lib/$(MULTIOSDIR)/$(TARGETLIB) @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install # needed-list is used by libstdc++. NEEDED is the list of functions -- 2.7.4