diff options
Diffstat (limited to 'meta/recipes-devtools/meson')
-rw-r--r-- | meta/recipes-devtools/meson/meson/0001-Check-for-clang-before-guessing-gcc-or-lcc.patch | 56 | ||||
-rw-r--r-- | meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch | 32 | ||||
-rw-r--r-- | meta/recipes-devtools/meson/meson/0001-is_debianlike-always-return-False.patch | 26 | ||||
-rw-r--r-- | meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch | 48 | ||||
-rw-r--r-- | meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch | 12 | ||||
-rw-r--r-- | meta/recipes-devtools/meson/meson/disable-rpath-handling.patch | 37 | ||||
-rwxr-xr-x | meta/recipes-devtools/meson/meson/meson-wrapper | 22 | ||||
-rw-r--r-- | meta/recipes-devtools/meson/meson_1.3.1.bb (renamed from meta/recipes-devtools/meson/meson_0.62.1.bb) | 54 |
8 files changed, 101 insertions, 186 deletions
diff --git a/meta/recipes-devtools/meson/meson/0001-Check-for-clang-before-guessing-gcc-or-lcc.patch b/meta/recipes-devtools/meson/meson/0001-Check-for-clang-before-guessing-gcc-or-lcc.patch deleted file mode 100644 index 58fa119439..0000000000 --- a/meta/recipes-devtools/meson/meson/0001-Check-for-clang-before-guessing-gcc-or-lcc.patch +++ /dev/null @@ -1,56 +0,0 @@ -From 8739e1c3bef653415ad4b9b9c318ccfa76c43da6 Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 31 Mar 2022 15:00:24 -0700 -Subject: [PATCH] Check for clang before guessing gcc or lcc - -clang --version can yield a string like below when its installed into -such a directory - -clang version 14.0.0 (https://github.com/llvm/llvm-project 3f43d803382d57e3fc010ca19833077d1023e9c9) -Target: aarch64-yoe-linux -Thread model: posix -InstalledDir: /mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux/gnome-text-editor/42.0-r0/recipe-sysroot-native/usr/bin/aarch64-yoe-linux - -as you can see InstallDir has 'xt-' subtring and this trips the check to -guess gcc - -if 'Free Software Foundation' in out or 'xt-' in out: - -Therefore, check if compiler is clang then there is no point of running -this check anyway. - -Upstream-Status: Submitted [https://github.com/mesonbuild/meson/pull/10218] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - mesonbuild/compilers/detect.py | 15 ++++++++------- - 1 file changed, 8 insertions(+), 7 deletions(-) - -diff --git a/mesonbuild/compilers/detect.py b/mesonbuild/compilers/detect.py -index 53948b01a..ba335cf39 100644 ---- a/mesonbuild/compilers/detect.py -+++ b/mesonbuild/compilers/detect.py -@@ -427,13 +427,14 @@ def _detect_c_or_cpp_compiler(env: 'Environment', lang: str, for_machine: Machin - version = search_version(out) - - guess_gcc_or_lcc: T.Optional[str] = None -- if 'Free Software Foundation' in out or 'xt-' in out: -- guess_gcc_or_lcc = 'gcc' -- if 'e2k' in out and 'lcc' in out: -- guess_gcc_or_lcc = 'lcc' -- if 'Microchip Technology' in out: -- # this output has "Free Software Foundation" in its version -- guess_gcc_or_lcc = None -+ if not 'clang' in compiler_name: -+ if 'Free Software Foundation' in out or 'xt-' in out: -+ guess_gcc_or_lcc = 'gcc' -+ if 'e2k' in out and 'lcc' in out: -+ guess_gcc_or_lcc = 'lcc' -+ if 'Microchip Technology' in out: -+ # this output has "Free Software Foundation" in its version -+ guess_gcc_or_lcc = None - - if guess_gcc_or_lcc: - defines = _get_gnu_compiler_defines(compiler) --- -2.35.1 - diff --git a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch index 848dccfbe7..8ea7c35950 100644 --- a/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch +++ b/meta/recipes-devtools/meson/meson/0001-Make-CPU-family-warnings-fatal.patch @@ -1,4 +1,4 @@ -From 6c4eef1d92e9e42fdbc888365cab3c95fb33c605 Mon Sep 17 00:00:00 2001 +From b77cbe67df5fa0998946503f207c256ee740bb5f Mon Sep 17 00:00:00 2001 From: Ross Burton <ross.burton@intel.com> Date: Tue, 3 Jul 2018 13:59:09 +0100 Subject: [PATCH] Make CPU family warnings fatal @@ -7,15 +7,15 @@ Upstream-Status: Inappropriate [OE specific] Signed-off-by: Ross Burton <ross.burton@intel.com> --- - mesonbuild/envconfig.py | 2 +- - mesonbuild/environment.py | 4 +--- - 2 files changed, 2 insertions(+), 4 deletions(-) + mesonbuild/envconfig.py | 4 ++-- + mesonbuild/environment.py | 6 ++---- + 2 files changed, 4 insertions(+), 6 deletions(-) -Index: meson-0.60.2/mesonbuild/envconfig.py -=================================================================== ---- meson-0.60.2.orig/mesonbuild/envconfig.py -+++ meson-0.60.2/mesonbuild/envconfig.py -@@ -266,8 +266,8 @@ class MachineInfo(HoldableObject): +diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py +index 07f1229..a35c356 100644 +--- a/mesonbuild/envconfig.py ++++ b/mesonbuild/envconfig.py +@@ -285,8 +285,8 @@ class MachineInfo(HoldableObject): 'but is missing {}.'.format(minimum_literal - set(literal))) cpu_family = literal['cpu_family'] @@ -26,13 +26,13 @@ Index: meson-0.60.2/mesonbuild/envconfig.py endian = literal['endian'] if endian not in ('little', 'big'): -Index: meson-0.60.2/mesonbuild/environment.py -=================================================================== ---- meson-0.60.2.orig/mesonbuild/environment.py -+++ meson-0.60.2/mesonbuild/environment.py -@@ -354,10 +354,8 @@ def detect_cpu_family(compilers: Compile - if any_compiler_has_define(compilers, '__64BIT__'): - trial = 'ppc64' +diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py +index 2ba2054..d798e3b 100644 +--- a/mesonbuild/environment.py ++++ b/mesonbuild/environment.py +@@ -359,10 +359,8 @@ def detect_cpu_family(compilers: CompilersDict) -> str: + if compilers and not any_compiler_has_define(compilers, '__mips64'): + trial = 'mips' - if trial not in known_cpu_families: - mlog.warning(f'Unknown CPU family {trial!r}, please report this at ' diff --git a/meta/recipes-devtools/meson/meson/0001-is_debianlike-always-return-False.patch b/meta/recipes-devtools/meson/meson/0001-is_debianlike-always-return-False.patch deleted file mode 100644 index 83c4782a61..0000000000 --- a/meta/recipes-devtools/meson/meson/0001-is_debianlike-always-return-False.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 667b9ede638677fb37911306937ea62f05897581 Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex@linutronix.de> -Date: Mon, 18 Oct 2021 15:55:59 +0200 -Subject: [PATCH] is_debianlike(): always return False - -Otherwise, host contamination happens. - -Upstream-Status: Inappropriate [oe-core specific] -Signed-off-by: Alexander Kanavin <alex@linutronix.de> ---- - mesonbuild/mesonlib/universal.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/mesonbuild/mesonlib/universal.py b/mesonbuild/mesonlib/universal.py -index d670d04..47d1b52 100644 ---- a/mesonbuild/mesonlib/universal.py -+++ b/mesonbuild/mesonlib/universal.py -@@ -651,7 +651,7 @@ def is_cygwin() -> bool: - - - def is_debianlike() -> bool: -- return os.path.isfile('/etc/debian_version') -+ return False - - - def is_dragonflybsd() -> bool: diff --git a/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch b/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch index f01a667818..2e0a4b1bbe 100644 --- a/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch +++ b/meta/recipes-devtools/meson/meson/0001-python-module-do-not-manipulate-the-environment-when.patch @@ -1,4 +1,4 @@ -From 2e9582167bf9d3273004edb2637310531f0155ab Mon Sep 17 00:00:00 2001 +From e85683698aa3556bf14fc6d35f2c067f16af520b Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Mon, 19 Nov 2018 14:24:26 +0100 Subject: [PATCH] python module: do not manipulate the environment when calling @@ -8,30 +8,30 @@ Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> --- - mesonbuild/modules/python.py | 6 +----- + mesonbuild/dependencies/python.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) -diff --git a/mesonbuild/modules/python.py b/mesonbuild/modules/python.py -index 3bbccd1..fda7a25 100644 ---- a/mesonbuild/modules/python.py -+++ b/mesonbuild/modules/python.py -@@ -277,9 +277,6 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice', - # there is no LIBPC, so we can't search in it - return NotFoundDependency('python', env) +diff --git a/mesonbuild/dependencies/python.py b/mesonbuild/dependencies/python.py +index 9aea6bd..8c13ede 100644 +--- a/mesonbuild/dependencies/python.py ++++ b/mesonbuild/dependencies/python.py +@@ -380,9 +380,6 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice', + empty.name = 'python' + return empty -- old_pkg_libdir = os.environ.pop('PKG_CONFIG_LIBDIR', None) -- old_pkg_path = os.environ.pop('PKG_CONFIG_PATH', None) -- os.environ['PKG_CONFIG_LIBDIR'] = pkg_libdir - try: - return PythonPkgConfigDependency(name, env, kwargs, installation, True) - finally: -@@ -288,8 +285,7 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice', - os.environ[name] = value - elif name in os.environ: - del os.environ[name] -- set_env('PKG_CONFIG_LIBDIR', old_pkg_libdir) -- set_env('PKG_CONFIG_PATH', old_pkg_path) -+ pass +- old_pkg_libdir = os.environ.pop('PKG_CONFIG_LIBDIR', None) +- old_pkg_path = os.environ.pop('PKG_CONFIG_PATH', None) +- os.environ['PKG_CONFIG_LIBDIR'] = pkg_libdir + try: + return PythonPkgConfigDependency(name, env, kwargs, installation, True) + finally: +@@ -391,8 +388,7 @@ def python_factory(env: 'Environment', for_machine: 'MachineChoice', + os.environ[name] = value + elif name in os.environ: + del os.environ[name] +- set_env('PKG_CONFIG_LIBDIR', old_pkg_libdir) +- set_env('PKG_CONFIG_PATH', old_pkg_path) ++ pass - candidates.append(functools.partial(wrap_in_pythons_pc_dir, pkg_name, env, kwargs, installation)) - # We only need to check both, if a python install has a LIBPC. It might point to the wrong location, + candidates.append(functools.partial(wrap_in_pythons_pc_dir, pkg_name, env, kwargs, installation)) + # We only need to check both, if a python install has a LIBPC. It might point to the wrong location, diff --git a/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch b/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch index dcc1ce9c27..a8396f30bb 100644 --- a/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch +++ b/meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch @@ -1,21 +1,22 @@ -From 656bf55fed01df2d2e2ad6d9d9887173cb16b85c Mon Sep 17 00:00:00 2001 +From 6fb8db54929b40e1fd7ac949ef44f0d37df0bae9 Mon Sep 17 00:00:00 2001 From: Peter Kjellerstedt <pkj@axis.com> Date: Thu, 26 Jul 2018 16:32:49 +0200 -Subject: [PATCH 2/2] Support building allarch recipes again +Subject: [PATCH] Support building allarch recipes again This registers "allarch" as a known CPU family. Upstream-Status: Inappropriate [OE specific] Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> + --- mesonbuild/envconfig.py | 1 + 1 file changed, 1 insertion(+) diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py -index 4d58c91..ff01ad1 100644 +index a35c356..436355f 100644 --- a/mesonbuild/envconfig.py +++ b/mesonbuild/envconfig.py -@@ -36,6 +36,7 @@ from pathlib import Path +@@ -38,6 +38,7 @@ from pathlib import Path known_cpu_families = ( @@ -23,6 +24,3 @@ index 4d58c91..ff01ad1 100644 'aarch64', 'alpha', 'arc', --- -2.24.0 - diff --git a/meta/recipes-devtools/meson/meson/disable-rpath-handling.patch b/meta/recipes-devtools/meson/meson/disable-rpath-handling.patch deleted file mode 100644 index 7aaed8b4a3..0000000000 --- a/meta/recipes-devtools/meson/meson/disable-rpath-handling.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 18600f7a1cddf23aeabd188f86e66983f27ccfe3 Mon Sep 17 00:00:00 2001 -From: Richard Purdie <richard.purdie@linuxfoundation.org> -Date: Fri, 23 Nov 2018 15:28:28 +0000 -Subject: [PATCH] meson: Disable rpath stripping at install time - -We need to allow our rpaths generated through the compiler flags to make it into -our binaries. Therefore disable the meson manipulations of these unless there -is a specific directive to do something differently in the project. - -RP 2018/11/23 - -Upstream-Status: Submitted [https://github.com/mesonbuild/meson/issues/2567] ---- - mesonbuild/minstall.py | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/mesonbuild/minstall.py b/mesonbuild/minstall.py -index 7d0da13..17d50db 100644 ---- a/mesonbuild/minstall.py -+++ b/mesonbuild/minstall.py -@@ -718,8 +718,11 @@ class Installer: - if file_copied: - self.did_install_something = True - try: -- self.fix_rpath(outname, t.rpath_dirs_to_remove, install_rpath, final_path, -- install_name_mappings, verbose=False) -+ if install_rpath: -+ self.fix_rpath(outname, t.rpath_dirs_to_remove, install_rpath, final_path, -+ install_name_mappings, verbose=False) -+ else: -+ print("RPATH changes at install time disabled") - except SystemExit as e: - if isinstance(e.code, int) and e.code == 0: - pass --- -2.20.1 - diff --git a/meta/recipes-devtools/meson/meson/meson-wrapper b/meta/recipes-devtools/meson/meson/meson-wrapper index 8fafaad975..7455985297 100755 --- a/meta/recipes-devtools/meson/meson/meson-wrapper +++ b/meta/recipes-devtools/meson/meson/meson-wrapper @@ -1,11 +1,11 @@ #!/bin/sh if [ -z "$OECORE_NATIVE_SYSROOT" ]; then - echo "OECORE_NATIVE_SYSROOT not set; are you in a Yocto SDK environment?" >&2 + exec "meson.real" "$@" fi if [ -z "$SSL_CERT_DIR" ]; then - export SSL_CERT_DIR="${OECORE_NATIVE_SYSROOT}/etc/ssl/certs/" + export SSL_CERT_DIR="$OECORE_NATIVE_SYSROOT/etc/ssl/certs/" fi # If these are set to a cross-compile path, meson will get confused and try to @@ -13,7 +13,19 @@ fi # config is already in meson.cross. unset CC CXX CPP LD AR NM STRIP +case "$1" in +setup|configure|dist|install|introspect|init|test|wrap|subprojects|rewrite|compile|devenv|env2mfile|help) MESON_CMD="$1" ;; +*) echo meson-wrapper: Implicit setup command assumed; MESON_CMD=setup ;; +esac + +if [ "$MESON_CMD" = "setup" ]; then + MESON_SETUP_OPTS=" \ + --cross-file="$OECORE_NATIVE_SYSROOT/usr/share/meson/${TARGET_PREFIX}meson.cross" \ + --native-file="$OECORE_NATIVE_SYSROOT/usr/share/meson/meson.native" \ + " + echo meson-wrapper: Running meson with setup options: \"$MESON_SETUP_OPTS\" +fi + exec "$OECORE_NATIVE_SYSROOT/usr/bin/meson.real" \ - --cross-file "${OECORE_NATIVE_SYSROOT}/usr/share/meson/${TARGET_PREFIX}meson.cross" \ - --native-file "${OECORE_NATIVE_SYSROOT}/usr/share/meson/meson.native" \ - "$@" + "$@" \ + $MESON_SETUP_OPTS diff --git a/meta/recipes-devtools/meson/meson_0.62.1.bb b/meta/recipes-devtools/meson/meson_1.3.1.bb index dabdcaab01..9cc0cc31ab 100644 --- a/meta/recipes-devtools/meson/meson_0.62.1.bb +++ b/meta/recipes-devtools/meson/meson_1.3.1.bb @@ -7,22 +7,18 @@ interface for modern software development tools and practices." LICENSE = "Apache-2.0" LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57" -SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${PV}.tar.gz \ +GITHUB_BASE_URI = "https://github.com/mesonbuild/meson/releases/" +SRC_URI = "${GITHUB_BASE_URI}/download/${PV}/meson-${PV}.tar.gz \ file://meson-setup.py \ file://meson-wrapper \ file://0001-python-module-do-not-manipulate-the-environment-when.patch \ - file://disable-rpath-handling.patch \ file://0001-Make-CPU-family-warnings-fatal.patch \ file://0002-Support-building-allarch-recipes-again.patch \ - file://0001-is_debianlike-always-return-False.patch \ - file://0001-Check-for-clang-before-guessing-gcc-or-lcc.patch \ " -SRC_URI[sha256sum] = "a0f5caa1e70da12d5e63aa6a9504273759b891af36c8d87de381a4ed1380e845" +SRC_URI[sha256sum] = "6020568bdede1643d4fb41e28215be38eff5d52da28ac7d125457c59e0032ad7" +UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)$" -UPSTREAM_CHECK_URI = "https://github.com/mesonbuild/meson/releases" -UPSTREAM_CHECK_REGEX = "meson-(?P<pver>\d+(\.\d+)+)\.tar" - -inherit python_setuptools_build_meta +inherit python_setuptools_build_meta github-releases RDEPENDS:${PN} = "ninja python3-modules python3-pkg-resources" @@ -35,7 +31,7 @@ do_install:append () { # Upstream is discussing ways to solve the issue properly, until then let's # just not install the problematic files. # More info: http://benno.id.au/blog/2013/01/15/python-determinism - rm ${D}${libdir}/python*/site-packages/mesonbuild/dependencies/__pycache__/mpi.cpython* + rm -f ${D}${libdir}/python*/site-packages/mesonbuild/dependencies/__pycache__/mpi.cpython* } BBCLASSEXTEND = "native nativesdk" @@ -69,13 +65,17 @@ def generate_native_link_template(d): loader = 'ld-linux-aarch64.so.1' elif 'ppc64le' in build_arch: loader = 'ld64.so.2' + elif 'loongarch64' in build_arch: + loader = 'ld-linux-loongarch-lp64d.so.1' + elif 'riscv64' in build_arch: + loader = 'ld-linux-riscv64-lp64d.so.1' if loader: val += ['-Wl,--dynamic-linker=@{OECORE_NATIVE_SYSROOT}${base_libdir_native}/' + loader] return repr(val) -do_install:append:class-nativesdk() { +install_templates() { install -d ${D}${datadir}/meson cat >${D}${datadir}/meson/meson.native.template <<EOF @@ -117,11 +117,19 @@ needs_exe_wrapper = true sys_root = @OECORE_TARGET_SYSROOT [host_machine] -system = '${SDK_OS}' -cpu_family = '${@meson_cpu_family("SDK_ARCH", d)}' -cpu = '${SDK_ARCH}' -endian = '${@meson_endian("SDK", d)}' +system = '$host_system' +cpu_family = '$host_cpu_family' +cpu = '$host_cpu' +endian = '$host_endian' EOF +} + +do_install:append:class-nativesdk() { + host_system=${SDK_OS} + host_cpu_family=${@meson_cpu_family("SDK_ARCH", d)} + host_cpu=${SDK_ARCH} + host_endian=${@meson_endian("SDK", d)} + install_templates install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d install -m 0755 ${WORKDIR}/meson-setup.py ${D}${SDKPATHNATIVE}/post-relocate-setup.d/ @@ -132,3 +140,19 @@ EOF } FILES:${PN}:append:class-nativesdk = "${datadir}/meson ${SDKPATHNATIVE}" + +do_install:append:class-native() { + host_system=${HOST_OS} + host_cpu_family=${@meson_cpu_family("HOST_ARCH", d)} + host_cpu=${HOST_ARCH} + host_endian=${@meson_endian("HOST", d)} + install_templates + + install -d ${D}${datadir}/post-relocate-setup.d + install -m 0755 ${WORKDIR}/meson-setup.py ${D}${datadir}/post-relocate-setup.d/ + + # We need to wrap the real meson with a thin wrapper that substitues native/cross files + # when running in a direct SDK environment. + mv ${D}${bindir}/meson ${D}${bindir}/meson.real + install -m 0755 ${WORKDIR}/meson-wrapper ${D}${bindir}/meson +} |