[yocto] ac_cv_sizeof_long size definition by SDK

Mark Hatle mark.hatle at windriver.com
Fri Sep 9 07:46:24 PDT 2016


On 9/9/16 6:33 AM, Takashi Matsuzawa wrote:
> Hello, Yocto.
> 
> 
> I am now puzzled by this variable ste in $CONFIG_SITE setup file in
> Yocto-generated SDK. 
> 
> 
> I generated x86_64 host, arm (32bit) target SDK.
> 
> And if I invoke $CC (arm-poky-linux-gnueabi-gcc), using this SDK, sizeof (long)
> is 4 (long = int)
> 
> 
> However, if I look into $CONFIG_SITE's definition of ac_cv_sizeof_long, it is
> defined as '8'.
> 
> I feel this is strange since if this cached configure data is for the target
> (and cross-compiling), this value should be 4, to match the above
> (arm-poky-linux-gnueabi-gcc) result.
> 
> (I think this part of the cache is being copied from poky/meta/site/x86_64-linux, )

There should be multiple caches.  There may be one for the host (nativesdk) and
one for each target (arm 32-bit).

Once you load the environment file for the arm system, the CONFIG_SITE setting
should point to the proper settings for the environment file you have loaded.

In a Power (32-bit) SDK I had laying around:

sourcing "environment-setup-powerpc-linux"

results in:

CONFIG_SITE=.../sdk/site-config-powerpc-linux

if I look at that file:

ac_cv_sizeof_long=${ac_cv_sizeof_long=4}

which is the correct value.


If this is NOT what you are seeing in your generated SDKs, and you are loading
the proper environment file, please file a defect with the Yocto Project
version, your configuration information and a way to reproduce the problem.

--Mark

> 
> This is causing break if I build autotool based program using the SDK.
> 
> 
> Am I doing mis-use of SDK here?
> 
> 
> 
> 
> 




More information about the yocto mailing list