<?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>4901</bug_id>
          
          <creation_ts>2013-07-25 06:02:41 +0000</creation_ts>
          <short_desc>No warning that the toolchain and machine do not match</short_desc>
          <delta_ts>2013-07-31 06:12:54 +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>devtools / tool chain</component>
          <version>1.4</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.5</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Laszlo Papp">lpapp</reporter>
          <assigned_to name="Laurentiu Palcu">laurentiu.palcu</assigned_to>
          <cc>jessica.zhang</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>ross.burton</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>34833</commentid>
    <comment_count>0</comment_count>
    <who name="Laszlo Papp">lpapp</who>
    <bug_when>2013-07-25 06:02:41 +0000</bug_when>
    <thetext>If you use a cross-compilation toolchain setup like this:

TCMODE = &quot;external-sourcery&quot;
EXTERNAL_TOOLCHAIN = &quot;/usr&quot;
TARGET_PREFIX = &quot;arm-none-linux-gnueabi-&quot;

with the following machine which is the default:

MACHINE ??= &quot;qemux86&quot;

... then you will end up having weird toolchain issues without any reference to the setup with regards to MACHINE.

I believe it would make sense to print a warning that the architecture just does not match. That could spare a lot of time for many people, including me.

Nothing fancy, just grab any poky variant, and try to build a &quot;core-image-minimal&quot; image with bitbake. You can use the default local.conf with the three lines above after installing the toolchain:

https://developer.ridgerun.com/wiki/index.php/Code_Sourcery_ARM_toolchain_2009q1-203</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34963</commentid>
    <comment_count>1</comment_count>
    <who name="Laurentiu Palcu">laurentiu.palcu</who>
    <bug_when>2013-07-26 09:20:31 +0000</bug_when>
    <thetext>Currently, the TARGET_PREFIX that you set is not taken into account. It&apos;s overwritten with CSL_TARGET_SYS, in tcmode-external-sourcery.inc +20.

So, technically, MACHINE setting will be in sync with TARGET_PREFIX. The issue, however, is that the external toolchain does not provide a compiler for this architecture. In this case, there&apos;s already an error message printed if MACHINE is set to qemux86 for an arm toolchain:

ERROR: Failed to obtain CodeSourcery toolchain version: Execution of &apos;/home/lau/Personal/tests/ext_toolchain/CodeSourcery/Sourcery_G++_Lite/bin/i686-pc-linux-gnu-gcc -v&apos; failed: command not found

So, we can add another message to ask user to double check his MACHINE setting and the external toolchain to see that they match but it will only be redundant.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>34964</commentid>
    <comment_count>2</comment_count>
    <who name="Laszlo Papp">lpapp</who>
    <bug_when>2013-07-26 09:25:09 +0000</bug_when>
    <thetext>There is no any redundancy. That error message is unclear, and that is why I had to spend a few days to figure it out.

Surely, as I already wrote, a proper error message would have been a time saver. I would not have needed to waste a few days with it as it would have been clear right up front.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35151</commentid>
    <comment_count>3</comment_count>
    <who name="Laurentiu Palcu">laurentiu.palcu</who>
    <bug_when>2013-07-30 08:15:28 +0000</bug_when>
    <thetext>Patch under review on the ML, waiting merge.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35153</commentid>
    <comment_count>4</comment_count>
    <who name="Laszlo Papp">lpapp</who>
    <bug_when>2013-07-30 08:38:40 +0000</bug_when>
    <thetext>Please paste a link next time in the bugreport.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>35193</commentid>
    <comment_count>5</comment_count>
    <who name="Laurentiu Palcu">laurentiu.palcu</who>
    <bug_when>2013-07-31 06:12:54 +0000</bug_when>
    <thetext>Patch merged:
http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=f2b19ad4ab484c57494fc577193bd99b0481bf7c</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>