Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 92693 - Links cannot be cross-compiled
Summary: Links cannot be cross-compiled
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Marcelo Goes (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-15 05:01 UTC by Radek Podgorny
Modified: 2005-06-07 14:07 UTC (History)
1 user (show)

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


Attachments
links-2.1_pre17-r2.ebuild.diff (links-2.1_pre17-r2.ebuild.diff,829 bytes, patch)
2005-05-25 10:45 UTC, Marcelo Goes (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Radek Podgorny 2005-05-15 05:01:20 UTC
The current way links is built is wrong because it has "gcc" hardcoded in the Makefiles (or somewhere else?). It just doesn't take CBUILD and CHOST into account which results in broken binaries (cannot be run on target system).
Comment 1 Marcelo Goes (RETIRED) gentoo-dev 2005-05-25 10:45:47 UTC
Created attachment 59804 [details, diff]
links-2.1_pre17-r2.ebuild.diff

I took a look at the configure script and found this:

  if test -n "$CC"; then
  ac_cv_prog_CC="$CC" # Let the user override the test.

Thus perhaps setting CC before the configure script is run fixes it?
Please tell me if this patch works for you.
Comment 2 Radek Podgorny 2005-05-25 11:51:58 UTC
AFAIK setting CC worked for me but this is not an acceptable solution. Portage
itself should take care of build/target architecture so one can emerge world for
another arch without dealing with this...

P.S.: Sorry, can't test it now as my system is not prepared... :-(
Comment 3 Marcelo Goes (RETIRED) gentoo-dev 2005-05-25 13:20:08 UTC
(In reply to comment #2)
> Portage itself should take care...

Yep, that's why I'm adding export CC="$(tc-getCC)" to the ebuild, it should
define CC so that you don't have to.

> P.S.: Sorry, can't test it now as my system is not prepared... :-(

No problem. Let me know when you can so that we can sort this out :-).
Comment 4 Radek Podgorny 2005-05-25 13:36:54 UTC
OK, thanks. Will try ASAP...
Comment 5 Radek Podgorny 2005-05-31 05:02:31 UTC
This patch seem to work as expected, please include. Don't have a machine to try
it on but in case it won't work, I'll reopen this one.
Comment 6 Marcelo Goes (RETIRED) gentoo-dev 2005-06-07 14:07:29 UTC
Alright, adding it to -r2.
Thanks for reporting.