[OE-core] [PATCH 1/1] python-native: Fix a compiler finding issue

Tom Rini tom_rini at mentor.com
Fri Jul 29 15:28:51 UTC 2011


On 07/28/2011 11:58 PM, Mei, Lei wrote:
> 
> 
>> -----Original Message-----
>> From: openembedded-core-bounces at lists.openembedded.org
>> [mailto:openembedded-core-bounces at lists.openembedded.org] On Behalf Of
>> Tom Rini
>> Sent: Friday, July 29, 2011 9:44 AM
>> To: openembedded-core at lists.openembedded.org
>> Subject: Re: [OE-core] [PATCH 1/1] python-native: Fix a compiler finding issue
>>
>> On 07/28/2011 06:15 PM, Mei, Lei wrote:
>>>
>>>
>>>> -----Original Message-----
>>>> From: openembedded-core-bounces at lists.openembedded.org
>>>> [mailto:openembedded-core-bounces at lists.openembedded.org] On Behalf
>> Of
>>>> Tom Rini
>>>> Sent: Thursday, July 28, 2011 11:09 PM
>>>> To: openembedded-core at lists.openembedded.org
>>>> Subject: Re: [OE-core] [PATCH 1/1] python-native: Fix a compiler finding
>> issue
>>>>
>>>> On 07/28/2011 12:20 AM, Mei Lei wrote:
>>>>> The CC variable sometimes add option information after compiler name,
>> but
>>>> python can't get the real compiler name if those information added.
>>>>> Fix this issue by dropping the option information when finding compiler
>> name.
>>>>>
>>>>> Signed-off-by: Mei Lei <lei.mei at intel.com>
>>>>
>>>> I think this is going to cause problems when you must pass flags to gcc
>>>> to have it work, eg 'gcc -m64'.
>>>
>>> This patch fixed your worried issue.
>>> The CC variable, sometimes like:  "x86_64-poky-linux-gcc -m64
>> --sysroot=/${TMPDIR}/sysroots/qemux86-64", contains flags information.
>>> This will lead to wrong compiler name "qemux86-64" rather than
>> "x86_64-poky-linux-gcc" when python finding the compiler name, so add this
>> patch to find the real gcc name.
>>
>> No, what I'm saying is I have a compiler that must be invoked as 'gcc
>> -m64' (which is what BUILD_CC is).  So, I think after saying that, the
>> right answer is to modify python to read the OE-specific BUILD_CC variable.
> 
> 
> I think I didn't describe this patch exactly before.
> 
> This patch is only for function runtime_library_dir_option, this function is to detect which platform we are running and what compiler we used, then decide what option information should be passed to compiler.
> 
> By default, our cross-compiler's name be recognized as "qemux86" rather than " x86_64-poky-linux-gcc" in this function, this is wrong, this will induce a wrong option information passed to x86_64-poky-linux-gcc and block the compile process.
> 
> And function runtime_library_dir_option only return the option information, so didn't influence compiler name in global.
> 
> By the way, I think BUILD_CC is host compiler name, not for target.

You're patching python-native, not python, which means the host python
and not the target python.

-- 
Tom Rini
Mentor Graphics Corporation




More information about the Openembedded-core mailing list