<?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>7462</bug_id>
          
          <creation_ts>2015-03-16 13:48:53 +0000</creation_ts>
          <short_desc>SDKTARGETSYSROOT is trimmed to DKTARGETSYSROOT</short_desc>
          <delta_ts>2015-03-17 10:35:59 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Eclipse Plugin</product>
          <component>eclipse-plugin</component>
          <version>1.8</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>https://lists.yoctoproject.org/pipermail/yocto/2015-March/024135.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Undecided</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Todor Minchev">todor.minchev</reporter>
          <assigned_to name="Todor Minchev">todor.minchev</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>bevenson</cc>
    
    <cc>ioanax.grigoropol</cc>
    
    <cc>yp.ep.watcher</cc>
    
    <cc>yp.watcher</cc>
          
          <qa_contact name="Mihail Stanciu">stanciux.mihail</qa_contact>
          <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>49468</commentid>
    <comment_count>0</comment_count>
    <who name="Todor Minchev">todor.minchev</who>
    <bug_when>2015-03-16 13:48:53 +0000</bug_when>
    <thetext>I am using version 1.6.2 of the Yocto Eclipse plug-in (from http://downloads.yoctoproject.org/releases/eclipse-plugin/1.6.2/kepler/) under Fedora 21.  After some recent issues with getting the plug-in to compile my application, I noticed that I am having a variable expansion problem with CC.

I followed the instructions for building an SDK for my image and I am using the pre-built toolchain.  In the environment script for the SDK, CC is defined as follows:

        export CC=&quot;arm-poky-linux-gnueabi-gcc  -march=armv5te -marm -mthumb-interwork -mtune=arm926ej-s --sysroot=$SDKTARGETSYSROOT&quot;

I then generate new a simple Yocto Hello World C project and build the application.  It builds just fine, but I see the following in the console output:

        arm-poky-linux-gnueabi-gcc  -march=armv5te -marm -mthumb-interwork -mtune=arm926ej-s --sysroot=DKTARGETSYSROOT 

However, if I go to Project-&gt;Properties-&gt;C/C++ Build-&gt;Environment and change the CC environment variable to the following:

        arm-poky-linux-gnueabi-gcc  -march=armv5te -marm -mthumb-interwork -mtune=arm926ej-s --sysroot=${SDKTARGETSYSROOT}

then the SDKTARGETSYSROOT is properly expanded to the correct value.  Is anyone else seeing this problem, or is this due to the version of tools that exist on Fedora 21?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49469</commentid>
    <comment_count>1</comment_count>
    <who name="Bevenson">bevenson</who>
    <bug_when>2015-03-16 14:29:39 +0000</bug_when>
    <thetext>I took a further look at this issue on my system, and I&apos;m wondering if the issue is not limited to the Eclipse plugin but may be affected by anything using the environment setup script.  In my script (environment-setup-arm926ejste-poky-linux-gnueabi) I see the following references to SDKTARGETSYSROOT:

export PKG_CONFIG_SYSROOT_DIR=$SDKTARGETSYSROOT
export PKG_CONFIG_PATH=$SDKTARGETSYSROOT/usr/lib/pkgconfig
export OECORE_TARGET_SYSROOT=&quot;$SDKTARGETSYSROOT&quot;
export CC=&quot;arm-poky-linux-gnueabi-gcc  -march=armv5te -marm -mthumb-interwork -mtune=arm926ej-s --sysroot=$SDKTARGETSYSROOT&quot;
export CXX=&quot;arm-poky-linux-gnueabi-g++  -march=armv5te -marm -mthumb-interwork -mtune=arm926ej-s --sysroot=$SDKTARGETSYSROOT&quot;
export CPP=&quot;arm-poky-linux-gnueabi-gcc -E  -march=armv5te -marm -mthumb-interwork -mtune=arm926ej-s --sysroot=$SDKTARGETSYSROOT&quot;
export LD=&quot;arm-poky-linux-gnueabi-ld  --sysroot=$SDKTARGETSYSROOT&quot;
export CONFIGURE_FLAGS=&quot;--target=arm-poky-linux-gnueabi --host=arm-poky-linux-gnueabi --build=x86_64-linux --with-libtool-sysroot=$SDKTARGETSYSROOT&quot;

Note that some are in double quotes and some are not.  I don&apos;t which is correct, but I believe they should be consistent.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49472</commentid>
    <comment_count>2</comment_count>
    <who name="Todor Minchev">todor.minchev</who>
    <bug_when>2015-03-16 17:01:41 +0000</bug_when>
    <thetext>The actual problem is that variables will only be expanded in a Makefile if they are in parentheses or braces as in $(var_name) or ${var_name}.

The autotools plugin uses the literal(unexpanded) values of the environment variables when it generates the Makefiles. 

This only works in its current form, because we have overlapping &quot;--sysroot=&quot; entries. I have a fix for this and will apply it to all versions of the plugin.  

Thanks again for reporting this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49492</commentid>
    <comment_count>3</comment_count>
    <who name="Todor Minchev">todor.minchev</who>
    <bug_when>2015-03-17 10:35:37 +0000</bug_when>
    <thetext>Fixed in luna with: d97b40d43

Fixed in kepler with: 02aa20e1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49493</commentid>
    <comment_count>4</comment_count>
    <who name="Todor Minchev">todor.minchev</who>
    <bug_when>2015-03-17 10:35:59 +0000</bug_when>
    <thetext>Fixed in luna with: d97b40d43

Fixed in kepler with: 02aa20e1</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>