libtool
[Top][All Lists]
Advanced

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

Re: Exceptions in shared lib with icc on Linux


From: Martin Frydl
Subject: Re: Exceptions in shared lib with icc on Linux
Date: Wed, 08 Jan 2003 13:48:08 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020827

I've looked into it and found two places which almost always rewrite archive_cmds_need_lc to yes. Both are in libtool.m4.

Line 3412:
case " $_LT_AC_TAGVAR(postdeps, $1) " in
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes ;;
esac

Since postdeps for icc does not contain -lc, archive_cmds_need_lc is set to yes. I haven't looked how postdeps are determined but this looks like -lc is always used - either it is in postdeps or added later due to archive_cmds_need_lc=yes.

Line 5402:
Here archive_cmds_need_lc is always set to yes and only if used compiler is gcc, it may be reset to no.

I don't know why the two places above don't honour previous value of archive_cmds_need_lc. I've commented out both lines setting yes and built was successful (I've also modified line 2937 - removed -nostdlib). The built with gcc and Sun's CC was also successful, but this is definitelly not a correct solution.

Martin

Robert Boehne wrote:
Albert,

I think it may be that an Autoconf macro is re-setting this
later on.  I seem to get "archive_cmds_need_lc=yes" in nearly
every case I look at.

Robert


Albert Chin wrote:

On Mon, Jan 06, 2003 at 05:29:04PM +0100, Martin Frydl wrote:

 I've found problem when throwing exception from shared library when
compiled with icc on Linux. I've attached a test case. The source of
this problem is probably linking against c library. Libtool uses this
command line:

icpc -shared -nostdlib .libs/sub1.o -lc -Qoption,ld,-soname \
 -Qoption,ld,libshr.so.0 -o .libs/libshr.so.0.0.0

Odd that -lc got in there. From libtool.m4 in CVS:
     icpc)
       # Intel C++
       with_gnu_ld=yes
       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no

I presume archive_cmds_need_lc=no means that -lc should not be added.
Anyone know more?

--
albert chin (address@hidden)

_______________________________________________
Libtool mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/libtool



_______________________________________________
Libtool mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/libtool





reply via email to

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