This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See crosstool-NG for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Fri, Nov 9, 2012 at 1:00 AM, Bryan Hundven <bryanhundven@gmail.com> wrote: > > > > On Fri, Nov 9, 2012 at 12:29 AM, 白い熊 <ShiroiKuma@shiroikuma.org> wrote: >> >> Hello everyone: >> >> I'd like to ask a question about the concrete steps in cross compiling >> a native gcc for arm, after I have setup a crosstool-NG toolchain, >> and confirmed it works. I'm inexperienced with crosscompiling, and >> havu searched, scoured cblfs manuals etc, but the exact details of >> compiling the native gcc binary is still not clear to me. Therefore >> I'd really appreciate guidance from experienced users. >> >> I want to build a native gcc for arm, to run on Android, as I've built >> glibc for it and want to build GNU utils linked against glibc, not the >> Ondroid libc, so want to compile natively on the Android phone. >> >> I've built the crosscompiling toolchain with crosstools-ng. >> >> I've cross compiled glibc, fine. >> >> Have built a couple native arm (arm-exynos-linux-gnueabi) utils, like >> tar etc. and confirmed they work on the Android phone, when symlinking >> the built x-tools sysroot's lib directory to /lib on the android >> machine. >> >> Now I need to build the native gcc, so I can develop on the machine. >> I'm having some philosophical problems with crosscompiling, as I'm >> relatively inexperienced in it. >> >> I'd therefore like to ask how to proceed in steps exactly, as I've >> already spent two days with a trial-by-error approach, and so far no >> luck. >> >> So: gcc depends on mpc, which depends on mpfr, which depends on gmp. >> >> So, how do I proceed? >> >> Which architecture deps do I build, with which host target and build >> options? >> >> - make a tools dir and build these deps there, so as not to mess >> with the functioning toolchain? >> - gmp (no host, build, target?) >> - mpfr (same?) >> - mpc (same?) >> >> - then gcc, how? --host=arm-exynos-linux-gnueabi >> --build=i686-build_pc-linux-gnu --target=arm-exynos-linux-gnueabi ? >> >> Is this right, or am I messing up in some of the above steps? >> > > You should be able to build this type of cross-compiler with crosstool-ng > as well: > > build=i386, host=arm, target=arm > > As long as you remember that you are building on i386 (or x86_64 if you > are on x86_64), the toolchain will run on arm (host), and produce binaries > for arm (target), just read the documentation under the docs directory: > http://crosstool-ng.org/hg/crosstool-ng/file/340bad0ab841/docs > and follow the directions. > >> >> Incidentally, I've followed this guide >> http://forum.xda-developers.com/showthread.php?t=1299962 to build the >> crosstool-ng toolchain, and it recommends compiling the native apps >> just with --host=arms-... >> >> I've been doing that, and they do work on the Android system, though >> it doesn't seem right to me, shouldn't it be --target=arm...? >> >> Many thanks for helping me with the above steps, as I'm blundering >> heavily. >> -- >> 白い熊 >> >> -- >> For unsubscribe information see http://sourceware.org/lists.html#faq >> > > -Bryan Resending because gmail magically changed my sending format back to html on me and the original response did not make it to the list. -Bryan -- For unsubscribe information see http://sourceware.org/lists.html#faq
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |