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 | 33 | ||||
-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 | 49 | ||||
-rw-r--r-- | meta/recipes-devtools/meson/meson/0002-Support-building-allarch-recipes-again.patch | 11 | ||||
-rw-r--r-- | meta/recipes-devtools/meson/meson/disable-rpath-handling.patch | 37 | ||||
-rwxr-xr-x | meta/recipes-devtools/meson/meson/meson-wrapper | 20 | ||||
-rw-r--r-- | meta/recipes-devtools/meson/meson_1.4.0.bb (renamed from meta/recipes-devtools/meson/meson_0.63.0.bb) | 32 |
8 files changed, 76 insertions, 188 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..94129b2f25 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,21 +1,20 @@ -From 6c4eef1d92e9e42fdbc888365cab3c95fb33c605 Mon Sep 17 00:00:00 2001 +From c61c93f43b70ba0670d41e841bff9f2a7186cc2f 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 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 0e9cd23..b44e60c 100644 +--- a/mesonbuild/envconfig.py ++++ b/mesonbuild/envconfig.py +@@ -276,8 +276,8 @@ class MachineInfo(HoldableObject): 'but is missing {}.'.format(minimum_literal - set(literal))) cpu_family = literal['cpu_family'] @@ -26,13 +25,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 af69f64..248d6dd 100644 +--- a/mesonbuild/environment.py ++++ b/mesonbuild/environment.py +@@ -379,10 +379,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..9f3f516a5c 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 b4c0602a56d3517ab66b98a7dbb69defe77d29a3 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 @@ -6,32 +6,31 @@ Subject: [PATCH] python module: do not manipulate the environment when calling 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 b9b17f8..a305afb 100644 +--- a/mesonbuild/dependencies/python.py ++++ b/mesonbuild/dependencies/python.py +@@ -381,9 +381,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: +@@ -392,8 +389,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..fa5ea57d5b 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,7 +1,7 @@ -From 656bf55fed01df2d2e2ad6d9d9887173cb16b85c Mon Sep 17 00:00:00 2001 +From 7f69bfabb87d311d7409ea6699f7dee8e9b3a95b 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. @@ -12,10 +12,10 @@ Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> 1 file changed, 1 insertion(+) diff --git a/mesonbuild/envconfig.py b/mesonbuild/envconfig.py -index 4d58c91..ff01ad1 100644 +index b44e60c..c70e8cb 100644 --- a/mesonbuild/envconfig.py +++ b/mesonbuild/envconfig.py -@@ -36,6 +36,7 @@ from pathlib import Path +@@ -28,6 +28,7 @@ from pathlib import Path known_cpu_families = ( @@ -23,6 +23,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 c62007f507..7455985297 100755 --- a/meta/recipes-devtools/meson/meson/meson-wrapper +++ b/meta/recipes-devtools/meson/meson/meson-wrapper @@ -5,7 +5,7 @@ if [ -z "$OECORE_NATIVE_SYSROOT" ]; then 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.63.0.bb b/meta/recipes-devtools/meson/meson_1.4.0.bb index 890f47506f..5db100ff1c 100644 --- a/meta/recipes-devtools/meson/meson_0.63.0.bb +++ b/meta/recipes-devtools/meson/meson_1.4.0.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] = "3b51d451744c2bc71838524ec8d96cd4f8c4793d5b8d5d0d0a9c8a4f7c94cd6f" +SRC_URI[sha256sum] = "8fd6630c25c27f1489a8a0392b311a60481a3c161aa699b330e25935b750138d" +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,6 +65,10 @@ 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] @@ -86,7 +86,7 @@ ar = ${@meson_array('BUILD_AR', d)} nm = ${@meson_array('BUILD_NM', d)} strip = ${@meson_array('BUILD_STRIP', d)} readelf = ${@meson_array('BUILD_READELF', d)} -pkgconfig = 'pkg-config-native' +pkg-config = 'pkg-config-native' [built-in options] c_args = ['-isystem@{OECORE_NATIVE_SYSROOT}${includedir_native}' , ${@var_list2str('BUILD_OPTIMIZATION', d)}] @@ -104,7 +104,7 @@ cpp = @CXX ar = @AR nm = @NM strip = @STRIP -pkgconfig = 'pkg-config' +pkg-config = 'pkg-config' [built-in options] c_args = @CFLAGS @@ -132,11 +132,11 @@ do_install:append:class-nativesdk() { install_templates install -d ${D}${SDKPATHNATIVE}/post-relocate-setup.d - install -m 0755 ${WORKDIR}/meson-setup.py ${D}${SDKPATHNATIVE}/post-relocate-setup.d/ + install -m 0755 ${UNPACKDIR}/meson-setup.py ${D}${SDKPATHNATIVE}/post-relocate-setup.d/ # We need to wrap the real meson with a thin env setup wrapper. mv ${D}${bindir}/meson ${D}${bindir}/meson.real - install -m 0755 ${WORKDIR}/meson-wrapper ${D}${bindir}/meson + install -m 0755 ${UNPACKDIR}/meson-wrapper ${D}${bindir}/meson } FILES:${PN}:append:class-nativesdk = "${datadir}/meson ${SDKPATHNATIVE}" @@ -149,10 +149,10 @@ do_install:append:class-native() { install_templates install -d ${D}${datadir}/post-relocate-setup.d - install -m 0755 ${WORKDIR}/meson-setup.py ${D}${datadir}/post-relocate-setup.d/ + install -m 0755 ${UNPACKDIR}/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 + install -m 0755 ${UNPACKDIR}/meson-wrapper ${D}${bindir}/meson } |