<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>92693</bug_id>
          
          <creation_ts>2005-05-15 05:01 0000</creation_ts>
          <short_desc>Links cannot be cross-compiled</short_desc>
          <delta_ts>2005-06-07 14:07:29 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Applications</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>radek@podgorny.cz</reporter>
          <assigned_to>vanquirius@gentoo.org</assigned_to>
          <cc>ingo.hoffmann@gmail.com</cc>

      

      
          <long_desc isprivate="0">
            <who>radek@podgorny.cz</who>
            <bug_when>2005-05-15 05:01:20 0000</bug_when>
            <thetext>The current way links is built is wrong because it has &quot;gcc&quot; hardcoded in the Makefiles (or somewhere else?). It just doesn&apos;t take CBUILD and CHOST into account which results in broken binaries (cannot be run on target system).</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vanquirius@gentoo.org</who>
            <bug_when>2005-05-25 10:45:47 0000</bug_when>
            <thetext>Created an attachment (id=59804)
links-2.1_pre17-r2.ebuild.diff

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

  if test -n &quot;$CC&quot;; then
  ac_cv_prog_CC=&quot;$CC&quot; # 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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>radek@podgorny.cz</who>
            <bug_when>2005-05-25 11:51:58 0000</bug_when>
            <thetext>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&apos;t test it now as my system is not prepared... :-(
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vanquirius@gentoo.org</who>
            <bug_when>2005-05-25 13:20:08 0000</bug_when>
            <thetext>(In reply to comment #2)
&gt; Portage itself should take care...

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

&gt; P.S.: Sorry, can&apos;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 :-).</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>radek@podgorny.cz</who>
            <bug_when>2005-05-25 13:36:54 0000</bug_when>
            <thetext>OK, thanks. Will try ASAP...</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>radek@podgorny.cz</who>
            <bug_when>2005-05-31 05:02:31 0000</bug_when>
            <thetext>This patch seem to work as expected, please include. Don&apos;t have a machine to try
it on but in case it won&apos;t work, I&apos;ll reopen this one.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vanquirius@gentoo.org</who>
            <bug_when>2005-06-07 14:07:29 0000</bug_when>
            <thetext>Alright, adding it to -r2.
Thanks for reporting.</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>59804</attachid>
            <date>2005-05-25 10:45 0000</date>
            <desc>links-2.1_pre17-r2.ebuild.diff</desc>
            <filename>links-2.1_pre17-r2.ebuild.diff</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIGxpbmtzLTIuMV9wcmUxNy1yMS5lYnVpbGQJMjAwNS0wNS0xMyAxMzoxODoyMS4wMDAwMDAw
MDAgLTAzMDAKKysrIGxpbmtzLTIuMV9wcmUxNy1yMi5lYnVpbGQJMjAwNS0wNS0yNSAxNDo0Nzoz
NC4wMDAwMDAwMDAgLTAzMDAKQEAg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