Skip to contentSkip to conversation

meson: revert changes which shouldn't have been submitted

PATCH In review Ross Burton 2 participants 10 messages Jun 26, 2017 – Jun 28, 2017 Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#0 lore raw

PATCH 1/8 meson: revert changes which shouldn't have been submitted

From Adam Foltzer:

Apologies, this line was inadvertently committed. It was a fix I tried before learning that adding TARGET_CC_ARCH was the solution to linking the wrong ld.so.

---
 meta-oe/classes/meson.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/classes/meson.bbclass +1 -1
index 2c48a7eb9..cc9bc505b 100644
@@ -75,7 +75,7 @@ endian = '${MESON_HOST_ENDIAN}'
 [target_machine]
 system = '${TARGET_OS}'
 cpu_family = '${TARGET_ARCH}'
-cpu = '${TUNE_PKGARCH}'
+cpu = '${TARGET_ARCH}'
 endian = '${MESON_TARGET_ENDIAN}'
 EOF
 }
Signature · 1 line
2.11.0
#1 lore raw

PATCH 2/8 Revert "meson: fix build/host confusion for bbclass"

This patch was incorrect: meson and autotools (thus OE) don't have conflicting terminology, and using HOST_* for the host_machine variables is correct.

This reverts commit 77eae90ef5ca3f9a4bdf5727a29713dd2b215165.

---
 meta-oe/classes/meson.bbclass | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta-oe/classes/meson.bbclass +3 -3
index cc9bc505b..72f96c541 100644
@@ -67,9 +67,9 @@ cpp_args = [${@meson_array('MESON_C_ARGS', d)}]
 cpp_link_args = [${@meson_array('MESON_LINK_ARGS', d)}]
 
 [host_machine]
-system = '${BUILD_OS}'
-cpu_family = '${BUILD_ARCH}'
-cpu = '${BUILD_ARCH}'
+system = '${HOST_OS}'
+cpu_family = '${HOST_ARCH}'
+cpu = '${HOST_ARCH}'
 endian = '${MESON_HOST_ENDIAN}'
 
 [target_machine]
Signature · 1 line
2.11.0
#2 lore raw

PATCH 3/8 meson: don't pass localedir

In reply to Ross Burton

For historic reasons the localedir directory is where binary locales are stored (/usr/lib/locale) , not where application translations belong (typically, /usr/share/locale). Don't pass localedir explicitly, and let Meson use the default of $datadir/locale to match the behaviour of autotools.bbclass and the expectations of the system.

---
 meta-oe/classes/meson.bbclass | 1 -
 1 file changed, 1 deletion(-)
meta-oe/classes/meson.bbclass +0 -1
index 72f96c541..8f384c127 100644
@@ -27,7 +27,6 @@ MESONOPTS = " --prefix ${prefix} \
               --includedir ${@noprefix('includedir', d)} \
               --mandir ${@noprefix('mandir', d)} \
               --infodir ${@noprefix('infodir', d)} \
-              --localedir ${@noprefix('localedir', d)} \
               --sysconfdir ${sysconfdir} \
               --localstatedir ${localstatedir} \
               --sharedstatedir ${sharedstatedir}"
Signature · 1 line
2.11.0
#3 lore raw

PATCH 4/8 meson: set RDEPENDS globally instead of just for target

In reply to Ross Burton

Now that python3-native has the correct provides, the RDEPENDS can be set globally instead of just for target (which helps a future nativesdk-meson package).

---
 meta-oe/recipes-devtools/meson/meson_0.40.1.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-devtools/meson/meson_0.40.1.bb +1 -1
index a2c5e4d39..ab54b8c79 100644
@@ -14,6 +14,6 @@ S = "${WORKDIR}/git"
 
 inherit setuptools3
 
-RDEPENDS_${PN}_class-target = "ninja python3-core python3-modules"
+RDEPENDS_${PN} = "ninja python3-core python3-modules"
 
 BBCLASSEXTEND = "native"
Signature · 1 line
2.11.0
#4 lore raw

PATCH 5/8 meson: export PKG_CONFIG to use pkg-config-native for native builds

In reply to Ross Burton

By default Meson uses 'pkg-config' in native builds but as that is the cross pkg-config, export PKG_CONFIG to use the correct pkg-config-native binary.

---
 meta-oe/classes/meson.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta-oe/classes/meson.bbclass +1 -0
index 8f384c127..b5b2b3b7e 100644
@@ -14,6 +14,7 @@ export CC = "${BUILD_CC}"
 export CXX = "${BUILD_CXX}"
 export LD = "${BUILD_LD}"
 export AR = "${BUILD_AR}"
+export PKG_CONFIG = "pkg-config-native"
 
 def noprefix(var, d):
     return d.getVar(var, True).replace(d.getVar('prefix', True) + '/', '', 1)
Signature · 1 line
2.11.0
#5 lore raw

PATCH 6/8 meson: remove redundant patch

In reply to Ross Burton

This patch doesn't apply to 0.40.1 and hopefully the PKG_CONFIG patch fixes the problem with the wrong pkg-config binary being invoked.

---
 .../meson/meson/native_bindir.patch                | 52 ----------------------
 1 file changed, 52 deletions(-)
 delete mode 100644 meta-oe/recipes-devtools/meson/meson/native_bindir.patch
meta-oe/recipes-devtools/meson/meson/native_bindir.patch deleted +0 -52
deleted file mode 100644
index 53eeff7b6..000000000
@@ -1,52 +0,0 @@
-diff --git a/mesonbuild/dependencies.py b/mesonbuild/dependencies.py
-index da73a57b7ecd..22100f69c580 100644
---- a/mesonbuild/dependencies.py
-+++ b/mesonbuild/dependencies.py
-@@ -65,7 +65,7 @@ class Dependency():
-     def need_threads(self):
-         return False
- 
--    def get_pkgconfig_variable(self, variable_name):
-+    def get_pkgconfig_variable(self, variable_name, use_native=False):
-         raise MesonException('Tried to get a pkg-config variable from a non-pkgconfig dependency.')
- 
- class InternalDependency(Dependency):
-@@ -177,8 +177,12 @@ class PkgConfigDependency(Dependency):
-         return s.format(self.__class__.__name__, self.name, self.is_found,
-                         self.version_reqs)
- 
--    def _call_pkgbin(self, args):
--        p, out = Popen_safe([self.pkgbin] + args, env=os.environ)[0:2]
-+    def _call_pkgbin(self, args, use_native=False):
-+        if use_native:
-+            pkgbin = [self.pkgbin + "-native"]
-+        else:
-+            pkgbin = [self.pkgbin]
-+        p, out = Popen_safe(pkgbin + args, env=os.environ)[0:2]
-         return (p.returncode, out.strip())
- 
-     def _set_cargs(self):
-@@ -212,8 +216,8 @@ class PkgConfigDependency(Dependency):
-                 self.is_libtool = True
-             self.libs.append(lib)
- 
--    def get_pkgconfig_variable(self, variable_name):
--        ret, out = self._call_pkgbin(['--variable=' + variable_name, self.name])
-+    def get_pkgconfig_variable(self, variable_name, use_native=False):
-+        ret, out = self._call_pkgbin(['--variable=' + variable_name, self.name], use_native=use_native)
-         variable = ''
-         if ret != 0:
-             if self.required:
-@@ -933,10 +937,10 @@ class QtBaseDependency(Dependency):
-             corekwargs = {'required': 'false', 'silent': 'true'}
-             core = PkgConfigDependency(self.qtpkgname + 'Core', env, corekwargs)
-         # Used by self.compilers_detect()
--        self.bindir = core.get_pkgconfig_variable('host_bins')
-+        self.bindir = core.get_pkgconfig_variable('host_bins', use_native=True)
-         if not self.bindir:
-             # If exec_prefix is not defined, the pkg-config file is broken
--            prefix = core.get_pkgconfig_variable('exec_prefix')
-+            prefix = core.get_pkgconfig_variable('exec_prefix', use_native=True)
-             if prefix:
-                 self.bindir = os.path.join(prefix, 'bin')
- 
Signature · 1 line
2.11.0
#6 lore raw

PATCH 7/8 meson: use tarball instead of git checkout

In reply to Ross Burton
---
 meta-oe/recipes-devtools/meson/meson_0.40.1.bb | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
meta-oe/recipes-devtools/meson/meson_0.40.1.bb +3 -7
index ab54b8c79..f33256a10 100644
@@ -4,13 +4,9 @@ SUMMARY = "A high performance build system"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
 
-SRC_URI = " \
-    git://github.com/mesonbuild/meson.git \
-"
-
-SRCREV = "b25d3e4d3f2b4d37029a507cc089bdde643c6240"
-
-S = "${WORKDIR}/git"
+SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}/${BP}.tar.gz"
+SRC_URI[md5sum] = "8475b19d5f5f3bd5c40f4bb1f31b93f3"
+SRC_URI[sha256sum] = "890ce46e713ea0d061f8203c99fa7d38645354a62e4c207c38ade18db852cbf5"
 
 inherit setuptools3
 
Signature · 1 line
2.11.0
#7 lore raw

Re: [meta-oe][PATCH 7/8] meson: use tarball instead of git checkout

I still don't trust github archives/releases, can we skip this one?

Quoted 38 lines · Ross Burton
---
 meta-oe/recipes-devtools/meson/meson_0.40.1.bb | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
meta-oe/recipes-devtools/meson/meson_0.40.1.bb +1 -7
index ab54b8c79..f33256a10 100644
@@ -4,13 +4,9 @@ SUMMARY = "A high performance build system"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
 
-SRC_URI = " \
-    git://github.com/mesonbuild/meson.git \
-"
-
-SRCREV = "b25d3e4d3f2b4d37029a507cc089bdde643c6240"
-
-S = "${WORKDIR}/git"
+SRC_URI = "https://github.com/mesonbuild/meson/releases/

download/${PV}/${BP}.tar.gz"

meta-oe/recipes-devtools/meson/meson_0.40.1.bb +2 -0
+SRC_URI[md5sum] = "8475b19d5f5f3bd5c40f4bb1f31b93f3"
+SRC_URI[sha256sum] = "890ce46e713ea0d061f8203c99fa7d

38645354a62e4c207c38ade18db852cbf5"

inherit setuptools3

--
2.11.0

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#8 lore raw

Re: [meta-oe][PATCH 7/8] meson: use tarball instead of git checkout

That's not a generated archive but an uploaded tarball.

Ross

Quoted 45 lines · Martin Jansa

I still don't trust github archives/releases, can we skip this one?

Quoted 38 lines · Ross Burton
---
 meta-oe/recipes-devtools/meson/meson_0.40.1.bb | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
meta-oe/recipes-devtools/meson/meson_0.40.1.bb +1 -7
index ab54b8c79..f33256a10 100644
@@ -4,13 +4,9 @@ SUMMARY = "A high performance build system"
 LICENSE = "Apache-2.0"
 LIC_FILES_CHKSUM = "file://COPYING;md5=3b83ef96387f14655fc854ddc3c6bd57"
 
-SRC_URI = " \
-    git://github.com/mesonbuild/meson.git \
-"
-
-SRCREV = "b25d3e4d3f2b4d37029a507cc089bdde643c6240"
-
-S = "${WORKDIR}/git"
+SRC_URI = "https://github.com/mesonbuild/meson/releases/download/${PV}

/${BP}.tar.gz"

meta-oe/recipes-devtools/meson/meson_0.40.1.bb +2 -0
+SRC_URI[md5sum] = "8475b19d5f5f3bd5c40f4bb1f31b93f3"
+SRC_URI[sha256sum] = "890ce46e713ea0d061f8203c99fa7

d38645354a62e4c207c38ade18db852cbf5"

inherit setuptools3

--
2.11.0

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#9 lore raw

PATCH 8/8 meson: set native tool flag variables

In reply to Ross Burton

As well as setting CC/CXX, export CFLAGS/CXXFLAGS and so on.

---
 meta-oe/classes/meson.bbclass | 4 ++++
 1 file changed, 4 insertions(+)
meta-oe/classes/meson.bbclass +4 -0
index b5b2b3b7e..7eeff4210 100644
@@ -10,9 +10,13 @@ do_configure[cleandirs] = "${B}"
 MESON_SOURCEPATH = "${S}"
 
 # These variables in the environment override the *native* tools, not the cross.
+export CPPFLAGS = "${BUILD_CPPFLAGS}"
 export CC = "${BUILD_CC}"
+export CFLAGS = "${BUILD_CFLAGS}"
 export CXX = "${BUILD_CXX}"
+export CXXFLAGS = "${BUILD_CXXFLAGS}"
 export LD = "${BUILD_LD}"
+export LDFLAGS = "${BUILD_LDFLAGS}"
 export AR = "${BUILD_AR}"
 export PKG_CONFIG = "pkg-config-native"
 
Signature · 1 line
2.11.0