This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


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: Cross compile helloworld.c


On 06/26/2013 04:57 PM, Burning Thumb wrote:
> You know I thought this would be so easy, and maybe it is...
> 
> I'm running Ubuntu 13.04 on an intel machine and I want to cross compile helloworld.c so that the resulting binary will execute on Ubuntu on a powerpc machine.
> 
> So something simple like:
>  gcc helloworld.c --target powerpc-linux -o helloworldppc
> 
> But the answer seems to always come back how to cross compile gcc itself...
> 
> Anyone have a one liners on how to simply cross compile helloworld.c for ubuntu ppc?

Sure.  Of course, you're going to need an Ubuntu x86 -> powerpc cross
compiler.  Before we go through the steps of building one, please make
sure that you can't get a packaged cross-compiler from someone else.

Once you have done that, we can show you how to build a
cross-compiler.  But be warned: it takes a fair bit of C and operating
system experience, and you'll need to allocate a fair bit of time.

Andrew.


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