[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MinGW/Cygwin wrapper bug
From: |
Peter Rosin |
Subject: |
Re: MinGW/Cygwin wrapper bug |
Date: |
Wed, 5 Dec 2007 00:05:39 +0100 |
User-agent: |
Mutt/1.5.12-2006-07-14 |
On Tue, Dec 04, 2007 at 10:18:33PM +0100, Ralf Wildenhues wrote:
> * Bob Friesenhahn wrote on Tue, Dec 04, 2007 at 10:09:25PM CET:
> >
> > I am not sure how to wrap it up in a test. The problem is not an
> > obscure error since it is always present. I am surprised that I am
> > the only one who has reported the problem.
>
> OK so here's a try of mine. Can you confirm that this exposes the bug,
> i.e., the last line prints 1 instead of 0?
>
> Or is it rather that you have a problem at link time? Then the last
> mode=link should fail iff, on the line marked XXX, `int a' is replaced
> with `int b'.
>
> Which of the two suspected setups is the failing one?
FWIW, I could not reproduce with a fairly recent cvs-libtool, but
did some extra work to try to force the issue (build m in some other
dir). I tried both cygwin and MinGW. I Also added the dreaded
-no-undefined...
Cheers,
Peter
: ${PATH_SEPARATOR=:}
: ${LIBTOOL=libtool}
: ${CC=gcc}
instdir=`pwd`/inst
libdir=$instdir/lib
bindir=$instdir/bin
mkdir -p $instdir $libdir $bindir
echo 'int a () { return 1; }' > a.c # XXX
$LIBTOOL --mode=compile $CC -c a.c
$LIBTOOL --mode=link $CC -o liba.la -rpath $libdir -no-undefined a.lo
$LIBTOOL --mode=install cp liba.la $libdir/liba.la
echo 'int a () { return 0; }' > a.c
$LIBTOOL --mode=compile $CC -c a.c
$LIBTOOL --mode=link $CC -o liba.la -rpath $libdir -no-undefined a.lo
maindir=`pwd`/main
mkdir -p $maindir
echo 'extern int a (); int main () { return a (); }' > $maindir/m.c
$CC -c $maindir/m.c -o $maindir/m.o
PATH=$bindir$PATH_SEPARATOR$PATH
$LIBTOOL --mode=link $CC -o $maindir/m $maindir/m.o liba.la
$maindir/m; echo $?