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]

Cross compile native gcc for arm with crosstool-ng, have toolchain, which architecture deps, and which build, host, and target?


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?

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]