Re: static vs. dynamic linking

2005-09-27 Thread Enrico Weigelt
* Ralf Wildenhues [EMAIL PROTECTED] wrote:

Hi,

  how does libtool decide whether to link against an .la library 
  dynamically vs. statically ?
 
 For a program or a library?  Uninstalled or installed library
 (see recent bug report of Howard Chu)? 

Each of these cases ...

I've now figured out, that libs without rpath are linked statically.
It seems the chain starts at the Makefile.am file where some libs
are defined not to be installed. These libs don't get an --rpath
option, so the resulting .la file has no (or empty) libdir.
In the end these libs are linked statically.

Very mustic.

 On a system with both static and shared libraries, or just one of 
 them? When the user has configured --{enable,disable}-{static,shared} 
 or added -static or -all-static?

GNU/Linux, i686, GCC.

 For a normal dependency library or a
 module dependency, or maybe a convenience archive?

Your dozens of questions show an lack of clear definitions ...
Isn't there any document which describes what is done in these
situations (not the actual command line, but at least the actions) ?!

snip

  I'm currently working on my own implementation, since libtool 
  doesn't suit my needs (ie. sysroot'ed building), but I didn't
  find any clear specification for libtool's behaviour.
 
 We have better support for sysroot and/or DESTDIR on our TODO list.

Yes, its been there for quite a while. Todo-Lists dont help me, 
I have to get things working right now.

 Why don't you help us improve and fix libtool?  That is bound to be
 a lot less work.

I've tried. But I had to find out that it's not repairable in a
considerable time.

BTW: I dislike the concept of libtool at all (not the fact that 
we have an tool for building libs, but the way it works, ie. the
unclean command line options, the quite unspecified behaviour, etc).
This applies to the whole autotools stuff.

That's why I started my own toolchain abstraction, with an libtool 
compatible frontend.

You may have a look at it:

cvs://anonymous:[EMAIL PROTECTED]/unitool/

The idea bind is: you have a very minimalistic command set with 
an very simple syntax. No platform dependent stuff is visible here, 
neither what compiler you use. Evrythings hidden behind unitool.
No more annying and unreliable autodetection on every package. 
For each toolchain an unitool instance is configured *once*, 
maybe with the help of some autoconfiguration, and then it's just
passed to the individual package.


cu
-- 
-
 Enrico Weigelt==   metux IT service

  phone: +49 36207 519931 www:   http://www.metux.de/
  fax:   +49 36207 519932 email: [EMAIL PROTECTED]
  cellphone: +49 174 7066481
-
 -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops --
-


___
http://lists.gnu.org/mailman/listinfo/libtool


static vs. dynamic linking

2005-09-26 Thread Enrico Weigelt

Hi folks,


how does libtool decide whether to link against an .la library 
dynamically vs. statically ?

I'm currently working on my own implementation, since libtool 
doesn't suit my needs (ie. sysroot'ed building), but I didn't
find any clear specification for libtool's behaviour.


cu
-- 
-
 Enrico Weigelt==   metux IT service

  phone: +49 36207 519931 www:   http://www.metux.de/
  fax:   +49 36207 519932 email: [EMAIL PROTECTED]
  cellphone: +49 174 7066481
-
 -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops --
-


___
http://lists.gnu.org/mailman/listinfo/libtool


sysroot-support

2005-06-12 Thread Enrico Weigelt

Hi folks,


here's a quick-and-dirty patch against libtool.sh, which adds 
some sysroot support (look for .la files beyond $SYSROOT). 

Its not really a patch against libtool, instead a part of some
fixes in some other packages using libtool. But it should be 
enough to demonstration problem + solution.


cu
-- 
-
 Enrico Weigelt==   metux IT service

  phone: +49 36207 519931 www:   http://www.metux.de/
  fax:   +49 36207 519932 email: [EMAIL PROTECTED]
  cellphone: +49 174 7066481
-
 -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops --
-
diff -ruN libXft-2.1.7.orig/ltmain.sh libXft-2.1.7/ltmain.sh
--- libXft-2.1.7.orig/ltmain.sh Tue Mar  8 19:34:12 2005
+++ libXft-2.1.7/ltmain.sh  Fri Jun 10 20:36:51 2005
@@ -1772,6 +1772,7 @@
 # Find all interdependent deplibs by searching for libraries
 # that are linked more than once (e.g. -la -lb -la)
 for deplib in $deplibs; do
+  deplib=`echo $deplib | sed -e s~//~/~g; 
s~^/usr/lib/~$SYSROOT/usr/lib/~g;`
   if test X$duplicate_deps = Xyes ; then
case $libs  in
* $deplib *) specialdeplibs=$specialdeplibs $deplib ;;
@@ -1850,6 +1851,7 @@
deplibs=
   fi
   for deplib in $libs; do
+   deplib=`echo $deplib | sed -e s~//~/~g; 
s~^/usr/lib/~$SYSROOT/usr/lib/~g;`
lib=
found=no
case $deplib in
@@ -1898,6 +1900,7 @@
if test X$allow_libtool_libs_with_static_runtimes = Xyes ; then
  case  $predeps $postdeps  in
  * $deplib *)
+   echo foo1
if (${SED} -e '2q' $lib |
 grep ^# Generated by .*$PACKAGE) /dev/null 21; then
  library_names=
@@ -2078,6 +2081,7 @@
old_convenience=$old_convenience $ladir/$objdir/$old_library
tmp_libs=
for deplib in $dependency_libs; do
+ deplib=`echo $deplib | sed -e s~//~/~g; 
s~^/usr/lib/~$SYSROOT/usr/lib/~g;`
  deplibs=$deplib $deplibs
   if test X$duplicate_deps = Xyes ; then
case $tmp_libs  in
@@ -2201,6 +2205,7 @@
 
  tmp_libs=
  for deplib in $dependency_libs; do
+   deplib=`echo $deplib | sed -e s~//~/~g; 
s~^/usr/lib/~$SYSROOT/usr/lib/~g;`
case $deplib in
-L*) newlib_search_path=$newlib_search_path `$echo X$deplib | 
$Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
esac
@@ -2584,6 +2589,7 @@
  # ... and its dependency_libs
  tmp_libs=
  for deplib in $dependency_libs; do
+   deplib=`echo $deplib | sed -e s~//~/~g; 
s~^/usr/lib/~$SYSROOT/usr/lib/~g;`
newdependency_libs=$deplib $newdependency_libs
if test X$duplicate_deps = Xyes ; then
  case $tmp_libs  in
@@ -2596,6 +2602,7 @@
  if test $link_all_deplibs != no; then
# Add the search paths of all dependency libraries
for deplib in $dependency_libs; do
+ deplib=`echo $deplib | sed -e s~//~/~g; 
s~^/usr/lib/~$SYSROOT/usr/lib/~g;`
  case $deplib in
  -L*) path=$deplib ;;
  *.la)
@@ -2685,6 +2692,7 @@
   if test $pass = dlpreopen; then
# Link the dlpreopened libraries before other libraries
for deplib in $save_deplibs; do
+ deplib=`echo $deplib | sed -e s~//~/~g; 
s~^/usr/lib/~$SYSROOT/usr/lib/~g;`
  deplibs=$deplib $deplibs
done
   fi
@@ -2711,6 +2719,7 @@
  eval tmp_libs=\\$$var\
  new_libs=
  for deplib in $tmp_libs; do
+   deplib=`echo $deplib | sed -e s~//~/~g; 
s~^/usr/lib/~$SYSROOT/usr/lib/~g;`
# FIXME: Pedantically, this is the right thing to do, so
#that some nasty dependency loop isn't accidentally
#broken:
@@ -2749,6 +2758,7 @@
  done
  tmp_libs=
  for deplib in $new_libs; do
+   deplib=`echo $deplib | sed -e s~//~/~g; 
s~^/usr/lib/~$SYSROOT/usr/lib/~g;`
case $deplib in
-L*)
  case  $tmp_libs  in
@@ -5169,6 +5179,7 @@
# Replace all uninstalled libtool libraries with the installed ones
newdependency_libs=
for deplib in $dependency_libs; do
+ deplib=`echo $deplib | sed -e s~//~/~g; 
s~^/usr/lib/~$SYSROOT/usr/lib/~g;`
  case $deplib in
  *.la)
name=`$echo X$deplib | $Xsed -e 's%^.*/%%'`
diff -ruN libXft-2.1.7.orig/ltmain.sh libXft-2.1.7/ltmain.sh
--- libXft-2.1.7.orig/ltmain.sh Fri Jun 10 20:51:26 2005
+++ libXft-2.1.7/ltmain.sh  Fri Jun 10 20:51:14 2005
@@ -2037,7 +2037,7 @@
# Check to see that this really is a libtool archive.
if (${SED} -e '2q' $lib

spec-files ?

2001-06-20 Thread Enrico Weigelt


hi,

could anyone write an specfile for libtool ?

~-n

_
meTUX IT + Communication Services
 Enrico Weigelt 

 www:   www.metux.de
 email: [EMAIL PROTECTED]
 phone: +49 36207 51833
 cellphone: +49 174 7066481
_

___
Libtool mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/libtool