[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 5-gary-solaris-no-undefined.patch
From: |
libtool-patches |
Subject: |
Re: 5-gary-solaris-no-undefined.patch |
Date: |
Sun, 9 Sep 2001 13:39:34 -0500 |
User-agent: |
Mutt/1.2.5i |
On Sun, Sep 09, 2001 at 12:41:48PM -0500, address@hidden wrote:
> My results:
> 1. GCC 2.95.3 without binutils on Solaris 8/SPARC fails (1.4.1)
> 2. GCC 3.0.1 without binutils on Solaris 8/SPARC succeeds (1.4.1)
>
> 3. GCC 2.95.3 with binutils on Solaris 2.6/SPARC succeeds (1.4.1)
>
> 4. GCC 2.95.3 without binutils on Solaris 8/SPARC succeeds (1.3.5)
>
> Because of #4, I say we reject the patch and find out why 1.3.5
> succeeded.
Further research:
(from gcc/libgcc2.c in GCC 2.95.3)
/* This is used by the `assert' macro. */
extern void __eprintf (const char *, const char *, unsigned int, const
char *)
__attribute__ ((__noreturn__));
(from gcc/libgcc2.c in GCC 3.0)
/* __eprintf used to be used by GCC's private version of <assert.h>.
We no longer provide that header, but this routine remains in libgcc.a
for binary backward compatibility. Note that it is not included in
the shared version of libgcc. */
I looked at libltdl/ltdl.c in 1.3.5 and it makes *no* calls to assert.
However, the libltdl/ltdl.c in 1.4.1 does. Remove the assert calls in
1.4.1 and we don't have problems :)
Even if an assert() is added to ltdl.c from 1.3.5, you'll never get an
error because "-z defs" is not used the build the shared library. I
inserted an assert() in 1.3.5 and had the same error as with 1.4.1.
So, it seems the "ugly hack" is needed only when GCC < 3.0 is used and
GCC has been compiled *without* binutils. Can you incorporate this
into your patch so the ugliness is localized?
BTW, have you tried using GCC to created the shared library? I did a
quick test with 2.95.3 for 1.4.1:
$ gcc -shared -Wl,-h,libltdl.so.3 -o .libs/libltdl.so.3.0.0 ltdl.lo -ldl -lc
$ nm .libs/libltdl.so.3.0.0 | grep eprintf
[242] | 27140| 72|FUNC |GLOB |0 |10 |__eprintf
If gcc creating the shared library works, I say use it instead of
Solaris ld (barring any problem).
--
albert chin (address@hidden)