libtool-patches
[Top][All Lists]
Advanced

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

Solaris / Studio 11 bug


From: Bob Friesenhahn
Subject: Solaris / Studio 11 bug
Date: Sun, 24 Jun 2007 16:31:55 -0500 (CDT)

Today I ran across a bug in the latest CVS libltdl on SPARC Solaris 9
and Sun's Studio 11 compiler.

The -ldl library is necessary order to use dlopen() on Solaris. When configured using GCC I see this in config.log:

configure:7428: gcc-4.2.0 -std=gnu99 -o conftest -O2 -g -Wall -Winline -W -Wformat-security -Wall -D_REENTRANT -pthreads -L/usr/local/lib -R/usr
/local/lib -L/usr/local/lib -R/usr/local/lib conftest.c -ldl   >&5
configure:7434: $? = 0
configure:7462: result: -ldl
configure:7610: checking for dlerror

But when using the Sun compiler I see this:

configure:7428: /opt/SUNWspro/bin/cc -o conftest -v -xcheck=%all -xarch=native -xcache=native -xO3 -D_REENTRANT -I/usr/local/include -L/usr/local/lib -R
/usr/local/lib conftest.c  >&5
cc: Warning: -xarch=native has been explicitly specified, or implicitly specified by a macro option, -xarch=native on this architecture implies -xarch=v8 plusb which generates code that does not run on pre UltraSPARC III processors
"conftest.c", line 26: warning: statement not reached
configure:7434: $? = 0
configure:7462: result: none required
configure:7610: checking for dlerror

Note that with the Sun compiler, -ldl is not listed so it is not actually tested for. The code seems to have already decided it is not needed.

The end result is that with GCC, the generated Makefile includes:

LIBADD_DL = -ldl
LIBADD_DLD_LINK =
LIBADD_DLOPEN = -ldl
LIBADD_SHL_LOAD =

but with Sun cc, the generated Makefile includes:

LIBADD_DL =
LIBADD_DLD_LINK =
LIBADD_DLOPEN =
LIBADD_SHL_LOAD =

and the end result fails to link.

The output of 'libtool --config' is attached.

Bob
======================================
Bob Friesenhahn
address@hidden, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

Attachment: libtool-config.txt
Description: Text document


reply via email to

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