<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>6997</bug_id>
          
          <creation_ts>2014-11-25 08:44:02 +0000</creation_ts>
          <short_desc>issue in meta/recipes-connectivity/openssh_6*.bb file</short_desc>
          <delta_ts>2015-01-20 19:18:52 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>connectivity</component>
          <version>1.6</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>needs backport to 1.7 and 1.6</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.8</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yang">yang.y.wang</reporter>
          <assigned_to name="Saul Wold">sgw</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>47177</commentid>
    <comment_count>0</comment_count>
    <who name="Yang">yang.y.wang</who>
    <bug_when>2014-11-25 08:44:02 +0000</bug_when>
    <thetext>In the openssh .bb file, e.g. meta/recipes-connectivity/openssh/openssh_6.5p1.bb file, around line 56:
 export LD = &quot;${CC}&quot;
This line will set the LD to CC for linking. However when I have the secondary toolchain enabled for Yocto build, the LD will be set back to normal LD of the secondary toolchain. The &quot; export LD = &quot;${CC}&quot; &quot; here will become invalid. This will cause the linking error when the secondary toolchain layer is enabled.

Can we move this LD setup to function do_configure_prepend()? e.g. as following:

 76 do_configure_prepend () {
 77         if [ ! -e acinclude.m4 -a -e aclocal.m4 ]; then
 78                 cp aclocal.m4 acinclude.m4
 79         fi
  +         export LD=&quot;${CC}&quot;
 80 }

The issue also exists in newer Yocto Project.
Thanks.
-Yang</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47223</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2014-11-27 00:00:03 +0000</bug_when>
    <thetext>If that line is removed all together does your secondary toolchain work correctly, it&apos;s possible that might be the more correct fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47225</commentid>
    <comment_count>2</comment_count>
    <who name="Yang">yang.y.wang</who>
    <bug_when>2014-11-27 01:07:08 +0000</bug_when>
    <thetext>That line is necessary for openssh because the openssh use $CC to link for the final binary. If we remove that line at all, the openssh build will fail due to the incorrected linking options. There is option -Wl... in openssh linking stage which only supported by CC (not LD). 
i586-poky-linux-ld: unrecognized option &apos;-Wl,-O1&apos;


(In reply to comment #1)
&gt; If that line is removed all together does your secondary toolchain work
&gt; correctly, it&apos;s possible that might be the more correct fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47266</commentid>
    <comment_count>3</comment_count>
    <who name="Stephen K Jolley">sjolley.yp.pm</who>
    <bug_when>2014-12-01 18:58:05 +0000</bug_when>
    <thetext>Saul, it appears Yang has answered your question.  Moving this off of NEEDINFO.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47545</commentid>
    <comment_count>4</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2014-12-12 17:37:57 +0000</bug_when>
    <thetext>Ah, I think I see what&apos;s happening here, the autoconf is seeing the LD=CC 
during configuration, but the way secondary toolchain setup happens this export 
gets overridden by the secondary tool setting of LD, which you don&apos;t want for 
openssh.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47551</commentid>
    <comment_count>5</comment_count>
    <who name="Yang">yang.y.wang</who>
    <bug_when>2014-12-15 01:05:58 +0000</bug_when>
    <thetext>Hi Saul,
    Yes exactly:-).
Thanks.
-Yang

(In reply to comment #4)
&gt; Ah, I think I see what&apos;s happening here, the autoconf is seeing the LD=CC 
&gt; during configuration, but the way secondary toolchain setup happens this
&gt; export 
&gt; gets overridden by the secondary tool setting of LD, which you don&apos;t want
&gt; for 
&gt; openssh.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47654</commentid>
    <comment_count>6</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2014-12-22 23:12:23 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=d913c67ef10079c1bf0f7ed998a5a7b36a73ea21</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48112</commentid>
    <comment_count>7</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2015-01-20 19:18:52 +0000</bug_when>
    <thetext>Merged into daisy and dizzy</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>