From 2987284918f270d3e31684df45c28485284c3402 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 1 Nov 2021 17:19:51 -0700 Subject: mozjs-78: Pass C/C++ flags to js configure On mips ensure -fpie is passed when using clang compiler, this fixes configure issues e.g. /mnt/b/yoe/master/build/tmp/work/mips32r2-yoe-linux/mozjs-78/78.15.0-r0/recipe-sysroot-native/usr/bin/mips-yoe-linux/mips-yoe-linux-ld: non-dynamic relocations refer to dynamic symbol localtime_r@@GLIBC_2.0 /mnt/b/yoe/master/build/tmp/work/mips32r2-yoe-linux/mozjs-78/78.15.0-r0/recipe-sysroot-native/usr/bin/mips-yoe-linux/mips-yoe-linux-ld: failed to set dynamic section sizes: bad value Signed-off-by: Khem Raj --- .../meta-python/recipes-extended/mozjs/mozjs-78_78.15.0.bb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78_78.15.0.bb b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78_78.15.0.bb index 090c2fe058..61c5861153 100644 --- a/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78_78.15.0.bb +++ b/meta-oe/dynamic-layers/meta-python/recipes-extended/mozjs/mozjs-78_78.15.0.bb @@ -91,6 +91,9 @@ export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}" # otherwise we are asked for yasm... export AS = "${CC}" +CPPFLAGS:append:mips:toolchain-clang = " -fpie" +CPPFLAGS:append:mipsel:toolchain-clang = " -fpie" + do_configure() { prepare_python_and_rust @@ -102,7 +105,7 @@ do_configure() { # * with mozjs-78 we get without: # | Path specified in LOCAL_INCLUDES (..) resolves to the topsrcdir or topobjdir (/oe-core-glibc/work/cortexa72-mortsgna-linux/mozjs-78/78.15.0-r0/firefox-78.15.0/js/src), which is not allowed mkdir -p "${B}/lcl_tmp" - TMPDIR="${B}/lcl_tmp" ${S}/js/src/configure ${EXTRA_OECONF} + TMPDIR="${B}/lcl_tmp" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" ${S}/js/src/configure ${EXTRA_OECONF} # inspired by what fedora [1] does: for big endian rebuild icu dat # this avoids gjs qemu crash on mips at gir creation -- cgit 1.2.3-korg