bug-gnu-libiconv
[Top][All Lists]
Advanced

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

[bug-gnu-libiconv] libtool seems to ignore -EL


From: Pan ruochen
Subject: [bug-gnu-libiconv] libtool seems to ignore -EL
Date: Thu, 29 Jul 2010 16:34:48 +0800

Hi All,

I try cross-building libiconv 1-13.1.
My steps are as following:
$env CC=mips-linux-gnu-gcc CFLAGS='-EL -Os -mips32r2 -muclibc
-msoft-float' LDFLAGS='-msoft-float -muclibc -EL -mip
s32r2' ./configure prefix=/home/admin/libiconv --host=mipsel-linux
--build=i686-pc-linux
$make
...
/bin/sh ../libtool --mode=link mips-linux-gnu-gcc -EL -mips32r2 -EL
-O2 -mips32r2 -fvisibility=hidden -o libcharset.la -rpath
/usr/local/lib -version-info 1:0:0 -no-undefined localcharset.lo
relocatable.lo
libtool: link: mips-linux-gnu-gcc -shared  .libs/localcharset.o
.libs/relocatable.o    -mips32r2 -mips32r2   -Wl,-soname
-Wl,libcharset.so.1 -o .libs/libcharset.so.1.0.0
/opt/CodeSourcery/Sourcery_G++_Lite/bin/../lib/gcc/mips-linux-gnu/4.3.3/../../../../mips-linux-gnu/bin/ld:
.libs/localcharset.o: compiled for a little endian system and target
is big endian
/opt/CodeSourcery/Sourcery_G++_Lite/bin/../lib/gcc/mips-linux-gnu/4.3.3/../../../../mips-linux-gnu/bin/ld:
.libs/localcharset.o: endianness incompatible with that of the
selected emulation

>From the log messages, make has the correct linking options passed to
libtool but libtool seems to ignore some of them.
I take some time to trace the libtool script. The argument parsing
procedure for the option -EL
seems to escape here:
=======================================================
# Some other compiler flag.
      -* | +*)
        func_quote_for_eval "$arg"
    arg="$func_quote_for_eval_result"
    ;;
========================================================
and can't be accumulated to the varible `compiler_flags` which is
finally passed to the linker.

I patch the libtool script by the following command after they have
been created by configure.
===========================================================================================
$sed -i 's/\(-fprofile-\*|-F\*|@\*\))/\1|-EL)/' libcharset/libtool
preload/libtool libtool
===========================================================================================

And the I get libiconv built successfully.
It seems to be a bug of libtool, isn't it?

---
PRC



reply via email to

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