[OE-core] [PATCH 06/16] gcc-sanitizers: Fix libtool .la files

Robert Yang liezhi.yang at windriver.com
Mon Jun 4 03:24:29 UTC 2018



On 06/04/2018 12:01 AM, Richard Purdie wrote:
> On Wed, 2018-05-30 at 17:03 +0800, Robert Yang wrote:
>> From: Yuanjie Huang <yuanjie.huang at windriver.com>
>>
>> Since libtool sysroot is not set when compiling sanitizers, the
>> libtool
>> does no prefix the dependency path correctly. Fix it, so that
>> programs
>> can link to sanitizer libraries without error.
>>
>> Signed-off-by: Yuanjie Huang <yuanjie.huang at windriver.com>
>> Signed-off-by: Mark Hatle <mark.hatle at windriver.com>
>> ---
>>   meta/recipes-devtools/gcc/gcc-sanitizers.inc | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
>> index e5e8452..2373dd8 100644
>> --- a/meta/recipes-devtools/gcc/gcc-sanitizers.inc
>> +++ b/meta/recipes-devtools/gcc/gcc-sanitizers.inc
>> @@ -39,6 +39,8 @@ do_install () {
>>           rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
>>       fi
>>       chown -R root:root ${D}
>> +    # Fix broken libtool with stdc++, as sysroot is not set.
>> +    find ${D} -name \*.la -exec sed -i "/^dependency_libs=/s@'${libdir}'@=${libdir}@g" {} \;
>>   }
>>   
>>   INHIBIT_DEFAULT_DEPS = "1"
> 
> At this point we gave up and started just deleting .la files so I'm not
> sure this matters any more. Do you still need to do this?

Sory, I can't find any la files in ${D}, I think that is not needed any more,
I will drop it in V3.

// Robert

> 
> Regardless, it would be better to pass in the right libtool sysroot
> rather than hacking the .la files.
> 
> Cheers,
> 
> Richard
> 
> 



More information about the Openembedded-core mailing list