I'm trying to build a native hosted mips compiler on ubuntu x86. When I run configure with clang/llvm as the compiler, configure thinks that zlib is present and that valgrind is. But later on the make it cannot find zlib.h. If I tell it to not do compression, then it does not look for zlib.h but dies looking for valgrind, even if I tell it to disable-valgrind. If I configure using gcc-mips, it decides on it's own that zlib.h is not available. It also decides that valgrind is not available. Why the difference? Any ideas? Reed
On Mon, Feb 24, 2014 at 4:14 PM, reed kotler <rkotler at mips.com> wrote:> I'm trying to build a native hosted mips compiler on ubuntu x86. > > When I run configure with clang/llvm as the compiler, configure thinks that > zlib is present and that valgrind is. > > But later on the make it cannot find zlib.h. If I tell it to not do > compression, then it does not look for > zlib.h but dies looking for valgrind, even if I tell it to disable-valgrind. > > If I configure using gcc-mips, it decides on it's own that zlib.h is not > available. > It also decides that valgrind is not available. > > Why the difference? >How are you configuring? -eric> Any ideas? > > Reed > > > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
On 02/24/2014 04:19 PM, Eric Christopher wrote:> On Mon, Feb 24, 2014 at 4:14 PM, reed kotler <rkotler at mips.com> wrote: >> I'm trying to build a native hosted mips compiler on ubuntu x86. >> >> When I run configure with clang/llvm as the compiler, configure thinks that >> zlib is present and that valgrind is. >> >> But later on the make it cannot find zlib.h. If I tell it to not do >> compression, then it does not look for >> zlib.h but dies looking for valgrind, even if I tell it to disable-valgrind. >> >> If I configure using gcc-mips, it decides on it's own that zlib.h is not >> available. >> It also decides that valgrind is not available. >> >> Why the difference? >> > How are you configuring? > > -eric >(You can see our wiki page https://dmz-portal.mips.com/wiki/Build_mips_clang_llvm ) Basically: $ OPT="-target mipsel-linux-gnu -mips32r2 -gcc-toolchain ${MIPS}" $ $CLANG_SRC/configure \ --prefix=$CLANG_INSTALL \ --build=i686-pc-linux-gnu \ --host=mipsel-linux-gnu \ --enable-optimized \ # turn on optimization "--with-extra-options=${OPT}" \ "--with-extra-ld-options=${OPT}" \ CC=$CLANG_TC/bin/clang \ CXX=$CLANG_TC/bin/clang++ \ RANLIB=$MIPS/bin/mips-linux-gnu-ranlib \ AR=$MIPS/bin/mips-linux-gnu-ar \ build_alias=i686-unknown-linux-gnu host_alias=mipsel-linux-gnu>> Any ideas? >> >> Reed >> >> >> >> >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140224/897b4eaa/attachment.html>
On 25 Feb 2014, at 00:14, reed kotler <rkotler at mips.com> wrote:> I'm trying to build a native hosted mips compiler on ubuntu x86. > > When I run configure with clang/llvm as the compiler, configure thinks that zlib is present and that valgrind is. > > But later on the make it cannot find zlib.h. If I tell it to not do compression, then it does not look for > zlib.h but dies looking for valgrind, even if I tell it to disable-valgrind. > > If I configure using gcc-mips, it decides on it's own that zlib.h is not available. > It also decides that valgrind is not available.Most likely, your gcc-mips hard codes a non-/ default sysroot, but your clang does not (it is, after all, intrinsically a cross compiler). I've successfully cross-compiled clang+llvm for MIPS before by providing a CMake toolchain file that tells it the target triple and systroot to use (along with the other flags required for my target) and it Just Works™. Or, at least, it builds. It crashes at run time, and I've still not managed to figure out exactly why. It looks like a register value that should be preserved is not somewhere, but I have a 2GB trace that I need to look through to find out exactly where... David