old solaris problem

2011-02-17 Thread Thien-Thi Nguyen
In the GNU Serveez configure.ac, i see:

  dnl
  dnl Check if libtool copes with SunOS/Solaris.  GNU libtool 1.4.2 and less
  dnl fail to create self-contained shared libraries.  This is due to the gcc
  dnl - native linker combination.  The below macro adds the -liberty path
  dnl and -lgcc to the linker line if necessary.
  dnl
  SVZ_LIBTOOL_SOLARIS

(full macro source below).  I don't know how to evaluate the relevance
of this comment given the (much newer) Libtool 2.4 i use locally and am
considering imposing as the prereq in configure.ac.  IOW, if i specify:

  LT_PREREQ([2.4])

would it be safe to remove this check/workaround?  I would appreciate any
pointers on discussion or documentation regarding this, or (even better) a
simple "yeah, no sweat, libtool 2.4 DTRT" from someone more knowledgable.
FWIW, the current libtool prereq is 1.9b (first release to have ‘LT_INIT’).

Following is the macro definition.  Thanks for reading this.

  AC_DEFUN([SVZ_LIBTOOL_SOLARIS],[
  AS_IF([SVZ_Y([GCC]) && SVZ_Y([enable_shared])],
   [AS_CASE([$host_os],[solaris*],[
LIBERTY=`gcc --print-file-name=libiberty.a`
LIBERTY="-L`dirname $LIBERTY 2>/dev/null`"
SERVEEZ_LDFLAGS="$SERVEEZ_LDFLAGS $LIBERTY"
GCCLIB=`gcc --print-libgcc-file-name`
GCCDIR="-L`dirname $GCCLIB 2>/dev/null`"
GCCFILE=`basename $GCCLIB 2>/dev/null`
GCCFILE="-l`echo "$GCCFILE" | sed -e 's/lib\(.*\)\.a/\1/'`"
SERVEEZ_LDFLAGS="$SERVEEZ_LDFLAGS $GCCDIR"
SERVEEZ_LIBS="$SERVEEZ_LIBS $GCCFILE"
AC_MSG_WARN([
The configure script added
'$LIBERTY $GCCDIR $GCCFILE'
to your linker line.  This may not be what you want.  Please report
to  if we failed to build shared libraries
for '$host_os'.])
AS_UNSET([LIBERTY])
AS_UNSET([GCCLIB])
AS_UNSET([GCCDIR])
AS_UNSET([GCCFILE])])])
  ])

___
http://lists.gnu.org/mailman/listinfo/libtool


Re: old solaris problem

2011-02-17 Thread Bob Friesenhahn

On Thu, 17 Feb 2011, Thien-Thi Nguyen wrote:


In the GNU Serveez configure.ac, i see:

 dnl
 dnl Check if libtool copes with SunOS/Solaris.  GNU libtool 1.4.2 and less
 dnl fail to create self-contained shared libraries.  This is due to the gcc
 dnl - native linker combination.  The below macro adds the -liberty path
 dnl and -lgcc to the linker line if necessary.
 dnl
 SVZ_LIBTOOL_SOLARIS


I recommend eliminating use of this macro.  Whatever purpose it was 
intending to solve surely no longer exists.


I use Solaris for development and have never needed anything similar 
to what this macro is doing.  It seems likely that the developer of 
the macro was solving some issue with his own compiler installation.


Libtool 1.4.2 was released in 2002.  That is eons in libtool time.

Bob
--
Bob Friesenhahn
bfrie...@simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,http://www.GraphicsMagick.org/

___
http://lists.gnu.org/mailman/listinfo/libtool


Re: old solaris problem

2011-02-17 Thread Thien-Thi Nguyen
() Bob Friesenhahn 
() Thu, 17 Feb 2011 09:02:38 -0600 (CST)

   I recommend eliminating use of this macro.  Whatever purpose it
   was intending to solve surely no longer exists.

   I use Solaris for development and have never needed anything
   similar to what this macro is doing.  It seems likely that the
   developer of the macro was solving some issue with his own
   compiler installation.

   Libtool 1.4.2 was released in 2002.  That is eons in libtool time.

Thanks for the quick response.  I will remorselessly remove this
macro and set the prereq for Libtool 2.4.

___
http://lists.gnu.org/mailman/listinfo/libtool