Re: libtool is adding "-L/usr/lib" even for cross-compilation with sysroot

Roumen Petrov <[email protected]>
Newsgroups gmane.comp.gnu.libtool.general
Message-ID <[email protected]>
Hi,

Xi Ruoyao wrote:
> Hi libtool dev,
>
> We've recently hit an issue cross-compiling some package using libtool
> for sysroot.  Saying libfoo.la contains
So there is a number of models . One to use system libtool and another one libtool script builds for project.
First is not for cross-compilation.

Second one should learn some thing related to build system .

> libdir=/usr/lib
>
> Then libtool will add "-L/usr/lib" to the linker command line during a
> "relink" against libfoo.la, because ltmain.in:6500:
>
> [SNIP]

For instance my script hat builds packages for Android has:
...
CC="$CC --sysroot=$ANDROID_SYSROOT"
...
CONFIG_SITE=$TMPDIR/config.site-$FULLNAME-$PLATFORM
       cat > $CONFIG_SITE <<EOF
# for autoconf AC_FUNC_{MALLOC&REALLOC}
ac_cv_func_malloc_0_nonnull=yes
ac_cv_func_realloc_0_nonnull=yes

# for libtool
lt_cv_sys_lib_dlsearch_path_spec="$ANDROID_SYSROOT/lib ...."
EOF

       export CC CONFIG_SITE
...


Try to adjust lt_cv_sys_lib_dlsearch_path_spec .


Regards,
Roumen Petrov
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.