This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ 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]

Re: First time user - basic question


On Tue, Mar 15, 2011 at 9:02 PM, Jim Norton <jimnorton@jimnorton.org> wrote:
> Thank you for your reply. I noticed that I've got my cross compiler binaries
> built from crosstool-ng in ~x-tools/arm-cortex_a8_blah_blah/bin.

This is the location where, by default, CT-NG will install a cross
toolchain. Personally I prefer to see my working area arranged
differently. There's nothing magical about the install location,
wherever you have configured your tools to be installed is fine.

> So if I create some symlinks for gcc etc

You don't need to symlink your tools from where they were installed in
your build to where I install mine on my build. In fact doing this
might increase the chance things don't work correctly. All you need to
do is:

1) get CT-NG configured and have it build your cross tools
2) add the "$PREFIX/bin" directory to your PATH
3) invoke your cross compiler

> and set the path I can easily
> generate an executable for my ARM target by simply invoking gcc.

Yes... if by "simply invoking gcc" you mean "simply invoking
arm-cortex_a8-blah-blah-gcc". If you "simply invoke gcc" you'll get
your native compiler (i.e. the one you have on your computer before
you did anything with CT-NG) instead of the cross-compiler.

> Do I need
> to do anything else?

That depends.

> What if I'm going to build a large package that comes
> with multiple Makefiles etc?

That depends on what's in those Makefiles. Nice Makefiles, like the
ones which come with the Linux kernel, assume you might cross-compile,
and are therefore setup for it.

> It's easy enough to compile a single file. My
> question boils down to how do I use the cross-compiler ( what needs to be
> setup ) to build larger packages - such as the kernel etc...
>
> I just don't know what has to be set in the environment.

In my previous email I provided explicit examples of what exactly you
need to do to cross-configure and cross-compile the Linux kernel as
well as pointers on using source code which uses the autotools build
system, so instead of repeating all that again I'll just refer you to
that previous email:

http://sourceware.org/ml/crossgcc/2011-03/msg00059.html

--
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]