bug-libtool
[Top][All Lists]
Advanced

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

bug#15276: libtool.mk incorrectly resolves lt_sysroot?


From: Hans Beckérus
Subject: bug#15276: libtool.mk incorrectly resolves lt_sysroot?
Date: Thu, 5 Sep 2013 14:33:20 +0200

Sorry for the typo in previous mail, libtool,mk should of course be
libtool.m4. Nothing else.

Thanks.
Hans


On Thu, Sep 5, 2013 at 2:19 PM, Hans Beckérus <address@hidden> wrote:
> I am having problem running a SDK cross-compilation toolchain built
> through Yocto.
> After some digging I discovered that the root cause of the problem is
> the fact that the sysroot is incorrectly resolved if --with-sysroot is
> not specified when running configure. Actually in Yocto --with-sysroot
> is replaced by -with-libtool-sysroot but that is irrelevant in this
> case. I believe the error is in libtool.mk. Specifically the following
> piece of code:
>
> # _LT_WITH_SYSROOT
> # ----------------
> AC_DEFUN([_LT_WITH_SYSROOT],
> [AC_MSG_CHECKING([for sysroot])
> AC_ARG_WITH([sysroot],
> [  --with-sysroot[=DIR] Search for dependent libraries within DIR
>                         (or the compiler's sysroot if not specified).],
> [], [with_sysroot=no])
>
> dnl lt_sysroot will always be passed unquoted.  We quote it here
> dnl in case the user passed a directory name.
> lt_sysroot=
> case ${with_sysroot} in #(
>  yes)
>    if test "$GCC" = yes; then
>      lt_sysroot=`$CC --print-sysroot 2>/dev/null`
>    fi
>    ;; #(
>  /*)
>    lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
>    ;; #(
>  no|'')
>    ;; #(
>  *)
>    AC_MSG_RESULT([${with_sysroot}])
>    AC_MSG_ERROR([The sysroot must be an absolute path.])
>    ;;
> esac
>
> If --with-sysroot is *not* set it should be picked-up from the
> compiler. But the switch statement above is wrong since the yes) and
> no) cases are swapped.
>
> Here is my configuration:
>
>         host-triplet: arm-poky-linux-gnueabi
>         shell: /bin/sh
>         compiler: arm-poky-linux-gnueabi-gcc  -march=armv7-a
> -mthumb-interwork -mfloat-abi=softfp -mtune=cortex-a9
> --sysroot=/proj/nci_up/cpri_splitter/poky-chris/1.4+snapshot/sysroots/cortexa9-vfp-poky-linux-gnueabi
>         compiler flags: -O2 -pipe -g -feliminate-unused-debug-types
>         linker: arm-poky-linux-gnueabi-ld
> --sysroot=/proj/nci_up/cpri_splitter/poky-chris/1.4+snapshot/sysroots/cortexa9-vfp-poky-linux-gnueabi
> (gnu? yes)
>         arm-poky-linux-gnueabi-libtool: (GNU libtool) 2.4.2
>         automake: automake (GNU automake) 1.12.6
>         autoconf: autoconf (GNU Autoconf) 2.69
>
> Thanks.
> Hans





reply via email to

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