libtool-patches
[Top][All Lists]
Advanced

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

Re: Solaris whole_archive update


From: Ralf Wildenhues
Subject: Re: Solaris whole_archive update
Date: Sat, 23 Apr 2005 15:41:25 +0200
User-agent: Mutt/1.5.6+20040907i

Hi Ralf,

* Ralf Menzel wrote on Sat, Apr 23, 2005 at 03:15:43PM CEST:
> Ralf Wildenhues <address@hidden> writes:
> > * Ralf Wildenhues wrote on Fri, Apr 22, 2005 at 06:14:17PM CEST:
> >> 
> >> Could you please test this as well on your respective Solaris systems,
> >> so we don't get a bogus 1.5.16 release?  Thank you very much.
> >
> > Oh Brother.  This is the correct patch for branch-1-5, the other one was
> > bogus.
> 
> OK, I'm not sure what this patch is supposed to patch and how I should
> test this.

I posted a convenience test (so far for HEAD only) which exposed the
bug.  But see below.

> What I did is the following: I applied the patch to a
> recent branch-1-5 check out. After that I executed "../configure ;
> make ; make check" for the four different compilers that I have
> available. I could find no differences in output of "make check"
> between the patched and the unpatched versions.

This is sufficient for me.  :)

> The check results are (all on a Solaris 2.9 system):
> 
*snip known tagdemo failures*
> 
> cc: Sun C 5.6 Patch 117551-03 2004/11/23:
> ...
> PASS: tagdemo-conf.test
> FAIL: tagdemo-make.test
> SKIP: tagdemo-exec.test
> PASS: tagdemo-shared.test
> FAIL: tagdemo-make.test
> SKIP: tagdemo-exec.test
> FAIL: f77demo-static.test
> SKIP: f77demo-make.test
> SKIP: f77demo-exec.test
> FAIL: f77demo-conf.test
> SKIP: f77demo-make.test
> SKIP: f77demo-exec.test
> FAIL: f77demo-shared.test
> SKIP: f77demo-make.test
> SKIP: f77demo-exec.test

Ahh, I actually know how to fix the Fortran failures, I think:
AC_LIBTOOL_POSTDEP_PREDEP is missing from AC_LIBTOOL_LANG_F77_CONFIG.
What I don't know is whether this was done by accident or on purpose to
fix some breakage on other systems (have not checked the archives yet).
This patch should make them work (branch-1-5):

Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.85
diff -u -r1.314.2.85 libtool.m4
--- libtool.m4  23 Apr 2005 08:16:40 -0000      1.314.2.85
+++ libtool.m4  23 Apr 2005 13:34:19 -0000
@@ -3831,6 +3831,7 @@
 _LT_AC_TAGVAR(GCC, $1)="$G77"
 _LT_AC_TAGVAR(LD, $1)="$LD"
 
+AC_LIBTOOL_POSTDEP_PREDEP($1)
 AC_LIBTOOL_PROG_COMPILER_PIC($1)
 AC_LIBTOOL_PROG_CC_C_O($1)
 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)

> I will now do the same thing for a branch-2-0 check out.

That's great.  For now it would suffice if you tried the following
(additionally to making sure there are no regressions in the test
suite): for each $CC above, go to the build dir, and execute

mkdir conv && cd conv
LIBTOOL=../libtool
eval `$LIBTOOL --config | grep CC=`
# maybe set CFLAGS, LDFLAGS if necessary
echo 'int a(void) { return 1; }' > a.c
echo 'int b(void) { return 2; }' > b.c
echo 'int c(void) { return 3; }' > c.c
echo 'extern int a(void);
extern int b(void);
int main(void) { return a() + b() + c() != 6; }' > main.c
$LIBTOOL --mode=compile $CC $CFLAGS -c a.c
$LIBTOOL --mode=compile $CC $CFLAGS -c b.c
$LIBTOOL --mode=compile $CC $CFLAGS -c c.c
$LIBTOOL --mode=compile $CC $CFLAGS -c main.c
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o liba.la a.lo
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libb.la b.lo
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o libcee.la c.lo liba.la libb.la 
-rpath /notexist
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -static -o main_static main.lo 
libcee.la
$LIBTOOL --mode=link $CC $CFLAGS $LDFLAGS -o main main.lo libcee.la

The last two commands should compile and the binaries return 0.

Thanks a lot,
Ralf




reply via email to

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