bug-libtool
[Top][All Lists]
Advanced

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

cross compiling: sys_lib_search_path_spec


From: Johannes Stezenbach
Subject: cross compiling: sys_lib_search_path_spec
Date: Tue, 3 Dec 2002 14:43:20 +0100
User-agent: Mutt/1.4i

Hi,

I'm using

  ltmain.sh (GNU libtool) 1.4.3 (1.922.2.111 2002/10/23 02:54:36)

on Debian unstable GNU/Linux.

When cross compiling, libtool must not search for libraries
in /usr/lib etc., since those libraries are not for the cross-target
(i.e. $host) architecture. If I have

  /usr/lib/libjpeg.a
  /usr/lib/libjpeg.la

and 

  /cross/lib/libjpeg.a (but no .la)

then libtool will try to link /usr/lib/libjpeg.a into my cross
compiled executable.

I suggest the following patch ($cross_compiling is set by AC_PROG_CC):

--- libtool.m4.orig     2002-12-03 13:38:27.000000000 +0100
+++ libtool.m4  2002-12-03 14:10:56.000000000 +0100
@@ -2355,6 +2355,10 @@
   dynamic_linker=no
   ;;
 esac
+if test "$cross_compiling" = "yes"; then
+  # the standard paths are for the build system only...
+  sys_lib_search_path_spec=
+fi
 AC_MSG_RESULT([$dynamic_linker])
 test "$dynamic_linker" = no && can_build_shared=no
 ##


It seems the topic is not new, similar bug reports have been
posted before:
http://mail.gnu.org/pipermail/bug-libtool/2001-October/002869.html
http://mail.gnu.org/pipermail/libtool/2002-March/006145.html


Regards,
Johannes




reply via email to

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