This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PR19525: Build testing of non-default multilibs


Here's an attempt to fix PR19525 (the one about build testing not
working for non-default multilibs on Solaris, IRIX, and multilibbed
linux targets).  When the PR was discussed on gcc@, the consensus
seemed to be that we should remove the multilib encoding from the
shared libgcc and install it in the same directory as libraries
like libstdc++:

    http://gcc.gnu.org/ml/gcc/2005-02/msg00273.html

The patch below tries to do that.

To recap, SHLIB_LINK provides a target-specific way of creating a
shared library and SHLIB_INSTALL provides a target-specific way of
installing it.  Both get information from mklibgcc using automake-style
@foo@ substitutions.

The name of the shared library is @shlib_base_name@$(SHLIB_EXT).
At the moment, SHLIB_LINK will always put the library in gcc/ and
mklibgcc will mangle @shlib_base_name@ to make it different for
each multilib.  The unmangled basename is available as @shlib_so_name@.

If targets define MULTILIB_OSDIRNAMES, mklibgcc also provides
@shlib_slibdir_qual@, a qualifier that should be added to $(slibdir).
This qualifier contains the output of -print-multi-os-directory with
any trailing MULTILIB_DIRNAMES removed.

In order to move to the new scheme:

  (1) The distinction between @shlib_so_name@ and @shlib_base_name@
      should be removed (in other words, there should be no mangled names).

  (2) SHLIB_LINK should put the shared library in gcc/@multilib_dir@

  (3) SHLIB_INSTALL should add the full -print-multi-os-directory output
      to $(slibdir), not a reduced version, and it should do so even for
      multilib targets that don't use MULTILIB_OSDIRNAMES.   (Note that
      -print-multi-os-directory is the same as -print-multi-directory
      when MULTILIB_OSDIRNAMES isn't defined.)
      
  (4) The gcc driver should stop using mangled names.

Taking each in turn:

  (1) The patch removes @shlib_so_name@ and sets @shlib_base_name@
      to either "libgcc_s" or "libunwind".  It replaces uses of
      @shlib_so_name@ with @shlib_base_name@ in the makefile fragments.
 
  (2) The patch makes SHLIB_LINK put @shlib_so_name@$(SHLIB_EXT) (and
      any other target-specific files) in gcc/@multilib_dir@.  It makes
      @multilib_dir@ available to SHLIB_INSTALL and adjusts each
      SHLIB_INSTALL definition accordingly.

  (3) The patch sets @shlib_slibdir_qual@ to the suffix derived from
      -print-multi-os-directory.  It also adds @shlib_slibdir_qual@
      to the SHLIB_INSTALL definitions that now need it and didn't
      before (namely those that are only set up for MULTILIB_DIRNAMES,
      not MULTILIB_OSDIRNAMES).

  (4) is simply a case of removing two uses of %M from gcc.c.
      Not surprisingly, this seems to have been the only use of %M,
      so the patch gets rid of the support code and documentation as well.

Also, SHLIB_MULTILIB is no longer used.  The patch removes the support
from mklibgcc rather than try to make it work with the new scheme.
(I think Daniel J had a separate patch for this.)

Oh, and since mklibgcc doesn't need $suffix for shlib* things any more,
the patch moves the suffix= assignment above its new first use.

The following files define SHLIB_LINK and SHLIB_INSTALL:

    config/t-slibgcc-elf-ver
    config/t-slibgcc-darwin
    config/t-slibgcc-sld
    config/alpha/t-osf4
    config/arm/t-netbsd
    config/i386/t-nwld
    config/ia64/t-hpux
    config/mips/t-slibgcc-irix
    config/pa/t-hpux-shlib
    config/rs6000/t-aix43
    config/rs6000/t-aix52
    config/sh/t-linux

...and config/t-libunwind-elf defines SHLIBUNWIND_{LINK,INSTALL}.

Of these, the following aren't used for multilibbed targets and aren't
really set up for multilibs:

    config/alpha/t-osf4
    config/arm/t-netbsd

No changes are needed here.

The following files set @shlib_base_name@$(SHLIB_EXT) to be a link
to a versioned library:

    config/t-libunwind-elf
    config/t-slibgcc-elf-ver
    config/t-slibgcc-darwin
    config/t-slibgcc-sld
    config/mips/t-slibgcc-irix
    config/pa/t-hpux-shlib

SHLIB_LINK needs to put both the link and library in gcc/@multilib_dir@.
SHLIB_INSTALL needs to copy the versioned library from gcc/@multilib_dir@
to $(slibdir)@shlib_slibdir_qual@ and create a link in the same
directory.

As for the others:

    config/i386/t-nwld
        isn't set up for multilibs.  It defines both SHLIB_SONAME and
        SHLIB_NAME (derived from @shlib_so_name@ and @shlib_base_name@
        respectively), but both use the same extension and have the
        same value.  The patched file uses SHLIB_NAME exclusively.

    config/ia64/t-hpux
        is like t-slibgcc-elf-ver except that, in the build directory,
        the versioned file is the symlink.  This is reversed when the
        files are installed.

    config/rs6000/t-aix43 and
    config/rs6000/t-aix52
        create a single file called @shlib_base_name@.a.  After the
        patch, SHLIB_LINK will put this file in gcc/@multilib_dir@ and
        SHLIB_INSTALL will install it into $(slibdir)@shlib_slibdir_qual@.

        There are also some case statements to detect whether a
        library needs threading support.  The patch makes them
        look at @multilib_dir@ rather than @shlib_base_name@.

    config/sh/t-linux
        is like t-slibgcc-elf-ver but uses a script instead of a link.

I tested the patch by building libgcc.mk for the following targets:

    alpha-dec-osf4
    arm-netbsd
    hppa1.0-hpux10
    i386-netware          [1]
    ia64-hpux
    ia64-linux-gnu        [2]
    mips64-linux-gnu
    mips-sgi-irix6.5
    powerpc64-linux-gnu   [3]
    powerpc-darwin
    rs6000-ibm-aix4.3
    rs6000-ibm-aix5.2
    sh64-linux-gnu
    sparc-sun-solaris2.8  [4]

    [1] configured using --with-ld=/tmp/nwld, where /tmp/nwld was
        a copy of /bin/true.

    [2] to test libunwind

    [3] to test the MULTILIB_DIRNAMES/MULTILIB_OSDIRNAMES combo.

    [4] configured using --without-gnu-ld.

This should cover all the makefile fragments listed above (verified by
grepping for tmake_file= in */gcc/Makefile).  I diffed libgcc.mk from
before and after the patch and they seemed to be doing what I expected.
I couldn't spot any obvious errors, but sorry in advance if I've goofed.

The patch was also bootstrapped & regression tested on mips-sgi-irix6.5
and mips64-linux-gnu.  OK to install?

Richard


	PR target/19525
	* doc/invoke.texi: Remove documentation of %M spec.
	* gcc.c: Likewise.
	(init_spec): Remove %M suffix from -lgcc_s.
	(do_spec_1): Remove 'M' case.
	* mklibgcc.in: Remove SHLIB_MULTILIB handling.  Expect SHLIB_LINK
	to put shared libraries in the multilib directory.  Remove the
	shlib_so_soname substitution variable.  Don't add a multilib encoding
	to shlib_base_name.  Set shlib_slibdir_qual to the full pathname
	reported by -print-multi-os-directory.  Pass @multilib_dir@ to
	SHLIB_INSTALL as well as SHLIB_LINK.
	* config/t-slibgcc-elf-ver (SHLIB_SONAME): Use @shlib_base_name@.
	(SHLIB_NAME): Delete.
	(SHLIB_DIR): New macro.
	(SHLIB_LINK): Put $(SHLIB_SONAME) and $(SHLIB_SOLINK) in $(SHLIB_DIR).
	(SHLIB_INSTALL): Adjust accordingly.
	* config/t-slibgcc-darwin: As for t-slibgcc-elf-ver.
	* config/t-slibgcc-sld: Likewise.
	* config/t-libunwind-elf (SHLIBUNWIND_NAME): Delete.
	(SHLIBUNWIND_SONAME): Use @shlib_base_name@.
	(SHLIBUNWIND_LINK): Put $(SHLIBUNWIND_SONAME) and $(SHLIB_SOLINK)
	in $(SHLIB_DIR).
	(SHLIBUNWIND_INSTALL): Adjust accordingly.
	* config/i386/t-nwld (SHLIB_SONAME): Delete.
	(SHLIB_LINK, SHLIB_INSTALL): Use SHLIB_NAME instead of SHLIB_SONAME.
	Use @shlib_base_name@ instead of @shlib_so_name@.
	* config/ia64/t-hpux (SHLIB_LINK): Put @shlib_base_name@.so.0
	and @shlib_base_name@.so in @multilib_dir@.
	(SHLIB_INSTALL): Adjust accordingly.  Add @shlib_slibdir_qual@
	to the install path.
	* config/mips/t-slibgcc-irix: As for t-slibgcc-elf-ver.
	(SHLIB_LINK): Remove previous workaround.
	* config/pa/t-hpux-shlib (SHLIB_DIR, SHLIB_SLIBDIR_QUAL): New macros.
	(SHLIB_LINK): Put $(SHLIB_SONAME) and $(SHLIB_NAME) in $(SHLIB_DIR).
	(SHLIB_INSTALL): Adjust accordingly.  Add $(SHLIB_SLIBDIR_QUAL) to
	the install path.
	* config/rs6000/t-aix43 (SHLIB_LINK): Put @shlib_base_name@.a in
	@multilib_dir@.  Use @multilib_dir@ to check for threading libraries.
	(SHLIB_INSTALL): Adjust accordingly.
	(SHLIB_LIBS): Use @multilib_dir@ to check for threading libraries.
	* config/rs6000/t-aix52: As for config/rs6000/t-aix43.
	* config/sh/t-linux (SHLIB_LINK, SHLIB_INSTALL): As for
	config/t-slibgcc-elf-ver.

Index: doc/invoke.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.570
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.570 invoke.texi
--- doc/invoke.texi	26 Jan 2005 20:36:05 -0000	1.570
+++ doc/invoke.texi	13 Feb 2005 20:37:35 -0000
@@ -6324,11 +6324,6 @@ Dump out a @option{-L} option for each d
 contain startup files.  If the target supports multilibs then the
 current multilib directory will be prepended to each of these paths.
 
-@item %M
-Output the multilib directory with directory separators replaced with
-@samp{_}.  If multilib directories are not set, or the multilib directory is
-@file{.} then this option emits nothing.
-
 @item %L
 Process the @code{lib} spec.  This is a spec string for deciding which
 libraries should be included on the command line to the linker.
Index: gcc.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gcc.c,v
retrieving revision 1.444
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.444 gcc.c
--- gcc.c	7 Jan 2005 01:05:37 -0000	1.444
+++ gcc.c	13 Feb 2005 20:37:37 -0000
@@ -473,8 +473,6 @@ or with constant text in a single argume
  %l     process LINK_SPEC as a spec.
  %L     process LIB_SPEC as a spec.
  %G     process LIBGCC_SPEC as a spec.
- %M     output multilib_dir with directory separators replaced with "_";
-	if multilib_dir is not set or is ".", output "".
  %S     process STARTFILE_SPEC as a spec.  A capital S is actually used here.
  %E     process ENDFILE_SPEC as a spec.  A capital E is actually used here.
  %C     process CPP_SPEC as a spec.
@@ -1704,11 +1702,7 @@ init_spec (void)
 	if (in_sep && *p == '-' && strncmp (p, "-lgcc", 5) == 0)
 	  {
 	    init_gcc_specs (&obstack,
-#ifdef NO_SHARED_LIBGCC_MULTILIB
 			    "-lgcc_s"
-#else
-			    "-lgcc_s%M"
-#endif
 #ifdef USE_LIBUNWIND_EXCEPTIONS
 			    " -lunwind"
 #endif
@@ -1732,12 +1726,7 @@ init_spec (void)
 	    /* Ug.  We don't know shared library extensions.  Hope that
 	       systems that use this form don't do shared libraries.  */
 	    init_gcc_specs (&obstack,
-#ifdef NO_SHARED_LIBGCC_MULTILIB
-			    "-lgcc_s"
-#else
-			    "-lgcc_s%M"
-#endif
-			    ,
+			    "-lgcc_s",
 			    "libgcc.a%s",
 			    "libgcc_eh.a%s"
 #ifdef USE_LIBUNWIND_EXCEPTIONS
@@ -5078,23 +5067,6 @@ do_spec_1 (const char *spec, int inswitc
 	      return value;
 	    break;
 
-	  case 'M':
-	    if (multilib_dir && strcmp (multilib_dir, ".") != 0)
-	      {
-		char *p;
-		const char *q;
-		size_t len;
-
-		len = strlen (multilib_dir);
-		obstack_blank (&obstack, len + 1);
-		p = obstack_next_free (&obstack) - (len + 1);
-
-		*p++ = '_';
-		for (q = multilib_dir; *q ; ++q, ++p)
-		  *p = (IS_DIR_SEPARATOR (*q) ? '_' : *q);
-	      }
-	    break;
-
 	  case 'R':
 	    /* We assume there is a directory
 	       separator at the end of this string.  */
Index: mklibgcc.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/mklibgcc.in,v
retrieving revision 1.80
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.80 mklibgcc.in
--- mklibgcc.in	15 Dec 2004 07:43:48 -0000	1.80
+++ mklibgcc.in	13 Feb 2005 20:37:37 -0000
@@ -33,7 +33,6 @@
 # EXTRA_MULTILIB_PARTS
 # SHLIB_EXT
 # SHLIB_LINK
-# SHLIB_MULTILIB
 # SHLIB_MKMAP
 # SHLIB_MKMAP_OPTS
 # SHLIB_MAPFILES
@@ -152,79 +151,29 @@ for ml in $MULTILIBS; do
   # Work out relevant parameters that depend only on the multilib.
   dir=`echo ${ml} | sed -e 's/;.*$//' -e 's/=/$(EQ)/g'`
   flags=`echo ${ml} | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`;
-  shlib_dir=
-  shlib_dir_qual=
+  shlib_slibdir_qual=
   libgcc_a=$dir/libgcc.a
   libgcov_a=$dir/libgcov.a
   libgcc_eh_a=
   libgcc_s_so=
   libunwind_a=
   libunwind_so=
-  if [ "$dir" = . ]; then
-    suffix=
-  else
-    suffix=`echo $dir | sed s,/,_,g`
-  fi
 
   if [ "$LIBUNWIND" ]; then
     libunwind_a=$dir/libunwind.a
   fi
   if [ "$SHLIB_LINK" ]; then
-    if [ -z "$SHLIB_MULTILIB" ]; then
-      if [ "$dir" = . ]; then
-	libgcc_eh_a=$dir/libgcc_eh.a
-	libgcc_s_so_base=libgcc_s
-	libgcc_s_so=${libgcc_s_so_base}${SHLIB_EXT}
-	libgcc_s_soname=libgcc_s
-	if [ "$LIBUNWIND" ]; then
-	  libunwind_so_base=libunwind
-	  libunwind_so=${libunwind_so_base}${SHLIB_EXT}
-	  libunwind_soname=libunwind
-	fi
-      else
-	libgcc_eh_a=$dir/libgcc_eh.a
-	libgcc_s_so_base=libgcc_s_${suffix}
-	libgcc_s_so=${libgcc_s_so_base}${SHLIB_EXT}
-	libgcc_s_soname=libgcc_s_${suffix}
-	if [ "$LIBUNWIND" ]; then
-	  libunwind_so_base=libunwind_${suffix}
-	  libunwind_so=${libunwind_so_base}${SHLIB_EXT}
-	fi
-      fi
-
-      if [ -n "$MULTILIB_OSDIRNAMES" ]; then
-	if [ "$dir" != . ]; then
-	  gcc_multilib_dir=`./xgcc -B./ $flags --print-multi-directory`
-	  os_multilib_dir=`./xgcc -B./ $flags --print-multi-os-directory`
-	  shlib_dir="$dir"/
-	  gcc_multilib_sup=`echo $gcc_multilib_dir | sed 's~^[^/]*/~~'`
-	  os_multilib_base=`echo $os_multilib_dir | sed -n "s~/${gcc_multilib_sup}\$~~p"`
-	  if [ -z "$os_multilib_base" ]; then
-	    libgcc_s_soname=libgcc_s
-	    libunwind_soname=libunwind
-	    if [ "$os_multilib_dir" != "." ]; then
-	      shlib_dir_qual="/$os_multilib_dir"
-	    fi
-	  else
-	    libgcc_s_soname=libgcc_s_`echo $gcc_multilib_sup | sed s,/,_,g`
-	    libunwind_soname=libunwind_`echo $gcc_multilib_sup | sed s,/,_,g`
-	    shlib_dir_qual="/$os_multilib_base"
-	  fi
-	fi
-      fi
-
-    elif [ "$SHLIB_MULTILIB" = "$dir" ]; then
-      libgcc_eh_a=$dir/libgcc_eh.a
-      libgcc_s_so_base=libgcc_s
-      libgcc_s_so=${libgcc_s_so_base}${SHLIB_EXT}
-      libgcc_s_soname=libgcc_s
-      if [ "$LIBUNWIND" ]; then
-	libunwind_so_base=libunwind
-	libunwind_so=${libunwind_so_base}${SHLIB_EXT}
-	libunwind_soname=libunwind
-      fi
+    libgcc_eh_a=$dir/libgcc_eh.a
+    libgcc_s_so=$dir/libgcc_s${SHLIB_EXT}
+    if [ "$LIBUNWIND" ]; then
+      libunwind_so=$dir/libunwind${SHLIB_EXT}
+    fi
+    os_multilib_dir=`./xgcc -B./ $flags --print-multi-os-directory`
+    if [ "$os_multilib_dir" != . ]; then
+      shlib_slibdir_qual="/$os_multilib_dir"
     fi
   fi
+
   libgcc_s_so_extra=
   libunwind_so_extra=
 
@@ -238,20 +187,9 @@ for ml in $MULTILIBS; do
   echo \# libgcc_eh_a: $libgcc_eh_a
   echo \# libunwind_a: $libunwind_a
   echo \#
-  echo \# gcc_multilib_dir: $gcc_multilib_dir
-  echo \# gcc_multilib_sup: $gcc_multilib_sup
-  echo \# os_multilib_dir: $os_multilib_dir
-  echo \# os_multilib_base: $os_multilib_base
-  echo \# shlib_dir: $shlib_dir
-  echo \# shlib_dir_qual: $shlib_dir_qual
-  echo \#
+  echo \# shlib_slibdir_qual: $shlib_slibdir_qual
   echo \# libgcc_s_so: $libgcc_s_so
-  echo \# libgcc_s_so_base: $libgcc_s_so_base
-  echo \# libgcc_s_soname: $libgcc_s_soname
-  echo \# 
   echo \# libunwind_so: $libunwind_so
-  echo \# libunwind_so_base: $libunwind_so_base
-  echo \# libunwind_soname: $libunwind_soname
   echo \#
   echo
 
@@ -681,6 +619,11 @@ for ml in $MULTILIBS; do
       extra="$extra $targ"
     done
 
+    if [ "$dir" = . ]; then
+      suffix=
+    else
+      suffix=`echo $dir | sed s,/,_,g`
+    fi
     echo extra$suffix: stmp-dirs
     echo "	$make_compile" \\
     echo '	  LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS)' $flags '" ' \\
@@ -771,8 +714,7 @@ EOF
 	 | sed -e "s%@multilib_flags@%$flags%g" \
 	       -e "s%@multilib_dir@%$dir%g" \
 	       -e "s%@shlib_objs@%\$(objects)%g" \
-	       -e "s%@shlib_base_name@%$libgcc_s_so_base%g" \
-	       -e "s%@shlib_so_name@%$libgcc_s_soname%g" \
+	       -e "s%@shlib_base_name@%libgcc_s%g" \
 	       -e "s%@shlib_map_file@%$mapfile%g" \
 	       -e "s%@shlib_slibdir_qual@%$shlib_dir_qual%g"
     echo "all: $libgcc_s_so"
@@ -785,8 +727,7 @@ EOF
 	   | sed -e "s%@multilib_flags@%$flags%g" \
 		 -e "s%@multilib_dir@%$dir%g" \
 		 -e "s%@shlib_objs@%\$(objects)%g" \
-		 -e "s%@shlib_base_name@%$libunwind_so_base%g" \
-		 -e "s%@shlib_so_name@%$libunwind_soname%g" \
+		 -e "s%@shlib_base_name@%libunwind%g" \
 		 -e "s%@shlib_slibdir_qual@%$shlib_dir_qual%g"
     echo "all: $libunwind_so"
   fi
@@ -833,66 +774,23 @@ for ml in $MULTILIBS; do
     echo '	$(INSTALL_DATA)' ${dir}/libgcc_eh.a ${ldir}/
     echo '	$(RANLIB_FOR_TARGET)' ${ldir}/libgcc_eh.a
 
-    if [ -z "$SHLIB_MULTILIB" ]; then
-      if [ "$dir" = . ]; then
-	shlib_base_name=libgcc_s
-	shlibunwind_base_name=libunwind
-      else
-	shlib_base_name=libgcc_s_`echo $dir | sed s,/,_,g`
-	shlibunwind_base_name=libunwind_`echo $dir | sed s,/,_,g`
-      fi
-      shlib_so_name="$shlib_base_name"
-      shlibunwind_so_name="$shlibunwind_base_name"
-      shlib_dir=
-      shlib_slibdir_qual=
-      if [ -n "$MULTILIB_OSDIRNAMES" ]; then
-	gcc_multilib_dir=`./xgcc -B./ $flags --print-multi-directory`
-	os_multilib_dir=`./xgcc -B./ $flags --print-multi-os-directory`
-	if [ "$dir" != . ]; then
-	  shlib_dir="$dir"/
-	fi
-	gcc_multilib_sup=`echo $gcc_multilib_dir | sed 's~^[^/]*/~~'`
-	os_multilib_base=`echo $os_multilib_dir | sed -n "s~/${gcc_multilib_sup}\$~~p"`
-	if [ -z "$os_multilib_base" ]; then
-	  shlib_so_name=libgcc_s
-	  shlibunwind_so_name=libunwind
-	  if [ "$os_multilib_dir" != "." ]; then
-	    shlib_slibdir_qual="/$os_multilib_dir"
-	  fi
-	else
-	  shlib_so_name=libgcc_s_`echo $gcc_multilib_sup | sed s,/,_,g`
-	  shlibunwind_so_name=libunwind_`echo $gcc_multilib_sup | sed s,/,_,g`
-	  shlib_slibdir_qual="/$os_multilib_base"
-	fi
-      fi
-      echo "	$SHLIB_INSTALL" \
-	| sed -e "s%@shlib_base_name@%$shlib_base_name%g" \
-	      -e "s%@shlib_so_name@%$shlib_so_name%g" \
+    shlib_slibdir_qual=
+    os_multilib_dir=`./xgcc -B./ $flags --print-multi-os-directory`
+    if [ "$os_multilib_dir" != . ]; then
+      shlib_slibdir_qual="/$os_multilib_dir"
+    fi
+    echo "	$SHLIB_INSTALL" \
+      | sed -e "s%@multilib_dir@%$dir%g" \
+	    -e "s%@shlib_base_name@%libgcc_s%g" \
+	    -e "s%@shlib_slibdir_qual@%$shlib_slibdir_qual%g"
+    if [ "$LIBUNWIND" ]; then
+      echo "	$SHLIBUNWIND_INSTALL" \
+	| sed -e "s%@multilib_dir@%$dir%g" \
+	      -e "s%@shlib_base_name@%libunwind%g" \
 	      -e "s%@shlib_slibdir_qual@%$shlib_slibdir_qual%g"
-      if [ "$LIBUNWIND" ]; then
-	echo "	$SHLIBUNWIND_INSTALL" \
-	   | sed -e "s%@shlib_base_name@%$shlibunwind_base_name%g" \
-		 -e "s%@shlib_so_name@%$shlibunwind_so_name%g" \
-		 -e "s%@shlib_slibdir_qual@%$shlib_slibdir_qual%g"
-	libunwinddir='$(DESTDIR)$(slibdir)$(shlib_slibdir_qual)/$(shlib_dir)'
-	echo '	$(INSTALL_DATA)' ${dir}/libunwind.a ${libunwinddir}/
-	echo '	$(RANLIB_FOR_TARGET)' ${libunwinddir}/libunwind.a
-      fi
-    elif [ "$SHLIB_MULTILIB" = "$dir" ]; then
-      shlib_base_name="libgcc_s";
-      echo "	$SHLIB_INSTALL" \
-	| sed -e "s%@shlib_base_name@%$shlib_base_name%g" \
-	      -e "s%@shlib_so_name@%$shlib_base_name%g" \
-	      -e "s%@shlib_slibdir_qual@%%g"
-      if [ "$LIBUNWIND" ]; then
-	echo "	$SHLIBUNWIND_INSTALL" \
-	   | sed -e "s%@shlib_base_name@%$shlibunwind_base_name%g" \
-		 -e "s%@shlib_so_name@%$shlibunwind_base_name%g" \
-		 -e "s%@shlib_slibdir_qual@%%g"
-	libunwinddir='$(DESTDIR)$(slibdir)'
-	echo '	$(INSTALL_DATA)' ${dir}/libunwind.a ${libunwinddir}/
-	echo '	$(RANLIB_FOR_TARGET)' ${libunwinddir}/libunwind.a
-      fi
+      libunwinddir='$(DESTDIR)$(slibdir)$(shlib_slibdir_qual)/$(shlib_dir)'
+      echo '	$(INSTALL_DATA)' ${dir}/libunwind.a ${libunwinddir}/
+      echo '	$(RANLIB_FOR_TARGET)' ${libunwinddir}/libunwind.a
     fi
   fi
 done
Index: config/t-libunwind-elf
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/t-libunwind-elf,v
retrieving revision 1.4
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.4 t-libunwind-elf
--- config/t-libunwind-elf	16 Dec 2004 19:14:27 -0000	1.4
+++ config/t-libunwind-elf	13 Feb 2005 20:37:37 -0000
@@ -5,25 +5,26 @@ LIBUNWIND = $(srcdir)/unwind-dw2.c $(src
 LIBUNWINDDEP = unwind.inc unwind-dw2-fde.h unwind-dw2-fde.c
 
 SHLIBUNWIND_SOVERSION = 7
-SHLIBUNWIND_SONAME = @shlib_so_name@.so.$(SHLIBUNWIND_SOVERSION)
-SHLIBUNWIND_NAME = @shlib_base_name@.so.$(SHLIBUNWIND_SOVERSION)
+SHLIBUNWIND_SONAME = @shlib_base_name@.so.$(SHLIBUNWIND_SOVERSION)
 
 SHLIBUNWIND_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared \
 	-nodefaultlibs -Wl,-h,$(SHLIBUNWIND_SONAME) \
-	-Wl,-z,text -Wl,-z,defs -o $(SHLIBUNWIND_NAME).tmp \
+	-Wl,-z,text -Wl,-z,defs -o $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME).tmp \
 	@multilib_flags@ $(SHLIB_OBJS) -lc && \
-	rm -f $(SHLIB_SOLINK) && \
-	if [ -f $(SHLIBUNWIND_NAME) ]; then \
-	  mv -f $(SHLIBUNWIND_NAME) $(SHLIBUNWIND_NAME).backup; \
+	rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
+	if [ -f $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME) ]; then \
+	  mv -f $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME) \
+		$(SHLIB_DIR)/$(SHLIBUNWIND_SONAME).backup; \
 	else true; fi && \
-	mv $(SHLIBUNWIND_NAME).tmp $(SHLIBUNWIND_NAME) && \
-	$(LN_S) $(SHLIBUNWIND_NAME) $(SHLIB_SOLINK)
+	mv $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME).tmp \
+	   $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME) && \
+	$(LN_S) $(SHLIBUNWIND_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
 
 # $(slibdir) double quoted to protect it from expansion while building
 # libgcc.mk.  We want this delayed until actual install time.
 SHLIBUNWIND_INSTALL = \
 	$$(SHELL) $$(srcdir)/mkinstalldirs $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
-	$(INSTALL_DATA) $(SHLIBUNWIND_NAME) \
+	$(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIBUNWIND_SONAME) \
 	  $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIBUNWIND_SONAME); \
 	rm -f $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \
 	$(LN_S) $(SHLIBUNWIND_SONAME) \
Index: config/t-slibgcc-darwin
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/t-slibgcc-darwin,v
retrieving revision 1.8
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.8 t-slibgcc-darwin
--- config/t-slibgcc-darwin	16 Dec 2004 19:14:27 -0000	1.8
+++ config/t-slibgcc-darwin	13 Feb 2005 20:37:37 -0000
@@ -4,29 +4,30 @@ SHLIB_REVISION = 0
 SHLIB_VERSTRING = -compatibility_version $(SHLIB_MINOR) -current_version $(SHLIB_MINOR).$(SHLIB_REVISION)
 SHLIB_EXT = .dylib
 SHLIB_SOLINK = @shlib_base_name@.dylib
-SHLIB_SONAME = @shlib_so_name@.$(SHLIB_MINOR).$(SHLIB_REVISION).dylib
-SHLIB_NAME = @shlib_base_name@.$(SHLIB_MINOR).$(SHLIB_REVISION).dylib
+SHLIB_SONAME = @shlib_base_name@.$(SHLIB_MINOR).$(SHLIB_REVISION).dylib
 SHLIB_MAP = @shlib_map_file@
 SHLIB_OBJS = @shlib_objs@
+SHLIB_DIR = @multilib_dir@
 SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
 
 SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -dynamiclib -nodefaultlibs \
 	-Wl,-install_name,$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME) \
-	-Wl,-flat_namespace -o $(SHLIB_NAME).tmp \
+	-Wl,-flat_namespace -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp \
 	-Wl,-exported_symbols_list,$(SHLIB_MAP) \
 	$(SHLIB_VERSTRING) \
 	@multilib_flags@ $(SHLIB_OBJS) -lc && \
-	rm -f $(SHLIB_SOLINK) && \
-	if [ -f $(SHLIB_NAME) ]; then \
-	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
+	rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
+	if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \
+	  mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \
+		$(SHLIB_DIR)/$(SHLIB_SONAME).backup; \
 	else true; fi && \
-	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
-	$(LN_S) $(SHLIB_NAME) $(SHLIB_SOLINK)
+	mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \
+	$(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
 # $(slibdir) double quoted to protect it from expansion while building
 # libgcc.mk.  We want this delayed until actual install time.
 SHLIB_INSTALL = \
 	$$(mkinstalldirs) $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
-	$(INSTALL_DATA) $(SHLIB_NAME) \
+	$(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_SONAME) \
 	  $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \
 	rm -f $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \
 	$(LN_S) $(SHLIB_SONAME) \
Index: config/t-slibgcc-elf-ver
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/t-slibgcc-elf-ver,v
retrieving revision 1.10
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.10 t-slibgcc-elf-ver
--- config/t-slibgcc-elf-ver	16 Dec 2004 19:14:27 -0000	1.10
+++ config/t-slibgcc-elf-ver	13 Feb 2005 20:37:37 -0000
@@ -4,28 +4,30 @@
 SHLIB_EXT = .so
 SHLIB_SOLINK = @shlib_base_name@.so
 SHLIB_SOVERSION = 1
-SHLIB_SONAME = @shlib_so_name@.so.$(SHLIB_SOVERSION)
-SHLIB_NAME = @shlib_base_name@.so.$(SHLIB_SOVERSION)
+SHLIB_SONAME = @shlib_base_name@.so.$(SHLIB_SOVERSION)
 SHLIB_MAP = @shlib_map_file@
 SHLIB_OBJS = @shlib_objs@
+SHLIB_DIR = @multilib_dir@
 SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
 SHLIB_LC = -lc
 
 SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
 	-Wl,--soname=$(SHLIB_SONAME) \
 	-Wl,--version-script=$(SHLIB_MAP) \
-	-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) $(SHLIB_LC) && \
-	rm -f $(SHLIB_SOLINK) && \
-	if [ -f $(SHLIB_NAME) ]; then \
-	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
+	-o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \
+	$(SHLIB_OBJS) $(SHLIB_LC) && \
+	rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
+	if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \
+	  mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \
+		$(SHLIB_DIR)/$(SHLIB_SONAME).backup; \
 	else true; fi && \
-	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
-	$(LN_S) $(SHLIB_NAME) $(SHLIB_SOLINK)
+	mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \
+	$(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
 # $(slibdir) double quoted to protect it from expansion while building
 # libgcc.mk.  We want this delayed until actual install time.
 SHLIB_INSTALL = \
 	$$(mkinstalldirs) $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
-	$(INSTALL_DATA) $(SHLIB_NAME) \
+	$(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_SONAME) \
 	  $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \
 	rm -f $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \
 	$(LN_S) $(SHLIB_SONAME) \
Index: config/t-slibgcc-sld
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/t-slibgcc-sld,v
retrieving revision 1.10
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.10 t-slibgcc-sld
--- config/t-slibgcc-sld	16 Dec 2004 19:14:27 -0000	1.10
+++ config/t-slibgcc-sld	13 Feb 2005 20:37:37 -0000
@@ -2,27 +2,28 @@
 
 SHLIB_EXT = .so
 SHLIB_SOLINK = @shlib_base_name@.so
-SHLIB_SONAME = @shlib_so_name@.so.1
-SHLIB_NAME = @shlib_base_name@.so.1
+SHLIB_SONAME = @shlib_base_name@.so.1
 SHLIB_MAP = @shlib_map_file@
 SHLIB_OBJS = @shlib_objs@
+SHLIB_DIR = @multilib_dir@
 SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
 
 SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
 	-Wl,-h,$(SHLIB_SONAME) -Wl,-z,text -Wl,-z,defs \
-	-Wl,-M,$(SHLIB_MAP) -o $(SHLIB_NAME).tmp \
+	-Wl,-M,$(SHLIB_MAP) -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp \
 	@multilib_flags@ $(SHLIB_OBJS) -lc && \
-	rm -f $(SHLIB_SOLINK) && \
-	if [ -f $(SHLIB_NAME) ]; then \
-	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
+	rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
+	if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \
+	  mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \
+		$(SHLIB_DIR)/$(SHLIB_SONAME).backup; \
 	else true; fi && \
-	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
-	$(LN_S) $(SHLIB_NAME) $(SHLIB_SOLINK)
+	mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \
+	$(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
 # $(slibdir) double quoted to protect it from expansion while building
 # libgcc.mk.  We want this delayed until actual install time.
 SHLIB_INSTALL = \
 	$$(mkinstalldirs) $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
-	$(INSTALL_DATA) $(SHLIB_NAME) \
+	$(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_SONAME) \
 	  $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \
 	rm -f $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \
 	$(LN_S) $(SHLIB_SONAME) \
Index: config/i386/t-nwld
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/t-nwld,v
retrieving revision 1.5
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.5 t-nwld
--- config/i386/t-nwld	22 Dec 2004 08:41:34 -0000	1.5
+++ config/i386/t-nwld	13 Feb 2005 20:37:37 -0000
@@ -29,7 +29,6 @@ s-crt0: $(srcdir)/unwind-dw2-fde.h
 # Build a shared libgcc library for NetWare.
 
 SHLIB_EXT = .nlm
-SHLIB_SONAME = @shlib_so_name@.nlm
 SHLIB_NAME = @shlib_base_name@.nlm
 SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
 SHLIB_DEF = $(srcdir)/config/i386/netware-libgcc.def
@@ -37,25 +36,25 @@ SHLIB_MAP = $(srcdir)/config/i386/netwar
 SHLIB_SRC = $(srcdir)/config/i386/netware-libgcc.c
 
 SHLIB_LINK = set -e; \
-	cat $(SHLIB_DEF) >@shlib_so_name@.def; \
-	echo "name $(SHLIB_NAME)" >>@shlib_so_name@.def; \
-	echo "version $(gcc_version)" | sed "s!\.!,!g" >>@shlib_so_name@.def; \
+	cat $(SHLIB_DEF) >@shlib_base_name@.def; \
+	echo "name $(SHLIB_NAME)" >>@shlib_base_name@.def; \
+	echo "version $(gcc_version)" | sed "s!\.!,!g" >>@shlib_base_name@.def; \
 	touch libgcc/build; \
-	echo "build $$$$(($$$$(<libgcc/build)+0))" >>@shlib_so_name@.def; \
-	echo "export @$(SHLIB_MAP)" >>@shlib_so_name@.def; \
-	if mpkxdc -n -p @shlib_so_name@.xdc; \
-		then echo "xdcdata @shlib_so_name@.xdc" >>@shlib_so_name@.def; \
+	echo "build $$$$(($$$$(<libgcc/build)+0))" >>@shlib_base_name@.def; \
+	echo "export @$(SHLIB_MAP)" >>@shlib_base_name@.def; \
+	if mpkxdc -n -p @shlib_base_name@.xdc; \
+		then echo "xdcdata @shlib_base_name@.xdc" >>@shlib_base_name@.def; \
 		else echo "WARNING: $(SHLIB_NAME) built without XDC data will not work well." 1>&2; \
 	fi; \
 	$(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -o $(SHLIB_NAME) \
 		$(SHLIB_SRC) -posix -static-libgcc -lnetware \
-		-Wl,--Map,--map-info,full,--strip-all,--def-file,@shlib_so_name@.def; \
-	rm -f @shlib_so_name@.imp; $(LN_S) $(SHLIB_MAP) @shlib_so_name@.imp; \
+		-Wl,--Map,--map-info,full,--strip-all,--def-file,@shlib_base_name@.def; \
+	rm -f @shlib_base_name@.imp; $(LN_S) $(SHLIB_MAP) @shlib_base_name@.imp; \
 	echo $$$$(($$$$(<libgcc/build)+1)) >libgcc/build
 
 # $(slibdir) double quoted to protect it from expansion while building
 # libgcc.mk.  We want this delayed until actual install time.
 SHLIB_INSTALL = \
 	$$(SHELL) $(srcdir)/mkinstalldirs $$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
-	$$(INSTALL_DATA) $(SHLIB_NAME) $$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \
-	$$(INSTALL_DATA) @shlib_so_name@.imp $$(DESTDIR)$$(libsubdir)/
+	$$(INSTALL_DATA) $(SHLIB_NAME) $$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_NAME); \
+	$$(INSTALL_DATA) @shlib_base_name@.imp $$(DESTDIR)$$(libsubdir)/
Index: config/ia64/t-hpux
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/ia64/t-hpux,v
retrieving revision 1.9
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.9 t-hpux
--- config/ia64/t-hpux	4 Sep 2004 00:15:41 -0000	1.9
+++ config/ia64/t-hpux	13 Feb 2005 20:37:37 -0000
@@ -32,14 +32,17 @@ SHLIB_EXT = .so
 # DT_NEEDED entry for libunwind.
 SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
 	-Wl,+h,@shlib_base_name@.so.0 \
-	-o @shlib_base_name@.so @multilib_flags@ @shlib_objs@ -lunwind -lc && \
-	rm -f @shlib_base_name@.so.0 && \
-	$(LN_S) @shlib_base_name@.so @shlib_base_name@.so.0
+	-o @multilib_dir@/@shlib_base_name@.so @multilib_flags@ \
+	@shlib_objs@ -lunwind -lc && \
+	rm -f @multilib_dir@/@shlib_base_name@.so.0 && \
+	$(LN_S) @shlib_base_name@.so @multilib_dir@/@shlib_base_name@.so.0
 # $(slibdir) double quoted to protect it from expansion while building
 # libgcc.mk.  We want this delayed until actual install time.
-SHLIB_INSTALL = $(INSTALL_DATA) @shlib_base_name@.so $$(DESTDIR)$$(slibdir)/@shlib_base_name@.so.0; \
-	rm -f $$(DESTDIR)$$(slibdir)/@shlib_base_name@.so; \
-	$(LN_S) @shlib_base_name@.so.0 $$(DESTDIR)$$(slibdir)/@shlib_base_name@.so; \
-	chmod +x $$(DESTDIR)$$(slibdir)/@shlib_base_name@.so
+SHLIB_INSTALL = $(INSTALL_DATA) @multilib_dir@/@shlib_base_name@.so \
+	$$(DESTDIR)$$(slibdir)@shlib_slibdir_qual@/@shlib_base_name@.so.0; \
+	rm -f $$(DESTDIR)$$(slibdir)@shlib_slibdir_qual@/@shlib_base_name@.so; \
+	$(LN_S) @shlib_base_name@.so.0 \
+	$$(DESTDIR)$$(slibdir)@shlib_slibdir_qual@/@shlib_base_name@.so; \
+	chmod +x $$(DESTDIR)$$(slibdir)@shlib_slibdir_qual@/@shlib_base_name@.so
 
 SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk
Index: config/mips/t-slibgcc-irix
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/mips/t-slibgcc-irix,v
retrieving revision 1.5
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.5 t-slibgcc-irix
--- config/mips/t-slibgcc-irix	8 Jan 2005 11:45:54 -0000	1.5
+++ config/mips/t-slibgcc-irix	13 Feb 2005 20:37:37 -0000
@@ -3,29 +3,29 @@
 SHLIB_EXT = .so
 SHLIB_SOLINK = @shlib_base_name@.so
 SHLIB_SOVERSION = 1
-SHLIB_SONAME = @shlib_so_name@.so.$(SHLIB_SOVERSION)
-SHLIB_NAME = @shlib_base_name@.so.$(SHLIB_SOVERSION)
+SHLIB_SONAME = @shlib_base_name@.so.$(SHLIB_SOVERSION)
 SHLIB_MAP = @shlib_map_file@
 SHLIB_OBJS = @shlib_objs@
+SHLIB_DIR = @multilib_dir@
 SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
 SHLIB_LC = -lc
 
 SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
 	-Wl,-soname,$(SHLIB_SONAME) \
-	-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) $(SHLIB_LC) && \
-	rm -f $(SHLIB_SOLINK) && \
-	if [ -f $(SHLIB_NAME) ]; then \
-	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
+	-o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \
+	$(SHLIB_OBJS) $(SHLIB_LC) && \
+	rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
+	if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \
+	  mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \
+		$(SHLIB_DIR)/$(SHLIB_SONAME).backup; \
 	else true; fi && \
-	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
-	$(LN_S) $(SHLIB_NAME) $(SHLIB_SOLINK) && \
-	{ test "@multilib_dir@" = "." || \
-	  $(INSTALL_DATA) $(SHLIB_NAME) @multilib_dir@/$(SHLIB_SONAME); }
+	mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \
+	$(LN_S) $(SHLIB_SONAME) $(SHLIB_DIR)/$(SHLIB_SOLINK)
 # $(slibdir) double quoted to protect it from expansion while building
 # libgcc.mk.  We want this delayed until actual install time.
 SHLIB_INSTALL = \
 	$$(mkinstalldirs) $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
-	$(INSTALL_DATA) $(SHLIB_NAME) \
+	$(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_SONAME) \
 	  $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \
 	rm -f $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \
 	$(LN_S) $(SHLIB_SONAME) \
Index: config/pa/t-hpux-shlib
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/pa/t-hpux-shlib,v
retrieving revision 1.4
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.4 t-hpux-shlib
--- config/pa/t-hpux-shlib	16 Dec 2004 19:14:29 -0000	1.4
+++ config/pa/t-hpux-shlib	13 Feb 2005 20:37:37 -0000
@@ -3,21 +3,25 @@ SHLIB_EXT = .sl
 SHLIB_NAME = @shlib_base_name@.sl
 SHLIB_SONAME = @shlib_base_name@.1
 SHLIB_OBJS = @shlib_objs@
+SHLIB_DIR = @multilib_dir@
+SHLIB_SLIBDIR_QUAL = @shlib_slibdir_qual@
 
 SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared  -nodefaultlibs \
-	-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) -lc && \
-        rm -f $(SHLIB_SONAME) && \
-	if [ -f $(SHLIB_NAME) ]; then \
-	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
+	-o $(SHLIB_DIR)/$(SHLIB_NAME).tmp @multilib_flags@ \
+	$(SHLIB_OBJS) -lc && \
+        rm -f $(SHLIB_DIR)/$(SHLIB_SONAME) && \
+	if [ -f $(SHLIB_DIR)/$(SHLIB_NAME) ]; then \
+	  mv -f $(SHLIB_DIR)/$(SHLIB_NAME) $(SHLIB_DIR)/$(SHLIB_NAME).backup; \
 	else true; fi && \
-	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
-        $(LN_S) $(SHLIB_NAME) $(SHLIB_SONAME)
+	mv $(SHLIB_DIR)/$(SHLIB_NAME).tmp $(SHLIB_DIR)/$(SHLIB_NAME) && \
+        $(LN_S) $(SHLIB_NAME) $(SHLIB_DIR)/$(SHLIB_SONAME)
 
 
 # $(slibdir) double quoted to protect it from expansion while building
 # libgcc.mk.  We want this delayed until actual install time.
-SHLIB_INSTALL = $(INSTALL_DATA) -m 555 $(SHLIB_NAME) \
-	$$(DESTDIR)$$(slibdir)/$(SHLIB_SONAME); \
-        rm -f $$(DESTDIR)$$(slibdir)/$(SHLIB_NAME); \
-        $(LN_S) $(SHLIB_SONAME) $$(DESTDIR)$$(slibdir)/$(SHLIB_NAME)
+SHLIB_INSTALL = $(INSTALL_DATA) -m 555 $(SHLIB_DIR)/$(SHLIB_NAME) \
+	$$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \
+        rm -f $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_NAME); \
+        $(LN_S) $(SHLIB_SONAME) \
+	$$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_NAME)
 
Index: config/rs6000/t-aix43
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/t-aix43,v
retrieving revision 1.22
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.22 t-aix43
--- config/rs6000/t-aix43	10 Jan 2005 15:10:05 -0000	1.22
+++ config/rs6000/t-aix43	13 Feb 2005 20:37:37 -0000
@@ -46,17 +46,20 @@ SHLIB_EXT = .a
 SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
 	-Wl,-bE:@shlib_map_file@ -o @multilib_dir@/shr.o \
 	@multilib_flags@ @shlib_objs@ -lc \
-	`case @shlib_base_name@ in \
+	`case @multilib_dir@ in \
 	*pthread*) echo -L/usr/lib/threads -lpthreads -lc_r /usr/lib/libc.a ;; \
 	*) echo -lc ;; esac` ; \
-	rm -f tmp-@shlib_base_name@.a ; \
-	$(AR_CREATE_FOR_TARGET) tmp-@shlib_base_name@.a @multilib_dir@/shr.o ; \
-	mv tmp-@shlib_base_name@.a @shlib_base_name@.a ; \
+	rm -f @multilib_dir@/tmp-@shlib_base_name@.a ; \
+	$(AR_CREATE_FOR_TARGET) @multilib_dir@/tmp-@shlib_base_name@.a \
+	@multilib_dir@/shr.o ; \
+	mv @multilib_dir@/tmp-@shlib_base_name@.a \
+	   @multilib_dir@/@shlib_base_name@.a ; \
 	rm -f @multilib_dir@/shr.o
 # $(slibdir) double quoted to protect it from expansion while building
 # libgcc.mk.  We want this delayed until actual install time.
-SHLIB_INSTALL = $(INSTALL_DATA) @shlib_base_name@.a $$(DESTDIR)$$(slibdir)/
-SHLIB_LIBS = -lc `case @shlib_base_name@ in *pthread*) echo -lpthread ;; esac`
+SHLIB_INSTALL = $(INSTALL_DATA) @multilib_dir@/@shlib_base_name@.a \
+		$$(DESTDIR)$$(slibdir)@shlib_slibdir_qual@/
+SHLIB_LIBS = -lc `case @multilib_dir@ in *pthread*) echo -lpthread ;; esac`
 SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk
 SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver
 SHLIB_NM_FLAGS = -Bpg -X32_64
Index: config/rs6000/t-aix52
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/rs6000/t-aix52,v
retrieving revision 1.5
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.5 t-aix52
--- config/rs6000/t-aix52	7 Dec 2004 18:44:31 -0000	1.5
+++ config/rs6000/t-aix52	13 Feb 2005 20:37:37 -0000
@@ -27,17 +27,20 @@ SHLIB_EXT = .a
 SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
 	-Wl,-bE:@shlib_map_file@ -o @multilib_dir@/shr.o \
 	@multilib_flags@ @shlib_objs@ -lc \
-	`case @shlib_base_name@ in \
+	`case @multilib_dir@ in \
 	*pthread*) echo -L/usr/lib/threads -lpthreads -lc_r /usr/lib/libc.a ;; \
 	*) echo -lc ;; esac` ; \
-	rm -f tmp-@shlib_base_name@.a ; \
-	$(AR_CREATE_FOR_TARGET) tmp-@shlib_base_name@.a @multilib_dir@/shr.o ; \
-	mv tmp-@shlib_base_name@.a @shlib_base_name@.a ; \
+	rm -f @multilib_dir@/tmp-@shlib_base_name@.a ; \
+	$(AR_CREATE_FOR_TARGET) @multilib_dir@/tmp-@shlib_base_name@.a \
+	@multilib_dir@/shr.o ; \
+	mv @multilib_dir@/tmp-@shlib_base_name@.a \
+	   @multilib_dir@/@shlib_base_name@.a ; \
 	rm -f @multilib_dir@/shr.o
 # $(slibdir) double quoted to protect it from expansion while building
 # libgcc.mk.  We want this delayed until actual install time.
-SHLIB_INSTALL = $(INSTALL_DATA) @shlib_base_name@.a $$(DESTDIR)$$(slibdir)/
-SHLIB_LIBS = -lc `case @shlib_base_name@ in *pthread*) echo -lpthread ;; esac`
+SHLIB_INSTALL = $(INSTALL_DATA) @multilib_dir@/@shlib_base_name@.a \
+		$$(DESTDIR)$$(slibdir)@shlib_slibdir_qual@/
+SHLIB_LIBS = -lc `case @multilib_dir@ in *pthread*) echo -lpthread ;; esac`
 SHLIB_MKMAP = $(srcdir)/mkmap-flat.awk
 SHLIB_MAPFILES = $(srcdir)/libgcc-std.ver
 SHLIB_NM_FLAGS = -Bpg -X32_64
Index: config/sh/t-linux
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sh/t-linux,v
retrieving revision 1.16
diff -u -p -F^\([(a-zA-Z0-9_]\|#define\) -r1.16 t-linux
--- config/sh/t-linux	16 Dec 2004 19:14:29 -0000	1.16
+++ config/sh/t-linux	13 Feb 2005 20:37:37 -0000
@@ -23,21 +23,23 @@ SHLIB_MAPFILES = \
 SHLIB_LINK = $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \
 	-Wl,--soname=$(SHLIB_SONAME) \
 	-Wl,--version-script=$(SHLIB_MAP) \
-	-o $(SHLIB_NAME).tmp @multilib_flags@ $(SHLIB_OBJS) $(SHLIB_LC) && \
-	rm -f $(SHLIB_SOLINK) && \
-	if [ -f $(SHLIB_NAME) ]; then \
-	  mv -f $(SHLIB_NAME) $(SHLIB_NAME).backup; \
+	-o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \
+	$(SHLIB_OBJS) $(SHLIB_LC) && \
+	rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \
+	if [ -f $(SHLIB_DIR)/$(SHLIB_SONAME) ]; then \
+	  mv -f $(SHLIB_DIR)/$(SHLIB_SONAME) \
+		$(SHLIB_DIR)/$(SHLIB_SONAME).backup; \
 	else true; fi && \
-	mv $(SHLIB_NAME).tmp $(SHLIB_NAME) && \
+	mv $(SHLIB_DIR)/$(SHLIB_SONAME).tmp $(SHLIB_DIR)/$(SHLIB_SONAME) && \
 	(echo "/* GNU ld script"; \
 	 echo "   Use the shared library, but some functions are only in"; \
 	 echo "   the static library.  */"; \
 	 echo "GROUP ( $(SHLIB_SONAME) libgcc.a )" \
-	) > $(SHLIB_SOLINK)
+	) > $(SHLIB_DIR)/$(SHLIB_SOLINK)
 SHLIB_INSTALL = \
 	$$(mkinstalldirs) $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL); \
-	$(INSTALL_DATA) $(SHLIB_NAME) \
+	$(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_SONAME) \
 	  $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SONAME); \
 	rm -f $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK); \
-	$(INSTALL_DATA) $(SHLIB_SOLINK) \
+	$(INSTALL_DATA) $(SHLIB_DIR)/$(SHLIB_SOLINK) \
 	  $$(DESTDIR)$$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]