<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi there,
<br>
I hope this is the right list.<br>
<br>
I have been trying to cross compile the LLVM 3.2 for our x86 target by using i586 cross compiler provided by Oselas toolchain (<a href="http://www.pengutronix.de/oselas/toolchain/index_de.html">http://www.pengutronix.de/oselas/toolchain/index_de.html</a>).
<br>
<br>
I have cross-compiled multitudes of 3rd party projects before and usually I can apply similar methods to compile the most of them.
<br>
I have however not been able to figure out exactly what is going on with this one.
<br>
<br>
My settings: <br>
<br>
----------------------------<br>
<br>
./configure --build=i686-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --libexecdir=${prefix}/lib/llvm --disable-maintainer-mode --disable-dependency-tracking
 --host=i586-unknown-linux-gnu --target=i586-unknown-linux-gnu --with-gcc-toolchain=/opt/pluto-targets/i386-rootfs//usr/bin --with-default-sysroot --with-gnu-ld=i586-unknown-linux-gnu-ld --with-gnu-as=i586-unknown-linux-gnu-as --with-gnu-ar=i586-unknown-linux-gnu-ar
 --disable-bootstrap -disable-optimized --disable-multilib --enable-checking --disable-shared --enable-languages=c,c++<br>
<br>
XPATH=/opt/pluto-targets/i386-rootfs/<br>
CROSS=i586-unknown-linux-gnu<br>
export LDFLAGS := --sysroot=$(XPATH) -L$(XPATH)/lib -L$(XPATH)/usr/lib -L$(XPATH)/usr/local/lib -L/lib -L/usr/lib<br>
export CFLAGS := --sysroot=$(XPATH) -I=/include -I=/usr/include -I=/usr/local/include<br>
export CPPFLAGS := $(CFLAGS)<br>
export CXXFLAGS := $(CFLAGS)<br>
#export LDFLAGS := -L$(XPATH)/lib -L$(XPATH)/usr/lib -L$(XPATH)/usr/local/lib<br>
#export CFLAGS := -I=$(XPATH)/include -I=$(XPATH)/usr/include -I=$(XPATH)/usr/local/include<br>
export CC := $(CROSS)-gcc<br>
export CXX := $(CROSS)-g++<br>
export LIBTOOL := $(CROSS)-libtool<br>
<br>
----------------------------<br>
<br>
I haven't manage to get passed the configure stage since on of the conftests keeps failing like:
<br>
<br>
----------------------------<br>
<br>
configure:4836: i686-linux-gnu-gcc -o conftest --sysroot=/opt/pluto-targets/i386-rootfs/ -I=/include -I=/usr/include -I=/usr/local/include --sysroot=/opt/pluto-targets/i386-rootfs/ -I=/include -I=/usr/include -I=/usr/local/include --sysroot=/opt/pluto-targets/i386-rootfs/
 -L/opt/pluto-targets/i386-rootfs//lib -L/opt/pluto-targets/i386-rootfs//usr/lib -L/opt/pluto-targets/i386-rootfs//usr/local/lib -L/lib -L/usr/lib conftest.c  1>&5<br>
/usr/bin/ld: cannot find /lib/libc.so.6 inside<br>
/usr/bin/ld: cannot find /usr/lib/libc_nonshared.a inside<br>
collect2: ld returned 1 exit status<br>
configure:4839: $? = 1<br>
configure:4848: error: installation or configuration problem: compiler cannot create executables.<br>
<br>
----------------------------<br>
<br>
I can clearly see that it is looking for libc in /lib but should be in /usr/lib and I haven't managed to control that.
<br>
<br>
<br>
I just wanted to send an email here before I start to hack it to much, hoping for some replies on this.
<br>
<br>
Kind regards<br>
Einar M. Bjorgvinsson<br>
Embedded Software Engineer<br>
Marel ehf<br>
Iceland<br>
<br>
</div>
</body>
</html>