<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hello.</p>
<p><span style="font-size: 12pt;">I further gathered info and filed bellow.</span><br>
</p>
<p>(This is the first time I file a case against yoctoproject bugzilla, so please point me if anything is not in convention.)</p>
<p><br>
</p>
<p><a href="https://bugzilla.yoctoproject.org/show_bug.cgi?id=10255" class="OWAAutoLink" id="LPlnk45060">https://bugzilla.yoctoproject.org/show_bug.cgi?id=10255</a></p>
<br>
<div style="color: rgb(0, 0, 0);">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Mark Hatle <mark.hatle@windriver.com><br>
<b>Sent:</b> Friday, September 9, 2016 11:46 PM<br>
<b>To:</b> Takashi Matsuzawa; yocto@yoctoproject.org<br>
<b>Subject:</b> Re: [yocto] ac_cv_sizeof_long size definition by SDK</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">On 9/9/16 6:33 AM, Takashi Matsuzawa wrote:<br>
> Hello, Yocto.<br>
> <br>
> <br>
> I am now puzzled by this variable ste in $CONFIG_SITE setup file in<br>
> Yocto-generated SDK. <br>
> <br>
> <br>
> I generated x86_64 host, arm (32bit) target SDK.<br>
> <br>
> And if I invoke $CC (arm-poky-linux-gnueabi-gcc), using this SDK, sizeof (long)<br>
> is 4 (long = int)<br>
> <br>
> <br>
> However, if I look into $CONFIG_SITE's definition of ac_cv_sizeof_long, it is<br>
> defined as '8'.<br>
> <br>
> I feel this is strange since if this cached configure data is for the target<br>
> (and cross-compiling), this value should be 4, to match the above<br>
> (arm-poky-linux-gnueabi-gcc) result.<br>
> <br>
> (I think this part of the cache is being copied from poky/meta/site/x86_64-linux, )<br>
<br>
There should be multiple caches. There may be one for the host (nativesdk) and<br>
one for each target (arm 32-bit).<br>
<br>
Once you load the environment file for the arm system, the CONFIG_SITE setting<br>
should point to the proper settings for the environment file you have loaded.<br>
<br>
In a Power (32-bit) SDK I had laying around:<br>
<br>
sourcing "environment-setup-powerpc-linux"<br>
<br>
results in:<br>
<br>
CONFIG_SITE=.../sdk/site-config-powerpc-linux<br>
<br>
if I look at that file:<br>
<br>
ac_cv_sizeof_long=${ac_cv_sizeof_long=4}<br>
<br>
which is the correct value.<br>
<br>
<br>
If this is NOT what you are seeing in your generated SDKs, and you are loading<br>
the proper environment file, please file a defect with the Yocto Project<br>
version, your configuration information and a way to reproduce the problem.<br>
<br>
--Mark<br>
<br>
> <br>
> This is causing break if I build autotool based program using the SDK.<br>
> <br>
> <br>
> Am I doing mis-use of SDK here?<br>
> <br>
> <br>
> <br>
> <br>
> <br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>