Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 301985 - sys-devel/yaboot-1.3.14 does not cross compile correctly
Summary: sys-devel/yaboot-1.3.14 does not cross compile correctly
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords: Inclusion
: 301984 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-01-23 22:52 UTC by blazed
Modified: 2010-01-24 03:24 UTC (History)
0 users

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


Attachments
cross-compile.patch (cross-compile.patch,1.58 KB, patch)
2010-01-23 22:53 UTC, blazed
Details | Diff
cross-compile.patch (cross-compile.patch,1.52 KB, patch)
2010-01-23 23:05 UTC, blazed
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description blazed 2010-01-23 22:52:06 UTC
my problems were cross compiling on i686-pc-linux-gnu for powerpc-unknown-linux-gnu.
The makefile is not properly coded to respect cross compiling. Also chrpfix.patch assumes that addnote was compiled for $CBUILD when in fact it should be compiling for $CHOST.  The patch updates the makefile in such a way that it calls the newly built addnote which, when cross-compiling, will never execute. Also the strip section of the makefile does not respect cross compilation.

My patch fixes this problem by setting CROSS = ${CHOST}- updating the linking flags to point to $SYSROOT and $ROOT incase they are different, setting HOSTCC = ${CBUILD}-gcc, adding a line to compile addnote a seccond time under the name addnote2 with HOSTCC and running this file instead of addnote (for CHOST), and last but not least, it appends ${CROSS} to all of the strip commands

did I leave anything out?


Reproducible: Always

Steps to Reproduce:
1.cross-compile the package
2.it will bomb when the makefile calls ld instead of ${CHOST}-ld
3.

Actual Results:  
failure

Expected Results:  
success

will attach patch
Comment 1 blazed 2010-01-23 22:53:14 UTC
Created attachment 217279 [details, diff]
cross-compile.patch

this is my fix, tell me whacha think
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2010-01-23 22:57:26 UTC
*** Bug 301984 has been marked as a duplicate of this bug. ***
Comment 3 blazed 2010-01-23 23:04:56 UTC
ok so I overlooked the fact that ROOT is set in the Makefile, I have amended
the patch to remove the -L${ROOT}... parts of the linker flags

(sorry for the accidental duplicate bug, this is my first time submitting a bug)
Comment 4 blazed 2010-01-23 23:05:32 UTC
Created attachment 217281 [details, diff]
cross-compile.patch