[oe] [meta-oe][PATCH 3/3] meson: add LDFLAGS to bbclass C/C++ link arguments

Peter Kjellerstedt peter.kjellerstedt at axis.com
Wed Jun 7 21:48:48 UTC 2017


> -----Original Message-----
> From: openembedded-devel-bounces at lists.openembedded.org
> [mailto:openembedded-devel-bounces at lists.openembedded.org] On Behalf Of
> Adam C. Foltzer
> Sent: den 5 juni 2017 19:23
> To: openembedded-devel at lists.openembedded.org
> Subject: [oe] [meta-oe][PATCH 3/3] meson: add LDFLAGS to bbclass C/C++
> link arguments
> 
> This adds compiler flags for C++ projects, and fixes the linker
> arguments for both C and C++ to avoid the GNU_HASH qa failure
> 
> Signed-off-by: Adam C. Foltzer <acfoltzer at galois.com>
> ---
>  meta-oe/classes/meson.bbclass | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
> 
> diff --git a/meta-oe/classes/meson.bbclass b/meta-
> oe/classes/meson.bbclass
> index d2ae626..11c8d34 100644
> --- a/meta-oe/classes/meson.bbclass
> +++ b/meta-oe/classes/meson.bbclass
> @@ -32,7 +32,8 @@ MESONOPTS = " --prefix ${prefix} \
>                --localstatedir ${localstatedir} \
>                --sharedstatedir ${sharedstatedir}"
> 
> -MESON_C_ARGS = "${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
> +MESON_C_ARGS = "${TARGET_CC_ARCH}${TOOLCHAIN_OPTIONS}"
> +MESON_LINK_ARGS = "${TOOLCHAIN_OPTIONS} ${LDFLAGS}"

According to a colleague of mine, the ${TARGET_CC_ARCH} options need 
to be passed to the linker as well or binaries end up with the wrong 
ld.so for armhf.

Also, why do you need to add ${LDFLAGS} here?

>  MESON_HOST_ENDIAN = "${@bb.utils.contains('SITEINFO_ENDIANNESS', 'be',
> 'big', 'little', d)}"
>  MESON_TARGET_ENDIAN = "${@bb.utils.contains('TUNE_FEATURES',
> 'bigendian', 'big', 'little', d)}"
> @@ -61,9 +62,9 @@ pkgconfig = 'pkg-config'
> 
>  [properties]
>  c_args = [${@meson_array('MESON_C_ARGS', d)}]
> -cpp_args = [${@meson_array('TOOLCHAIN_OPTIONS', d)}]
> -c_link_args = [${@meson_array('TOOLCHAIN_OPTIONS', d)}]
> -cpp_link_args = [${@meson_array('TOOLCHAIN_OPTIONS', d)}]
> +c_link_args = [${@meson_array('MESON_LINK_ARGS', d)}]
> +cpp_args = [${@meson_array('MESON_C_ARGS', d)}]
> +cpp_link_args = [${@meson_array('MESON_LINK_ARGS', d)}]
> 
>  [host_machine]
>  system = '${BUILD_OS}'
> --
> 2.9.4

//Peter




More information about the Openembedded-devel mailing list