FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Embedded

 
 
LinkBack Thread Tools
 
Old 01-18-2008, 11:20 PM
"John Utz"
 
Default cross compilation kernel makefile variable

Hello;

Can anybody tell me what variable i need to set in the kernel makefile
or elsewhere that points the build to my cross compile gcc?

i have tried setting, CC, HOSTCC and a few other things and it hasnt
worked.

no matter what i try, the build seems to keep using the system gcc and
that is mighty annoying.

the only way i have managed to cross build a kernel is to actually mv
the system gcc out of the way and make a softlink to my cross-compiler.

which works, but causes a large chunk of grief when i try and build an
app for my desktop and then get the wrong executable format for my
desktop because i have forgotten to return the gcc link back to
pointing at the system gcc. :-(

what am i failing to understand about the kernel build process?

tnx!

johnu

--
gentoo-embedded@lists.gentoo.org mailing list
 
Old 01-19-2008, 12:42 AM
Nathan Brink
 
Default cross compilation kernel makefile variable

John Utz wrote:
> Hello;
>
> Can anybody tell me what variable i need to set in the kernel makefile
> or elsewhere that points the build to my cross compile gcc?
>
> i have tried setting, CC, HOSTCC and a few other things and it hasnt
> worked.
>
> no matter what i try, the build seems to keep using the system gcc and
> that is mighty annoying.
>
> the only way i have managed to cross build a kernel is to actually mv
> the system gcc out of the way and make a softlink to my cross-compiler.
>
> which works, but causes a large chunk of grief when i try and build an
> app for my desktop and then get the wrong executable format for my
> desktop because i have forgotten to return the gcc link back to
> pointing at the system gcc. :-(
>
> what am i failing to understand about the kernel build process?
>
> tnx!
>
> johnu
>
>
To cross compile the kernel, call make while setting CROSS_COMPILE to
the prefix of the crosscompiling gcc. Also set ARCH to something
appropriate so that the kernel options for the appropriate architecture
to be used. For instance, if crosscompiling on an x86_64 system a kernel
for an i686 system, run "make ARCH=x86 CROSS_COMPILE=i686-pc-linux-gnu-"
if the name of the crosscompiling gcc is "i686-pc-linux-gnu". Be sure to
include the trailing dash. The kernel's makefile will append the name of
the gcc or binutils program it needs to call to the CROSS_COMPILE
variable. When it needs gcc, it calls ${CROSS_COMPILE}gcc, which expands
to the concatenation of the string "i686-pc-linux-gnu-" and "gcc", thus
calling i686-pc-linux-gnu-gcc, your crosscompiler.
I think this stuff is clearly explained in the Gentoo Crosscompiling
documentation found at http://embedded.gentoo.org/handbook/.
--
gentoo-embedded@lists.gentoo.org mailing list
 
Old 01-19-2008, 07:11 PM
Mike Frysinger
 
Default cross compilation kernel makefile variable

On Friday 18 January 2008, Nathan Brink wrote:
> I think this stuff is clearly explained in the Gentoo Crosscompiling
> documentation found at http://embedded.gentoo.org/handbook/.

all the stuff you posted is correct, and should already be in
the "cross-compiling the kernel" portion of the handbook as you pointed out
-mike
 
Old 01-19-2008, 07:30 PM
"Edel SM"
 
Default cross compilation kernel makefile variable

hello nedd & mattijs,

thank you for the tips. i already found my error. it turned out that i
have my /var/tmp mounted w/ ACL on and with wrong default permission
propagating. fixing the directory permission fixed the merging.

thanks.

On 1/20/08, Mike Frysinger <vapier@gentoo.org> wrote:
> On Friday 18 January 2008, Nathan Brink wrote:
> > I think this stuff is clearly explained in the Gentoo Crosscompiling
> > documentation found at http://embedded.gentoo.org/handbook/.
>
> all the stuff you posted is correct, and should already be in
> the "cross-compiling the kernel" portion of the handbook as you pointed out
> -mike
>
>

--edel
--
gentoo-embedded@lists.gentoo.org mailing list
 
Old 01-19-2008, 07:31 PM
"Edel SM"
 
Default cross compilation kernel makefile variable

On 1/20/08, Mike Frysinger <vapier@gentoo.org> wrote:
> On Friday 18 January 2008, Nathan Brink wrote:
> > I think this stuff is clearly explained in the Gentoo Crosscompiling
> > documentation found at http://embedded.gentoo.org/handbook/.

hello mike, yes. thanks for link.

>
> all the stuff you posted is correct, and should already be in
> the "cross-compiling the kernel" portion of the handbook as you pointed out
> -mike
>
>

--edel
--
gentoo-embedded@lists.gentoo.org mailing list
 
Old 01-19-2008, 07:33 PM
"Edel SM"
 
Default cross compilation kernel makefile variable

sorry. wrong post. its alreay 4:32am ehere and im running out of time.
sorry again.

On 1/20/08, Edel SM <sierra2@gmail.com> wrote:
> hello nedd & mattijs,
>
> thank you for the tips. i already found my error. it turned out that i
> have my /var/tmp mounted w/ ACL on and with wrong default permission
> propagating. fixing the directory permission fixed the merging.
>
> thanks.
>
> On 1/20/08, Mike Frysinger <vapier@gentoo.org> wrote:
> > On Friday 18 January 2008, Nathan Brink wrote:
> > > I think this stuff is clearly explained in the Gentoo Crosscompiling
> > > documentation found at http://embedded.gentoo.org/handbook/.
> >
> > all the stuff you posted is correct, and should already be in
> > the "cross-compiling the kernel" portion of the handbook as you pointed out
> > -mike
> >
> >
>
> --edel
>
--
gentoo-embedded@lists.gentoo.org mailing list
 

Thread Tools




All times are GMT. The time now is 01:58 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org