libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Solaris C++ Repository Patch


From: Steve Favor
Subject: Solaris C++ Repository Patch
Date: Fri, 05 Jan 2001 11:16:11 -0600

The following patch makes Solaris CC template repositories work with
libtool.
Index: ChangeLog
===================================================================
RCS file: /home/cvsroot/libtool/ChangeLog,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -r1.1.1.1 -r1.2
*** ChangeLog   2001/01/04 23:04:03     1.1.1.1
--- ChangeLog   2001/01/05 17:11:22     1.2
***************
*** 1,3 ****
--- 1,30 ----
+ 2001-01-05  Stephen Favor  <address@hidden>
+ 
+       * ltconfig.in (old_archive_cmds): Pulled hard-coded ar flags into
+       a variable named ARFLAGS.
+ 
+       (tempate_db_flags): holds additional flags the compiler and linker
+       need to locate template repositories.  The value for Solaris is
+       -ptrPIC.
+ 
+       (pic_flag): Tack tempate_db_flags onto the end of this.  For
+       Solaris, this makes the PIC flags look like -KPIC -ptrPIC.
+ 
+       (archive_cmds): For Solaris using the CC compiler, use CC as $LD
+       and $AR and change $ARFLAGS to the CC archive options "-xar".
+       Also, tack "-o" onto the end of $ARFLAGS.  This assumes the
+       library name is always directly after $ARFLAGS which appears to
+       always be the case. This causes the old library link to look like
+       CC -xar -o libfoo.a...
+ 
+       Insert $template_db_flag so that the correct template repository
+       is used.  This causes the shared library link to look like CC
+       -ptrPIC -G -o libfoo.a...
+ 
+ 2001-01-05  Stephen Favor  <address@hidden>
+ 
+       * libtool.m4: 
+ 
  2000-05-27  Gary V. Vaughan  <address@hidden>
  
        GNU libtool 1.3.5 was released.
***************
*** 1283,1286 ****
  
  Continued in ChangeLog.0
  
!       $Revision: 1.1.1.1 $ $Date: 2001/01/04 23:04:03 $
--- 1310,1313 ----
  
  Continued in ChangeLog.0
  
!       $Revision: 1.2 $ $Date: 2001/01/05 17:11:22 $
Index: ltconfig.in
===================================================================
RCS file: /home/cvsroot/libtool/ltconfig.in,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -c -r1.1.1.1 -r1.2
*** ltconfig.in 2001/01/04 23:04:34     1.1.1.1
--- ltconfig.in 2001/01/05 16:52:45     1.2
***************
*** 470,476 ****
  esac
  
  # Determine commands to create old-style static archives.
! old_archive_cmds='$AR cru $oldlib$oldobjs'
  old_postinstall_cmds='chmod 644 $oldlib'
  old_postuninstall_cmds=
  
--- 470,477 ----
  esac
  
  # Determine commands to create old-style static archives.
! old_archive_cmds='$AR $ARFLAGS $oldlib$oldobjs'
! ARFLAGS="cru"
  old_postinstall_cmds='chmod 644 $oldlib'
  old_postuninstall_cmds=
  
***************
*** 731,737 ****
      ;;
  
    solaris*)
!     pic_flag='-KPIC'
      link_static_flag='-Bstatic'
      wl='-Wl,'
      ;;
--- 732,741 ----
      ;;
  
    solaris*)
!     if [ "$CC" = "CC" ]; then
!       template_db_flag=" -ptrPIC"
!     fi
!     pic_flag="-KPIC${template_db_flag}"
      link_static_flag='-Bstatic'
      wl='-Wl,'
      ;;
***************
*** 1457,1463 ****
      no_undefined_flag=' -z text'
      # $CC -shared without GNU ld will not create a library from C++
      # object files and a static libstdc++, better avoid it by now
!     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs 
$deplibs $linkopts'
      archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | 
sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib 
$libobjs $deplibs $linkopts~$rm $lib.exp'
      hardcode_libdir_flag_spec='-R$libdir'
--- 1461,1472 ----
      no_undefined_flag=' -z text'
      # $CC -shared without GNU ld will not create a library from C++
      # object files and a static libstdc++, better avoid it by now
!     if [ "$CC" = "CC" ]; then
!       LD="$CC"
!       AR="$CC"
!       ARFLAGS="-xar -o"
!     fi
!     archive_cmds='$LD${template_db_flag} -G${allow_undefined_flag} -h $soname 
-o $lib $libobjs $deplibs $linkopts'
      archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | 
sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
                $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib 
$libobjs $deplibs $linkopts~$rm $lib.exp'
      hardcode_libdir_flag_spec='-R$libdir'
***************
*** 2831,2836 ****
--- 2840,2846 ----
  
  # The archiver.
  AR=$AR
+ ARFLAGS="$ARFLAGS"
  
  # The default C compiler.
  CC=$CC
***************
*** 2874,2879 ****
--- 2884,2890 ----
  
  # Additional compiler flags for building library objects.
  pic_flag=$pic_flag
+ template_db_flag="$template_db_flag"
  
  # Does compiler simultaneously support -c and -o options?
  compiler_c_o=$compiler_c_o

reply via email to

[Prev in Thread] Current Thread [Next in Thread]