Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 265005 - [patch] sys-kernel/genkernel-9999 (commit 109770b7) doesn't pass CROSS_COMPILE through to busybox, etc so strip and similar get called for the wrong arch
Summary: [patch] sys-kernel/genkernel-9999 (commit 109770b7) doesn't pass CROSS_COMPIL...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2009-04-05 19:20 UTC by Mike Auty (RETIRED)
Modified: 2012-02-12 01:50 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
genkernel-9999-cross-strip.patch (genkernel-9999-cross-strip.patch,3.05 KB, patch)
2009-04-05 19:21 UTC, Mike Auty (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Auty (RETIRED) gentoo-dev 2009-04-05 19:20:24 UTC
Hiya guys,

Just a quick note to say that busybox calls strip internally, but since genkernel only passes through CC, LD and AS, cross-compiling calls the native host strip, which then barfs on the file.  Genkernel then later calls its own strip (which again appeared not to be the cross-compile strip, but merely the host strip).

Anyway, please find attached a patch that seems to solve the problems, by exporting UTILS_CROSS_COMPILE as CROSS_COMPILE for all tool building.  Let me know if there's any problems, or any further information I can provide to help...  5:)
Comment 1 Mike Auty (RETIRED) gentoo-dev 2009-04-05 19:21:04 UTC
Created attachment 187398 [details, diff]
genkernel-9999-cross-strip.patch
Comment 2 Andrew Gaffney (RETIRED) gentoo-dev 2009-04-06 03:34:03 UTC
What is the point of setting CROSS_COMPILE=$UTILS_CROSS_COMPILE in the patch? That var isn't used anywhere.
Comment 3 Mike Auty (RETIRED) gentoo-dev 2009-04-06 10:06:38 UTC
It gets exported to ARGS in compile_generic() (or at least, that was the intention), such that during the eval command, busybox's make and so forth will get handed CROSS_COMPILE, and correctly append it to the strip command in their Makefiles (busybox does an internal strip, then genkernel does a strip afterwards).

The original error I was hitting was in busybox's strip (not genkernel's), because whilst it was supposed to use "${CROSS_COMPILE}strip", that ended up just calling strip...
Comment 4 Mike Auty (RETIRED) gentoo-dev 2009-04-06 10:11:15 UTC
In fact, I probably wanted to add them to compile_utils_args(), but instead only added them to export_utils_args().  Since both seem to happen, the output only print CC, LD and AS, but I think make will be handed CROSS_COMPILE through the env and still make use of it.

Would you like me to fix up the patch so that compile_utils_args() gets the same treatment?  I was mostly duplicating the kernel's side of things, but it seems I missed that one...
Comment 5 Sebastian Pipping gentoo-dev 2011-01-05 22:47:00 UTC
PS: Adding keyword "Inclusion" and "[patch] " prefix to better show this bug's nature in searches...
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2012-02-12 01:50:57 UTC
InGit.