[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: libtool is adding "-L/usr/lib" even for cross-compilation with sysro
From: |
Roumen Petrov |
Subject: |
Re: libtool is adding "-L/usr/lib" even for cross-compilation with sysroot |
Date: |
Tue, 15 Feb 2022 21:16:43 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0 SeaMonkey/2.53.7.1 |
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