Subject: new libtool handling of "-release" breaks cross packages (was Re: cross pkgs)
To: None <tech-pkg@netbsd.org>
From: Chuck Cranor <chuck@xxx.research.att.com>
List: tech-pkg
Date: 03/07/2001 20:12:35
In article <20010307174946.D2107231@chips.research.att.com>,
Chuck Cranor <chuck@research.att.com> wrote:
>i just CVS'd my pkgsrc to -current in hopes of building cross compiler
>tools, but...
>xxxcdc> make
>===> Building for bfd-crunchide-1.0
>cc -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -o crunchide crunchide.o -L/usr/xbsd/lib -Wl,-R/usr/xbsd/lib -lbfd-2.9.1 -liberty
>/usr/bin/ld: cannot open -lbfd-2.9.1: No such file or directory
>collect2: ld returned 1 exit status
>*** Error code 1
>the old binutils package would install $CROSSBASE/lib as:
>xbsd[8]> ls $CROSSBASE/lib/libbfd*
>/usr/xbsd/lib/libbfd-2.9.1.so /usr/xbsd/lib/libbfd-2.9.1.so.0.0
>/usr/xbsd/lib/libbfd-2.9.1.so.0 /usr/xbsd/lib/libbfd.a
>but the binutils i just built on my new system installs them as:
>xxxcdc> ls $CROSSBASE/lib/libbfd*
>/usr/xbsd/lib/libbfd.a /usr/xbsd/lib/libbfd.so.0
>/usr/xbsd/lib/libbfd.la /usr/xbsd/lib/libbfd.so.0.0
>/usr/xbsd/lib/libbfd.so
ok, this is due to changes made to the libtool package which the
cross stuff uses. observe:
old libtool (pkglibtool-1.2p2):
xbsd[34]> cat DOIT
#!/bin/sh -x
#lt=libtool
lt=pkglibtool-ELF-1.2p2
$lt --mode=compile cc -O2 -c ok.c
$lt --mode=link cc -O2 -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -o libok.la -rpath /usr/xbsd/lib -release 2.9.1 ok.lo
xbsd[35]> ./DOIT
+ lt=pkglibtool-ELF-1.2p2
+ pkglibtool-ELF-1.2p2 --mode=compile cc -O2 -c ok.c
cc -O2 -c -fPIC -DPIC ok.c
mv -f ok.o ok.lo
cc -O2 -c ok.c >/dev/null 2>&1
+ pkglibtool-ELF-1.2p2 --mode=link cc -O2 -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -o libok.la -rpath /usr/xbsd/lib -release 2.9.1 ok.lo
mkdir .libs
cc -shared -Wl,-soname -Wl,libok-2.9.1.so.0 -o .libs/libok-2.9.1.so.0.0 ok.lo
(cd .libs && ln -s libok-2.9.1.so.0.0 libok-2.9.1.so.0)
(cd .libs && ln -s libok-2.9.1.so.0.0 libok-2.9.1.so)
ar cru .libs/libok.a ok.o
ranlib .libs/libok.a
creating libok.la
(cd .libs && ln -s ../libok.la libok.la)
xbsd[36]>
new libtool (libtool-1.4.20010219nb2):
xxxcdc> ./DOIT
+ lt=libtool
+ libtool --mode=compile cc -O2 -c ok.c
mkdir .libs
cc -O2 -c ok.c -fPIC -DPIC -o .libs/ok.o
cc -O2 -c ok.c -o ok.o >/dev/null 2>&1
+ libtool --mode=link cc -O2 -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/li
b -L/usr/pkg/lib -o libok.la -rpath /usr/xbsd/lib -release 2.9.1 ok.lo
cc -shared .libs/ok.o -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -Wl,-R/usr/pkg/lib -W
l,-soname -Wl,libok.so.0 -o .libs/libok.so.0.0
(cd .libs && rm -f libok.so.0 && ln -s libok.so.0.0 libok.so.0)
(cd .libs && rm -f libok.so && ln -s libok.so.0.0 libok.so)
(cd .libs && rm -f libok.so && ln -s libok.so.0.0 libok.so)
ar cru .libs/libok.a ok.o
ranlib .libs/libok.a
creating libok.la
(cd .libs && rm -f libok.la && ln -s ../libok.la libok.la)
xxxcdc>
does new libtool ignore the "-release 2.9.1" flag?
chuck