[oe] [meta-oe][PATCH] snappy: add -fPIC flags

Dengke Du dengke.du at windriver.com
Wed Aug 29 02:10:15 UTC 2018



On 2018年08月29日 00:45, Khem Raj wrote:
> On Tue, Aug 28, 2018 at 12:29 AM Dengke Du <dengke.du at windriver.com> wrote:
>> Let the libsnappy.a be position independent code, so other packages can use it
>> to make shared PIC library, such as ceph.
>>
>> Signed-off-by: Dengke Du <dengke.du at windriver.com>
>> ---
>>   meta-oe/recipes-extended/snappy/snappy_1.1.7.bb | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/meta-oe/recipes-extended/snappy/snappy_1.1.7.bb b/meta-oe/recipes-extended/snappy/snappy_1.1.7.bb
>> index 6f1978a..70223be 100644
>> --- a/meta-oe/recipes-extended/snappy/snappy_1.1.7.bb
>> +++ b/meta-oe/recipes-extended/snappy/snappy_1.1.7.bb
>> @@ -19,3 +19,4 @@ inherit cmake pkgconfig
>>
>>   PACKAGECONFIG ??= ""
>>   PACKAGECONFIG[lzo] = "-DHAVE_LIBLZO2=1,-DHAVE_LIBLZO2=0,lzo,"
>> +TARGET_CFLAGS += "-fPIC"
> perhaps adding the -fPIC flag to CPPFLAGS is better since adding to
> it would mean it applies to  C and C++ compilers equally

Thanks!

>
>
>> --
>> 2.7.4
>>
>> --
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel at lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-devel




More information about the Openembedded-devel mailing list