[oe] [meta-oe][PATCH 5/8] luajit: Dont use BUILD_LDFLAGS when compiling host binaries
Carlos Alberto Lopez Perez
clopez at igalia.com
Sun May 20 19:02:22 UTC 2018
On 18/05/18 20:46, Andre McCurdy wrote:
> On Fri, May 18, 2018 at 6:27 AM, Carlos Alberto Lopez Perez
> <clopez at igalia.com> wrote:
>> On 18/05/18 06:44, Khem Raj wrote:
>>>> I suggest adding something like this:
>>>>
>>>> EXTRA_OEMAKE_remove_class-target = "'HOST_LDFLAGS=${BUILD_LDFLAGS}'"
>>>>
>
> This idea looks right, but be aware that ${BUILD_LDFLAGS} will be
> expanded before being processed by _remove. Therefore any individual
> string within ${BUILD_LDFLAGS} will be removed from the final value of
> EXTRA_OEMAKE, even if it occurs somewhere other than in the value of
> HOST_LDFLAGS. For example:
>
> BUILD_CFLAGS = "one two three"
> BUILD_LDFLAGS = "one two three"
>
> FOO = " \
> 'HOST_CFLAGS=${BUILD_CFLAGS}' \
> 'HOST_LDFLAGS=${BUILD_LDFLAGS}' \
> "
>
> FOO_remove_class-target = "'HOST_LDFLAGS=${BUILD_LDFLAGS}'"
>
> $ bitbake recipe -e | grep ^FOO=
>
> FOO="'HOST_CFLAGS=one three'"
>
> Notice how "two" has been removed from the final value of HOST_CFLAGS
> set within FOO.
>
Interesting.. didn't knew this.
Is there any way to tell _remove to only remove a string if it matches
as a whole instead of removing the individual words separated by spaces?
I tried escaping the quotes but didn't worked :?
> In this case, if you want to have a HOST_LDFLAGS='...' only for native
> builds, it's better to use _append_class-native as required.
>
> In general, it's usually a bug (or at least bad form) to use _remove
> in a recipe. It's usually reserved for custom changes in a .bbappend
> etc.
>
Indeed. And it seems this is what caused the issue with the native class
for me.
Just removing the 'HOST_LDFLAGS=${BUILD_LDFLAGS}' entry directly in the
luajit recipe (without a bbappend) like the original patch from Khem Raj
proposed works fine.
I just checked that doing that way I can't reproduce the breakage of the
native class. So please commit this original patch from Khem Raj.
It is the right fix.
Thanks
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 897 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20180520/eea13f59/attachment-0002.sig>
More information about the Openembedded-devel
mailing list