<?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>11874</bug_id>
          
          <creation_ts>2017-07-29 11:39:14 +0000</creation_ts>
          <short_desc>override TARGET_* flags</short_desc>
          <delta_ts>2018-11-10 07:58:18 +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>core</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>backport 2.4.3?</status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.7 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>betacentauri</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>stephano</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>75427</commentid>
    <comment_count>0</comment_count>
    <who name="">betacentauri</who>
    <bug_when>2017-07-29 11:39:14 +0000</bug_when>
    <thetext>Hi,

I have a problem with these 4 commits:
http://git.openembedded.org/openembedded-core/commit/?id=55c83cb239df5faf5e2143fffca47f2f16931cb3
http://git.openembedded.org/openembedded-core/commit/?id=3facbe700a2f28a11620c4954686ed5d5e47a3d9
http://git.openembedded.org/openembedded-core/commit/?id=85b69a5ec9ba9ea9ebdcd8ac18e1e147ddb1ff33
http://git.openembedded.org/openembedded-core/commit/?id=767335c92b7cc657a008722a908380a3c89c3c66

The TARGET_ variables are used for building for the target system. The BUILD_ variables are used for building for the build host. So is it correct to set TARGET_* to BUILD_*?

I found the commits because my build failed:
...
| checking for suffix of object files... configure: error: in `/mnt/build/oe-a/build-env_next/builds/openatv/release/sf4008/tmp/work/x86_64-linux/gcc-cross-initial-arm/7.1.0-r0/gcc-7.1.0/build.x86_64-linux.arm-oe-linux-gnueabi/arm-oe-linux-gnueabi/libgcc&apos;:
| configure: error: cannot compute suffix of object files: cannot compile
| See `config.log&apos; for more details.
| make: *** [configure-target-libgcc] Error 1
| ERROR: oe_runmake failed
| WARNING: /mnt/build/oe-a/build-env_next/builds/openatv/release/sf4008/tmp/work/x86_64-linux/gcc-cross-initial-arm/7.1.0-r0/temp/run.do_compile.20019:1 exit 1 from &apos;exit 1&apos;
| ERROR: Function failed: do_compile (log file is located at /mnt/build/oe-a/build-env_next/builds/openatv/release/sf4008/tmp/work/x86_64-linux/gcc-cross-initial-arm/7.1.0-r0/temp/log.do_compile.20019)
ERROR: Task (/mnt/build/oe-a/build-env_next/openembedded-core/meta/recipes-devtools/gcc/gcc-cross-initial_7.1.bb:do_compile) failed with exit code &apos;1&apos;

In config.log this is visible:
cc1: error: unrecognized argument in option &apos;-march=native&apos;
cc1: note: valid arguments to &apos;-march=&apos; are: armv2 armv2a armv3 armv3m armv4 armv4t armv5 armv5e armv5t armv5te armv5tej armv6 armv6-m armv6j armv6k armv6kz armv6s-m armv6t2 armv6z armv6zk armv7 armv7-a armv7-m armv7-r armv7e-m armv7ve armv8-a armv8-a+crc armv8-m.base armv8-m.main armv8-m.main+dsp armv8.1-a armv8.2-a armv8.2-a+fp16 iwmmxt iwmmxt2

Why does it happen? Because I use this:
BUILD_OPTIMIZATION = &quot;-march=native -O2 -pipe&quot;

According to DOCS BUILD_OPTIMIZATION is used for &quot;building for the build host or the SDK&quot;. So I think adding &quot;-march=native&quot; is ok.
And BUILD_OPTIMIZATION is added to the BUILD_CFLAGS in the bitbake.conf.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81980</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2018-10-31 22:41:47 +0000</bug_when>
    <thetext>http://git.openembedded.org/openembedded-core/commit/?id=55c83cb239df5faf5e2143fffca47f2f16931cb3

was reverted with:

http://git.yoctoproject.org/cgit.cgi/poky/commit/meta/classes/cross.bbclass?id=e824e093757c3de9c7c6194ff2ebab866dcfca2f

and I believe crosssdk needs the same fix.

The latter two changes using BUILD_SDK*FLAGS are correct though even if the variable is poorly named.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82121</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2018-11-09 15:25:02 +0000</bug_when>
    <thetext>http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=d21cf7ca124eac07f46534d12851ebdd7e8d3bcb</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82140</commentid>
    <comment_count>3</comment_count>
    <who name="">betacentauri</who>
    <bug_when>2018-11-10 07:58:18 +0000</bug_when>
    <thetext>Thanks, works like before.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>