aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/classes
diff options
context:
space:
mode:
authorAdam C. Foltzer <acfoltzer@galois.com>2017-06-08 10:34:14 -0700
committerMartin Jansa <Martin.Jansa@gmail.com>2017-06-14 14:51:15 +0200
commitd84b4b0bab9823c81f0ea38ca12eb8bccf892ca4 (patch)
treeb38477168754f84a277b3183fc9205d6776b052a /meta-oe/classes
parent5ab7b440bcdbdffccc57a0c4e5c509a7282b12a1 (diff)
downloadmeta-openembedded-d84b4b0bab9823c81f0ea38ca12eb8bccf892ca4.tar.gz
meta-openembedded-d84b4b0bab9823c81f0ea38ca12eb8bccf892ca4.tar.bz2
meta-openembedded-d84b4b0bab9823c81f0ea38ca12eb8bccf892ca4.zip
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@galois.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/classes')
-rw-r--r--meta-oe/classes/meson.bbclass11
1 files changed, 6 insertions, 5 deletions
diff --git a/meta-oe/classes/meson.bbclass b/meta-oe/classes/meson.bbclass
index d2ae626eb..2c48a7eb9 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 = "${MESON_C_ARGS} ${LDFLAGS}"
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}'
@@ -74,7 +75,7 @@ endian = '${MESON_HOST_ENDIAN}'
[target_machine]
system = '${TARGET_OS}'
cpu_family = '${TARGET_ARCH}'
-cpu = '${TARGET_ARCH}'
+cpu = '${TUNE_PKGARCH}'
endian = '${MESON_TARGET_ENDIAN}'
EOF
}