Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [RFC v3 1/4] meson: bump version to 0.47.1
@ 2018-07-19 20:43 Peter Seiderer
  2018-07-19 20:43 ` [Buildroot] [RFC v3 2/4] meson: change from global to per package cross-compilation.conf Peter Seiderer
                   ` (4 more replies)
  0 siblings, 5 replies; 19+ messages in thread
From: Peter Seiderer @ 2018-07-19 20:43 UTC (permalink / raw)
  To: buildroot

- delete legacy patch 0001-Only-fix-RPATH-if-install_rpath-is-not-empty.patch
  (no complains from support/scripts/check-host-rpath even without the patch)

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Changes v1 -> v2:
  - new patch

Changes v2 -> v3:
  - check source tar file signature (thanks for the help of
    Baruch Siach and Eric Le Bihan)
  - add comment about patch removable
---
 ...-RPATH-if-install_rpath-is-not-empty.patch | 32 -------------------
 package/meson/meson.hash                      |  6 ++--
 package/meson/meson.mk                        |  2 +-
 3 files changed, 4 insertions(+), 36 deletions(-)
 delete mode 100644 package/meson/0001-Only-fix-RPATH-if-install_rpath-is-not-empty.patch

diff --git a/package/meson/0001-Only-fix-RPATH-if-install_rpath-is-not-empty.patch b/package/meson/0001-Only-fix-RPATH-if-install_rpath-is-not-empty.patch
deleted file mode 100644
index 03c1944258..0000000000
--- a/package/meson/0001-Only-fix-RPATH-if-install_rpath-is-not-empty.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 53e4920038d5562b7b672fec8b9469fc02eef4ad Mon Sep 17 00:00:00 2001
-From: Eric Le Bihan <eric.le.bihan.dev@free.fr>
-Date: Thu, 10 May 2018 21:57:49 +0200
-Subject: [PATCH] Only fix RPATH if install_rpath is not empty
-
-Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
----
- mesonbuild/scripts/meson_install.py | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
-diff --git a/mesonbuild/scripts/meson_install.py b/mesonbuild/scripts/meson_install.py
-index 013f2a00..f7ff1dcc 100644
---- a/mesonbuild/scripts/meson_install.py
-+++ b/mesonbuild/scripts/meson_install.py
-@@ -368,7 +368,13 @@ def install_targets(d):
-                     printed_symlink_error = True
-         if os.path.isfile(outname):
-             try:
--                depfixer.fix_rpath(outname, install_rpath, False)
-+                # Buildroot check-host-rpath script expects RPATH
-+                # But if install_rpath is empty, it will stripped.
-+                # So, preserve it in this case
-+                if install_rpath:
-+                    depfixer.fix_rpath(outname, install_rpath, False)
-+                else:
-+                    print("Skipping RPATH fixing")
-             except SystemExit as e:
-                 if isinstance(e.code, int) and e.code == 0:
-                     pass
--- 
-2.14.3
-
diff --git a/package/meson/meson.hash b/package/meson/meson.hash
index bd9e4114ff..4a4923bd12 100644
--- a/package/meson/meson.hash
+++ b/package/meson/meson.hash
@@ -1,4 +1,4 @@
 # Locally calculated after checking pgp signature
-# https://github.com/mesonbuild/meson/releases/download/0.46.1/meson-0.46.1.tar.gz.asc
-sha256 19497a03e7e5b303d8d11f98789a79aba59b5ad4a81bd00f4d099be0212cee78  meson-0.46.1.tar.gz
-sha256	cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30	COPYING
+# https://github.com/mesonbuild/meson/releases/download/0.47.1/meson-0.47.1.tar.gz.asc
+sha256 d673de79f7bab064190a5ea06140eaa8415efb386d0121ba549f6d66c555ada6 meson-0.47.1.tar.gz
+sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 COPYING
diff --git a/package/meson/meson.mk b/package/meson/meson.mk
index 28c9e6f202..d110e594f5 100644
--- a/package/meson/meson.mk
+++ b/package/meson/meson.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-MESON_VERSION = 0.46.1
+MESON_VERSION = 0.47.1
 MESON_SITE = https://github.com/mesonbuild/meson/releases/download/$(MESON_VERSION)
 MESON_LICENSE = Apache-2.0
 MESON_LICENSE_FILES = COPYING
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [RFC v3 2/4] meson: change from global to per package cross-compilation.conf
  2018-07-19 20:43 [Buildroot] [RFC v3 1/4] meson: bump version to 0.47.1 Peter Seiderer
@ 2018-07-19 20:43 ` Peter Seiderer
  2018-07-22 12:27   ` Eric Le Bihan
  2018-08-16 11:57   ` Thomas Petazzoni
  2018-07-19 20:43 ` [Buildroot] [RFC v3 3/4] libdrm: change to meson build system Peter Seiderer
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 19+ messages in thread
From: Peter Seiderer @ 2018-07-19 20:43 UTC (permalink / raw)
  To: buildroot

Add FOO_MESON_CFLAGS, FOO_MESON_LDFLAGS and FOO_MESON_CXXFLAGS
variables to allow per package additional flags.

Change to buildtype plain as all compiler/linker flags forcing
debug/release are already given via the cross-compilation.conf
file.

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Notes:
  - documentation change for new flags missing
  - use in pkg-meson.mk the same sed/printf for flags quotation mark
    and comma adding

Changes v1 -> v2:
  - no changes

Changes v2 -> v3:
  - no changes
---
 package/meson/cross-compilation.conf.in | 8 ++++----
 package/meson/meson.mk                  | 6 +++---
 package/pkg-meson.mk                    | 9 +++++++--
 3 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/package/meson/cross-compilation.conf.in b/package/meson/cross-compilation.conf.in
index 0eec74087b..6af03314eb 100644
--- a/package/meson/cross-compilation.conf.in
+++ b/package/meson/cross-compilation.conf.in
@@ -11,10 +11,10 @@ strip = '@TARGET_CROSS at strip'
 pkgconfig = '@HOST_DIR@/usr/bin/pkg-config'
 
 [properties]
-c_args = [@TARGET_CFLAGS@]
-c_link_args = [@TARGET_LDFLAGS@]
-cpp_args = [@TARGET_CXXFLAGS@]
-cpp_link_args = [@TARGET_LDFLAGS@]
+c_args = [@TARGET_CFLAGS@ @PKG_TARGET_CFLAGS@]
+c_link_args = [@TARGET_LDFLAGS@ @PKG_TARGET_LDFLAGS@]
+cpp_args = [@TARGET_CXXFLAGS@ @PKG_TARGET_CXXFLAGS@]
+cpp_link_args = [@TARGET_LDFLAGS@ @PKG_TARGET_LDFLAGS@]
 
 [host_machine]
 system = 'linux'
diff --git a/package/meson/meson.mk b/package/meson/meson.mk
index d110e594f5..0f2ee2855d 100644
--- a/package/meson/meson.mk
+++ b/package/meson/meson.mk
@@ -20,7 +20,7 @@ HOST_MESON_SED_CFLAGS = $(if $(TARGET_CFLAGS),`printf '"%s"$(comma) ' $(TARGET_C
 HOST_MESON_SED_LDFLAGS = $(if $(TARGET_LDFLAGS),`printf '"%s"$(comma) ' $(TARGET_LDFLAGS)`)
 HOST_MESON_SED_CXXFLAGS = $(if $(TARGET_CXXFLAGS),`printf '"%s"$(comma) ' $(TARGET_CXXFLAGS)`)
 
-define HOST_MESON_INSTALL_CROSS_CONF
+define HOST_MESON_INSTALL_CROSS_CONF_IN
 	mkdir -p $(HOST_DIR)/etc/meson
 	sed -e "s%@TARGET_CROSS@%$(TARGET_CROSS)%g" \
 	    -e "s%@TARGET_ARCH@%$(ARCH)%g" \
@@ -31,9 +31,9 @@ define HOST_MESON_INSTALL_CROSS_CONF
 	    -e "s%@TARGET_CXXFLAGS@%$(HOST_MESON_SED_CXXFLAGS)%g" \
 	    -e "s%@HOST_DIR@%$(HOST_DIR)%g" \
 	    $(HOST_MESON_PKGDIR)/cross-compilation.conf.in \
-	    > $(HOST_DIR)/etc/meson/cross-compilation.conf
+	    > $(HOST_DIR)/etc/meson/cross-compilation.conf.in
 endef
 
-HOST_MESON_POST_INSTALL_HOOKS += HOST_MESON_INSTALL_CROSS_CONF
+HOST_MESON_POST_INSTALL_HOOKS += HOST_MESON_INSTALL_CROSS_CONF_IN
 
 $(eval $(host-python-package))
diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk
index 507e686068..565e10e8fb 100644
--- a/package/pkg-meson.mk
+++ b/package/pkg-meson.mk
@@ -64,12 +64,17 @@ ifeq ($(4),target)
 define $(2)_CONFIGURE_CMDS
 	rm -rf $$($$(PKG)_SRCDIR)/build
 	mkdir -p $$($$(PKG)_SRCDIR)/build
+	sed -e "s%@PKG_TARGET_CFLAGS@%$$($$(PKG)_MESON_CFLAGS)%g" \
+	    -e "s%@PKG_TARGET_LDFLAGS@%$$($$(PKG)_MESON_LDFLAGS)%g" \
+	    -e "s%@PKG_TARGET_CXXFLAGS@%$$($$(PKG)_MESON_CXXFLAGS)%g" \
+	    $(HOST_DIR)/etc/meson/cross-compilation.conf.in \
+	    > $$($$(PKG)_SRCDIR)/build//cross-compilation.conf
 	PATH=$$(BR_PATH) $$($$(PKG)_CONF_ENV) $$(MESON) \
 		--prefix=/usr \
 		--libdir=lib \
 		--default-library=$(if $(BR2_STATIC_LIBS),static,shared) \
-		--buildtype=$(if $(BR2_ENABLE_DEBUG),debug,release) \
-		--cross-file=$(HOST_DIR)/etc/meson/cross-compilation.conf \
+		--buildtype=plain \
+		--cross-file=$$($$(PKG)_SRCDIR)/build/cross-compilation.conf \
 		$$($$(PKG)_CONF_OPTS) \
 		$$($$(PKG)_SRCDIR) $$($$(PKG)_SRCDIR)/build
 endef
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [RFC v3 3/4] libdrm: change to meson build system
  2018-07-19 20:43 [Buildroot] [RFC v3 1/4] meson: bump version to 0.47.1 Peter Seiderer
  2018-07-19 20:43 ` [Buildroot] [RFC v3 2/4] meson: change from global to per package cross-compilation.conf Peter Seiderer
@ 2018-07-19 20:43 ` Peter Seiderer
  2018-07-22 12:28   ` Eric Le Bihan
  2019-04-07 20:21   ` Thomas Petazzoni
  2018-07-19 20:43 ` [Buildroot] [RFC v3 4/4] libinput: bump version to 1.11.0 and convert to meson build Peter Seiderer
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 19+ messages in thread
From: Peter Seiderer @ 2018-07-19 20:43 UTC (permalink / raw)
  To: buildroot

- remove legacy patch
  0003-configure-Makefile.am-use-pkg-config-to-discover-lib.patch

- add patch to fix meson atomic ops detection
  0003-meson.build-fix-intel-atomics-detection.patch

- add patch to enable static build
  0004-meson.build-enable-static-build.patch

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Notes:
  - convertion from "LIBDRM_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'"
    is missing (maybe meson gets it right (?) or use LIBDRM_MESON_CFLAGS
    to force it)

Changes v1 -> v2:
  - add 0003-meson.build-fix-intel-atomics-detection.patch to fix
    sparc compile

Changes v2 -> v3:
  - fix 0003-meson.build-fix-intel-atomics-detection.patch (linking
    needs main)
  - add 0004-meson.build-enable-static-build.patch to enable static
    compile
---
 ...le.am-use-pkg-config-to-discover-lib.patch | 162 -----------------
 ...on.build-fix-intel-atomics-detection.patch |  35 ++++
 ...0004-meson.build-enable-static-build.patch | 169 ++++++++++++++++++
 package/libdrm/libdrm.mk                      |  71 ++++----
 4 files changed, 236 insertions(+), 201 deletions(-)
 delete mode 100644 package/libdrm/0003-configure-Makefile.am-use-pkg-config-to-discover-lib.patch
 create mode 100644 package/libdrm/0003-meson.build-fix-intel-atomics-detection.patch
 create mode 100644 package/libdrm/0004-meson.build-enable-static-build.patch

diff --git a/package/libdrm/0003-configure-Makefile.am-use-pkg-config-to-discover-lib.patch b/package/libdrm/0003-configure-Makefile.am-use-pkg-config-to-discover-lib.patch
deleted file mode 100644
index 0fbe77ef7c..0000000000
--- a/package/libdrm/0003-configure-Makefile.am-use-pkg-config-to-discover-lib.patch
+++ /dev/null
@@ -1,162 +0,0 @@
-From 57d544ff2f96a26cac07d5be00ff7b67678ae7b8 Mon Sep 17 00:00:00 2001
-From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Date: Mon, 18 Dec 2017 13:08:39 +0100
-Subject: [PATCH] configure/Makefile.am: use pkg-config to discover
- libatomic_ops
-
-The configure script currently tests the availability of libatomic_ops
-by checking the presence of atomic_ops.h. While this is good enough as
-an availability test, it is not sufficient as on some platforms,
-libatomic_ops provides an actual shared library against which we
-should be linked to access libatomic_ops functionality.
-
-Therefore, we instead use PKG_CHECK_MODULES() to test the availability
-of libatomic_ops. Besides testing its availability, this also fills in
-the ATOMIC_OPS_LIBS variable with the list of libraries we need to
-link with to use libatomic_ops.
-
-All Mesa drivers that include xf86atomic.h have been updated to link
-against ATOMIC_OPS_LIBS.
-
-Of course, if we're not using libatomic_ops, ATOMIC_OPS_LIBS is empty,
-and we don't link against it.
-
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Signed-off-by: Peter Seiderer <ps.report@gmx.net>
-[Bernd: PKG_CHECK_MODULES should not fail when libatomic_ops is missing]
-Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
----
- amdgpu/Makefile.am    | 2 +-
- configure.ac          | 2 +-
- etnaviv/Makefile.am   | 3 ++-
- freedreno/Makefile.am | 3 ++-
- intel/Makefile.am     | 3 ++-
- nouveau/Makefile.am   | 2 +-
- omap/Makefile.am      | 2 +-
- radeon/Makefile.am    | 2 +-
- tegra/Makefile.am     | 2 +-
- 9 files changed, 12 insertions(+), 9 deletions(-)
-
-diff --git a/amdgpu/Makefile.am b/amdgpu/Makefile.am
-index a1b0d05c..b2bcceff 100644
---- a/amdgpu/Makefile.am
-+++ b/amdgpu/Makefile.am
-@@ -36,7 +36,7 @@ AM_CPPFLAGS = -DAMDGPU_ASIC_ID_TABLE=\"${libdrmdatadir}/amdgpu.ids\"
- libdrm_amdgpu_la_LTLIBRARIES = libdrm_amdgpu.la
- libdrm_amdgpu_ladir = $(libdir)
- libdrm_amdgpu_la_LDFLAGS = -version-number 1:0:0 -no-undefined
--libdrm_amdgpu_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@
-+libdrm_amdgpu_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@ @ATOMIC_OPS_LIBS@
- 
- libdrm_amdgpu_la_SOURCES = $(LIBDRM_AMDGPU_FILES)
- amdgpu_asic_id.lo: $(top_srcdir)/data/amdgpu.ids
-diff --git a/configure.ac b/configure.ac
-index 35378b33..501d0871 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -247,7 +247,7 @@ AC_CACHE_CHECK([for native atomic primitives], drm_cv_atomic_primitives, [
- 					  ]],[[]])], [drm_cv_atomic_primitives="Intel"],[])
- 
- 	if test "x$drm_cv_atomic_primitives" = "xnone"; then
--		AC_CHECK_HEADER([atomic_ops.h], drm_cv_atomic_primitives="libatomic-ops")
-+		PKG_CHECK_MODULES(ATOMIC_OPS, [atomic_ops], drm_cv_atomic_primitives="libatomic-ops", true)
- 	fi
- 
- 	# atomic functions defined in <atomic.h> & libc on Solaris
-diff --git a/etnaviv/Makefile.am b/etnaviv/Makefile.am
-index be96ba86..669cf14f 100644
---- a/etnaviv/Makefile.am
-+++ b/etnaviv/Makefile.am
-@@ -12,7 +12,8 @@ libdrm_etnaviv_la_LDFLAGS = -version-number 1:0:0 -no-undefined
- libdrm_etnaviv_la_LIBADD = \
- 	../libdrm.la \
- 	@PTHREADSTUBS_LIBS@ \
--	@CLOCK_LIB@
-+	@CLOCK_LIB@ \
-+	@ATOMIC_OPS_LIBS@
- 
- libdrm_etnaviv_la_SOURCES = $(LIBDRM_ETNAVIV_FILES)
- 
-diff --git a/freedreno/Makefile.am b/freedreno/Makefile.am
-index cbb0d031..238407e3 100644
---- a/freedreno/Makefile.am
-+++ b/freedreno/Makefile.am
-@@ -14,7 +14,8 @@ libdrm_freedreno_la_LDFLAGS = -version-number 1:0:0 -no-undefined
- libdrm_freedreno_la_LIBADD = \
- 	../libdrm.la \
- 	@PTHREADSTUBS_LIBS@ \
--	@CLOCK_LIB@
-+	@CLOCK_LIB@ \
-+	@ATOMIC_OPS_LIBS@
- 
- libdrm_freedreno_la_SOURCES = $(LIBDRM_FREEDRENO_FILES)
- if HAVE_FREEDRENO_KGSL
-diff --git a/intel/Makefile.am b/intel/Makefile.am
-index c52e8c08..f3635a64 100644
---- a/intel/Makefile.am
-+++ b/intel/Makefile.am
-@@ -38,7 +38,8 @@ libdrm_intel_la_LDFLAGS = -version-number 1:0:0 -no-undefined
- libdrm_intel_la_LIBADD = ../libdrm.la \
- 	@PTHREADSTUBS_LIBS@ \
- 	@PCIACCESS_LIBS@ \
--	@CLOCK_LIB@
-+	@CLOCK_LIB@ \
-+	@ATOMIC_OPS_LIBS@
- 
- libdrm_intel_la_SOURCES = $(LIBDRM_INTEL_FILES)
- 
-diff --git a/nouveau/Makefile.am b/nouveau/Makefile.am
-index 344a8445..a4e6a78b 100644
---- a/nouveau/Makefile.am
-+++ b/nouveau/Makefile.am
-@@ -10,7 +10,7 @@ AM_CFLAGS = \
- libdrm_nouveau_la_LTLIBRARIES = libdrm_nouveau.la
- libdrm_nouveau_ladir = $(libdir)
- libdrm_nouveau_la_LDFLAGS = -version-number 2:0:0 -no-undefined
--libdrm_nouveau_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@
-+libdrm_nouveau_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@ @ATOMIC_OPS_LIBS@
- 
- libdrm_nouveau_la_SOURCES = $(LIBDRM_NOUVEAU_FILES)
- 
-diff --git a/omap/Makefile.am b/omap/Makefile.am
-index 599bb9de..524afee3 100644
---- a/omap/Makefile.am
-+++ b/omap/Makefile.am
-@@ -7,7 +7,7 @@ AM_CFLAGS = \
- libdrm_omap_la_LTLIBRARIES = libdrm_omap.la
- libdrm_omap_ladir = $(libdir)
- libdrm_omap_la_LDFLAGS = -version-number 1:0:0 -no-undefined
--libdrm_omap_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@
-+libdrm_omap_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@ @ATOMIC_OPS_LIBS@
- 
- libdrm_omap_la_SOURCES = omap_drm.c
- 
-diff --git a/radeon/Makefile.am b/radeon/Makefile.am
-index e2415314..c27d3c75 100644
---- a/radeon/Makefile.am
-+++ b/radeon/Makefile.am
-@@ -33,7 +33,7 @@ AM_CFLAGS = \
- libdrm_radeon_la_LTLIBRARIES = libdrm_radeon.la
- libdrm_radeon_ladir = $(libdir)
- libdrm_radeon_la_LDFLAGS = -version-number 1:0:1 -no-undefined
--libdrm_radeon_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@
-+libdrm_radeon_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@ @ATOMIC_OPS_LIBS@
- 
- libdrm_radeon_la_SOURCES = $(LIBDRM_RADEON_FILES)
- 
-diff --git a/tegra/Makefile.am b/tegra/Makefile.am
-index fb40be55..12abe8c4 100644
---- a/tegra/Makefile.am
-+++ b/tegra/Makefile.am
-@@ -9,7 +9,7 @@ AM_CFLAGS = \
- libdrm_tegra_ladir = $(libdir)
- libdrm_tegra_la_LTLIBRARIES = libdrm_tegra.la
- libdrm_tegra_la_LDFLAGS = -version-number 0:0:0 -no-undefined
--libdrm_tegra_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@
-+libdrm_tegra_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@ @ATOMIC_OPS_LIBS@
- 
- libdrm_tegra_la_SOURCES = \
- 	private.h \
--- 
-2.14.3
-
diff --git a/package/libdrm/0003-meson.build-fix-intel-atomics-detection.patch b/package/libdrm/0003-meson.build-fix-intel-atomics-detection.patch
new file mode 100644
index 0000000000..fe02328f3a
--- /dev/null
+++ b/package/libdrm/0003-meson.build-fix-intel-atomics-detection.patch
@@ -0,0 +1,35 @@
+From 00f6ac3c24f36fa07fa93f4a89ee873edf125098 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Mon, 16 Jul 2018 23:01:40 +0200
+Subject: [PATCH] meson.build: fix intel atomics detection
+
+Use the stronger compiler.link() test (instead of the weaker
+compiler.compile()) to fix the intel atomics detection.
+
+Fixes false positive in case of sparc compile (buildroot toolchain).
+
+Upstream suggested: https://lists.freedesktop.org/archives/dri-devel/2018-July/183885.html
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ meson.build | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/meson.build b/meson.build
+index 9b443a5..3c8afb6 100644
+--- a/meson.build
++++ b/meson.build
+@@ -49,9 +49,10 @@ intel_atomics = false
+ lib_atomics = false
+ 
+ dep_atomic_ops = dependency('atomic_ops', required : false)
+-if cc.compiles('''
++if cc.links('''
+     int atomic_add(int *i) { return __sync_add_and_fetch (i, 1); }
+     int atomic_cmpxchg(int *i, int j, int k) { return __sync_val_compare_and_swap (i, j, k); }
++    int main() { }
+     ''',
+     name : 'Intel Atomics')
+   intel_atomics = true
+-- 
+2.18.0
+
diff --git a/package/libdrm/0004-meson.build-enable-static-build.patch b/package/libdrm/0004-meson.build-enable-static-build.patch
new file mode 100644
index 0000000000..1054788127
--- /dev/null
+++ b/package/libdrm/0004-meson.build-enable-static-build.patch
@@ -0,0 +1,169 @@
+From d58a32776e08e193c24f7bb192daf72b66fbe550 Mon Sep 17 00:00:00 2001
+From: Peter Seiderer <ps.report@gmx.net>
+Date: Wed, 18 Jul 2018 21:35:18 +0200
+Subject: [PATCH] meson.build: enable static build
+
+Use meson library instead of shared_library to enable static build.
+
+Upstream suggested: https://lists.freedesktop.org/archives/dri-devel/2018-July/183886.html
+Signed-off-by: Peter Seiderer <ps.report@gmx.net>
+---
+ amdgpu/meson.build    | 2 +-
+ etnaviv/meson.build   | 2 +-
+ exynos/meson.build    | 2 +-
+ freedreno/meson.build | 2 +-
+ intel/meson.build     | 2 +-
+ libkms/meson.build    | 2 +-
+ meson.build           | 2 +-
+ nouveau/meson.build   | 2 +-
+ omap/meson.build      | 2 +-
+ radeon/meson.build    | 2 +-
+ tegra/meson.build     | 2 +-
+ 11 files changed, 11 insertions(+), 11 deletions(-)
+
+diff --git a/amdgpu/meson.build b/amdgpu/meson.build
+index f39d7bf..1b4b0be 100644
+--- a/amdgpu/meson.build
++++ b/amdgpu/meson.build
+@@ -21,7 +21,7 @@
+ 
+ datadir_amdgpu = join_paths(get_option('prefix'), get_option('datadir'), 'libdrm')
+ 
+-libdrm_amdgpu = shared_library(
++libdrm_amdgpu = library(
+   'drm_amdgpu',
+   [
+     files(
+diff --git a/etnaviv/meson.build b/etnaviv/meson.build
+index ca2aa54..a0d994e 100644
+--- a/etnaviv/meson.build
++++ b/etnaviv/meson.build
+@@ -19,7 +19,7 @@
+ # SOFTWARE.
+ 
+ 
+-libdrm_etnaviv = shared_library(
++libdrm_etnaviv = library(
+   'drm_etnaviv',
+   [
+     files(
+diff --git a/exynos/meson.build b/exynos/meson.build
+index 30d3640..fd14f3a 100644
+--- a/exynos/meson.build
++++ b/exynos/meson.build
+@@ -18,7 +18,7 @@
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ # SOFTWARE.
+ 
+-libdrm_exynos = shared_library(
++libdrm_exynos = library(
+   'drm_exynos',
+   [files('exynos_drm.c', 'exynos_fimg2d.c'), config_file],
+   c_args : warn_c_args,
+diff --git a/freedreno/meson.build b/freedreno/meson.build
+index 015b7fb..6c8a6a7 100644
+--- a/freedreno/meson.build
++++ b/freedreno/meson.build
+@@ -39,7 +39,7 @@ if with_freedreno_kgsl
+   )
+ endif
+ 
+-libdrm_freedreno = shared_library(
++libdrm_freedreno = library(
+   'drm_freedreno',
+   [files_freedreno, config_file],
+   c_args : warn_c_args,
+diff --git a/intel/meson.build b/intel/meson.build
+index 53c7fce..14cabd3 100644
+--- a/intel/meson.build
++++ b/intel/meson.build
+@@ -18,7 +18,7 @@
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ # SOFTWARE.
+ 
+-libdrm_intel = shared_library(
++libdrm_intel = library(
+   'drm_intel',
+   [
+     files(
+diff --git a/libkms/meson.build b/libkms/meson.build
+index 86d1a4e..9d21e4c 100644
+--- a/libkms/meson.build
++++ b/libkms/meson.build
+@@ -41,7 +41,7 @@ if with_exynos
+   libkms_include += include_directories('../exynos')
+ endif
+ 
+-libkms = shared_library(
++libkms = library(
+   'kms',
+   [files_libkms, config_file],
+   c_args : warn_c_args,
+diff --git a/meson.build b/meson.build
+index 3c8afb6..7aa5f8c 100644
+--- a/meson.build
++++ b/meson.build
+@@ -279,7 +279,7 @@ add_project_arguments('-include', 'config.h', language : 'c')
+ inc_root = include_directories('.')
+ inc_drm = include_directories('include/drm')
+ 
+-libdrm = shared_library(
++libdrm = library(
+   'drm',
+   [files(
+      'xf86drm.c', 'xf86drmHash.c', 'xf86drmRandom.c', 'xf86drmSL.c',
+diff --git a/nouveau/meson.build b/nouveau/meson.build
+index 51c9a71..acba048 100644
+--- a/nouveau/meson.build
++++ b/nouveau/meson.build
+@@ -19,7 +19,7 @@
+ # SOFTWARE.
+ 
+ 
+-libdrm_nouveau = shared_library(
++libdrm_nouveau = library(
+   'drm_nouveau',
+   [files( 'nouveau.c', 'pushbuf.c', 'bufctx.c', 'abi16.c'), config_file],
+   c_args : warn_c_args,
+diff --git a/omap/meson.build b/omap/meson.build
+index e57b8f5..6cffb99 100644
+--- a/omap/meson.build
++++ b/omap/meson.build
+@@ -18,7 +18,7 @@
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ # SOFTWARE.
+ 
+-libdrm_omap = shared_library(
++libdrm_omap = library(
+   'drm_omap',
+   [files('omap_drm.c'), config_file],
+   include_directories : [inc_root, inc_drm],
+diff --git a/radeon/meson.build b/radeon/meson.build
+index b08c744..2f45ff7 100644
+--- a/radeon/meson.build
++++ b/radeon/meson.build
+@@ -19,7 +19,7 @@
+ # SOFTWARE.
+ 
+ 
+-libdrm_radeon = shared_library(
++libdrm_radeon = library(
+   'drm_radeon',
+   [
+     files(
+diff --git a/tegra/meson.build b/tegra/meson.build
+index 1f5c74b..8d0cfa9 100644
+--- a/tegra/meson.build
++++ b/tegra/meson.build
+@@ -18,7 +18,7 @@
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ # SOFTWARE.
+ 
+-libdrm_tegra = shared_library(
++libdrm_tegra = library(
+   'drm_tegra',
+   [files('tegra.c'), config_file],
+   include_directories : [inc_root, inc_drm],
+-- 
+2.18.0
+
diff --git a/package/libdrm/libdrm.mk b/package/libdrm/libdrm.mk
index 06b1144616..65ed01bb16 100644
--- a/package/libdrm/libdrm.mk
+++ b/package/libdrm/libdrm.mk
@@ -10,111 +10,104 @@ LIBDRM_SITE = https://dri.freedesktop.org/libdrm
 LIBDRM_LICENSE = MIT
 LIBDRM_INSTALL_STAGING = YES
 
-# patch 0003-configure-Makefile.am-use-pkg-config-to-discover-lib.patch
-# touching configure.ac/Makefile.am (and host-xutil_util-macros dependency)
-LIBDRM_AUTORECONF = YES
-
 LIBDRM_DEPENDENCIES = \
 	libpthread-stubs \
-	host-pkgconf \
-	host-xutil_util-macros
+	host-pkgconf
 
 LIBDRM_CONF_OPTS = \
-	--disable-cairo-tests \
-	--disable-manpages
-
-LIBDRM_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'
+	-Dcairo-tests=false \
+	-Dmanpages=false
 
 ifeq ($(BR2_PACKAGE_LIBATOMIC_OPS),y)
 LIBDRM_DEPENDENCIES += libatomic_ops
 ifeq ($(BR2_sparc_v8)$(BR2_sparc_leon3),y)
-LIBDRM_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -DAO_NO_SPARC_V9"
+LIBDRM_MESON_CFLAGS += "\"-DAO_NO_SPARC_V9\","
 endif
 endif
 
 ifeq ($(BR2_PACKAGE_LIBDRM_INTEL),y)
-LIBDRM_CONF_OPTS += --enable-intel
+LIBDRM_CONF_OPTS += -Dintel=true
 LIBDRM_DEPENDENCIES += libpciaccess
 else
-LIBDRM_CONF_OPTS += --disable-intel
+LIBDRM_CONF_OPTS += -Dintel=false
 endif
 
 ifeq ($(BR2_PACKAGE_LIBDRM_RADEON),y)
-LIBDRM_CONF_OPTS += --enable-radeon
+LIBDRM_CONF_OPTS += -Dradeon=true
 else
-LIBDRM_CONF_OPTS += --disable-radeon
+LIBDRM_CONF_OPTS += -Dradeon=false
 endif
 
 ifeq ($(BR2_PACKAGE_LIBDRM_AMDGPU),y)
-LIBDRM_CONF_OPTS += --enable-amdgpu
+LIBDRM_CONF_OPTS += -Damdgpu=true
 else
-LIBDRM_CONF_OPTS += --disable-amdgpu
+LIBDRM_CONF_OPTS += -Damdgpu=false
 endif
 
 ifeq ($(BR2_PACKAGE_LIBDRM_NOUVEAU),y)
-LIBDRM_CONF_OPTS += --enable-nouveau
+LIBDRM_CONF_OPTS += -Dnouveau=true
 else
-LIBDRM_CONF_OPTS += --disable-nouveau
+LIBDRM_CONF_OPTS += -Dnouveau=false
 endif
 
 ifeq ($(BR2_PACKAGE_LIBDRM_VMWGFX),y)
-LIBDRM_CONF_OPTS += --enable-vmwgfx
+LIBDRM_CONF_OPTS += -Dvmwgfx=true
 else
-LIBDRM_CONF_OPTS += --disable-vmwgfx
+LIBDRM_CONF_OPTS += -Dvmwgfx=false
 endif
 
 ifeq ($(BR2_PACKAGE_LIBDRM_OMAP),y)
-LIBDRM_CONF_OPTS += --enable-omap-experimental-api
+LIBDRM_CONF_OPTS += -Domap=true
 else
-LIBDRM_CONF_OPTS += --disable-omap-experimental-api
+LIBDRM_CONF_OPTS += -Domap=false
 endif
 
 ifeq ($(BR2_PACKAGE_LIBDRM_ETNAVIV),y)
-LIBDRM_CONF_OPTS += --enable-etnaviv-experimental-api
+LIBDRM_CONF_OPTS += -Detnaviv=true
 else
-LIBDRM_CONF_OPTS += --disable-etnaviv-experimental-api
+LIBDRM_CONF_OPTS += -Detnaviv=false
 endif
 
 ifeq ($(BR2_PACKAGE_LIBDRM_EXYNOS),y)
-LIBDRM_CONF_OPTS += --enable-exynos-experimental-api
+LIBDRM_CONF_OPTS += -Dexynos=true
 else
-LIBDRM_CONF_OPTS += --disable-exynos-experimental-api
+LIBDRM_CONF_OPTS += -Dexynos=false
 endif
 
 ifeq ($(BR2_PACKAGE_LIBDRM_FREEDRENO),y)
-LIBDRM_CONF_OPTS += --enable-freedreno
+LIBDRM_CONF_OPTS += -Dfreedreno=true
 else
-LIBDRM_CONF_OPTS += --disable-freedreno
+LIBDRM_CONF_OPTS += -Dfreedreno=false
 endif
 
 ifeq ($(BR2_PACKAGE_LIBDRM_TEGRA),y)
-LIBDRM_CONF_OPTS += --enable-tegra-experimental-api
+LIBDRM_CONF_OPTS += -Dtegra=true
 else
-LIBDRM_CONF_OPTS += --disable-tegra-experimental-api
+LIBDRM_CONF_OPTS += -Dtegra=false
 endif
 
 ifeq ($(BR2_PACKAGE_LIBDRM_VC4),y)
-LIBDRM_CONF_OPTS += --enable-vc4
+LIBDRM_CONF_OPTS += -Dvc4=true
 else
-LIBDRM_CONF_OPTS += --disable-vc4
+LIBDRM_CONF_OPTS += -Dvc4=false
 endif
 
 ifeq ($(BR2_PACKAGE_HAS_UDEV),y)
-LIBDRM_CONF_OPTS += --enable-udev
+LIBDRM_CONF_OPTS += -Dudev=true
 LIBDRM_DEPENDENCIES += udev
 else
-LIBDRM_CONF_OPTS += --disable-udev
+LIBDRM_CONF_OPTS += -Dudev=false
 endif
 
 ifeq ($(BR2_PACKAGE_VALGRIND),y)
-LIBDRM_CONF_OPTS += --enable-valgrind
+LIBDRM_CONF_OPTS += -Dvalgrind=true
 LIBDRM_DEPENDENCIES += valgrind
 else
-LIBDRM_CONF_OPTS += --disable-valgrind
+LIBDRM_CONF_OPTS += -Dvalgrind=false
 endif
 
 ifeq ($(BR2_PACKAGE_LIBDRM_INSTALL_TESTS),y)
-LIBDRM_CONF_OPTS += --enable-install-test-programs
+LIBDRM_CONF_OPTS += -Dinstall-test-programs=true
 endif
 
-$(eval $(autotools-package))
+$(eval $(meson-package))
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [RFC v3 4/4] libinput: bump version to 1.11.0 and convert to meson build
  2018-07-19 20:43 [Buildroot] [RFC v3 1/4] meson: bump version to 0.47.1 Peter Seiderer
  2018-07-19 20:43 ` [Buildroot] [RFC v3 2/4] meson: change from global to per package cross-compilation.conf Peter Seiderer
  2018-07-19 20:43 ` [Buildroot] [RFC v3 3/4] libdrm: change to meson build system Peter Seiderer
@ 2018-07-19 20:43 ` Peter Seiderer
  2018-07-22 12:29   ` Eric Le Bihan
  2019-04-07 20:20   ` Thomas Petazzoni
  2018-07-22 12:21 ` [Buildroot] [RFC v3 1/4] meson: bump version to 0.47.1 Eric Le Bihan
  2018-08-16 11:52 ` Thomas Petazzoni
  4 siblings, 2 replies; 19+ messages in thread
From: Peter Seiderer @ 2018-07-19 20:43 UTC (permalink / raw)
  To: buildroot

For details since 1.8.x see [1], [2] and [3].

Build system changed from autotools to meson exclusively
since 1.9.0 (see [1]).

Add hash for license file.

[1] https://lists.freedesktop.org/archives/wayland-devel/2017-October/035469.html
[2] https://lists.freedesktop.org/archives/wayland-devel/2018-February/036957.html
[3] https://lists.freedesktop.org/archives/wayland-devel/2018-June/038349.html

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Changes v1 -> v2:
  - new patch

Changes v2 -> v3:
  - add hash for license file
---
 package/libinput/libinput.hash | 13 ++++++++-----
 package/libinput/libinput.mk   | 10 +++++-----
 2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/package/libinput/libinput.hash b/package/libinput/libinput.hash
index 4e64568ca3..01389ebb4c 100644
--- a/package/libinput/libinput.hash
+++ b/package/libinput/libinput.hash
@@ -1,5 +1,8 @@
-# From https://lists.freedesktop.org/archives/wayland-devel/2017-September/034949.html
-md5  e94e9aa765da9533c23b80b440638de9  libinput-1.8.2.tar.xz
-sha1 1c55462eb598b91c9c360f31170a408fb8d38d22  libinput-1.8.2.tar.xz
-sha256 013518ee0adb2287e6e1f08412efba2137320738cadb5399b783738f04cbab38  libinput-1.8.2.tar.xz
-sha512 555a7680cc8aaf62c5370a865f3aff0a933d42d94a3d8861c072666b02c9e1be45ea39de9a749a9575cdfb613b6150e412e18559d94d4919f21ca4680a3c76a7  libinput-1.8.2.tar.xz
+# From https://lists.freedesktop.org/archives/wayland-devel/2018-June/038349.html
+md5 a182dab52f4d33bc1ef50668dcf53cc6 libinput-1.11.0.tar.xz
+sha1 5c242a99c7e4c678e15f7bd100f94fa338b81240 libinput-1.11.0.tar.xz
+sha256 64a36c4f826f4b5d473bf2cb803122f96390a18243ec810f2ce8ac5076a0bc12 libinput-1.11.0.tar.xz
+sha512 382a6c9ec4aaf13ac209ee5a7f507c7a6d2dd399c5104703ac7c6ac62fb3f393de6f4e15d7895b18c8b8d845ce8fc1f551a90aa7532f0de4cc17e57a09cfe857 libinput-1.11.0.tar.xz
+
+# Hash for license files:
+sha256 e8835710c129c0cc396be3d78320c9ca9ed10da8051e1cbc91b4a9a77087cdbf COPYING
diff --git a/package/libinput/libinput.mk b/package/libinput/libinput.mk
index f904b796b7..8c4870f269 100644
--- a/package/libinput/libinput.mk
+++ b/package/libinput/libinput.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-LIBINPUT_VERSION = 1.8.2
+LIBINPUT_VERSION = 1.11.0
 LIBINPUT_SOURCE = libinput-$(LIBINPUT_VERSION).tar.xz
 LIBINPUT_SITE = http://www.freedesktop.org/software/libinput
 LIBINPUT_DEPENDENCIES = host-pkgconf libevdev mtdev udev
@@ -12,13 +12,13 @@ LIBINPUT_INSTALL_STAGING = YES
 LIBINPUT_LICENSE = MIT
 LIBINPUT_LICENSE_FILES = COPYING
 # Tests need fork, so just disable them everywhere.
-LIBINPUT_CONF_OPTS = --disable-tests --disable-libwacom
+LIBINPUT_CONF_OPTS = -Dtests=false -Dlibwacom=false -Ddocumentation=false
 
 ifeq ($(BR2_PACKAGE_LIBGTK3),y)
-LIBINPUT_CONF_OPTS += --enable-debug-gui
+LIBINPUT_CONF_OPTS += -Ddebug-gui=true
 LIBINPUT_DEPENDENCIES += libgtk3
 else
-LIBINPUT_CONF_OPTS += --disable-debug-gui
+LIBINPUT_CONF_OPTS += -Ddebug-gui=false
 endif
 
-$(eval $(autotools-package))
+$(eval $(meson-package))
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 19+ messages in thread

* [Buildroot] [RFC v3 1/4] meson: bump version to 0.47.1
  2018-07-19 20:43 [Buildroot] [RFC v3 1/4] meson: bump version to 0.47.1 Peter Seiderer
                   ` (2 preceding siblings ...)
  2018-07-19 20:43 ` [Buildroot] [RFC v3 4/4] libinput: bump version to 1.11.0 and convert to meson build Peter Seiderer
@ 2018-07-22 12:21 ` Eric Le Bihan
  2018-08-16 11:52 ` Thomas Petazzoni
  4 siblings, 0 replies; 19+ messages in thread
From: Eric Le Bihan @ 2018-07-22 12:21 UTC (permalink / raw)
  To: buildroot

On 2018-07-19 22:43, Peter Seiderer wrote:
> - delete legacy patch 0001-Only-fix-RPATH-if-install_rpath-is-not-empty.patch
>   (no complains from support/scripts/check-host-rpath even without the patch)
>
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Acked-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
Tested-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>

--
ELB

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [RFC v3 2/4] meson: change from global to per package cross-compilation.conf
  2018-07-19 20:43 ` [Buildroot] [RFC v3 2/4] meson: change from global to per package cross-compilation.conf Peter Seiderer
@ 2018-07-22 12:27   ` Eric Le Bihan
  2018-08-16 11:57   ` Thomas Petazzoni
  1 sibling, 0 replies; 19+ messages in thread
From: Eric Le Bihan @ 2018-07-22 12:27 UTC (permalink / raw)
  To: buildroot

On 2018-07-19 22:43, Peter Seiderer wrote:
> Add FOO_MESON_CFLAGS, FOO_MESON_LDFLAGS and FOO_MESON_CXXFLAGS
> variables to allow per package additional flags.
>
> Change to buildtype plain as all compiler/linker flags forcing
> debug/release are already given via the cross-compilation.conf
> file.
>
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Tested-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>

--
ELB

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [RFC v3 3/4] libdrm: change to meson build system
  2018-07-19 20:43 ` [Buildroot] [RFC v3 3/4] libdrm: change to meson build system Peter Seiderer
@ 2018-07-22 12:28   ` Eric Le Bihan
  2019-04-07 20:21   ` Thomas Petazzoni
  1 sibling, 0 replies; 19+ messages in thread
From: Eric Le Bihan @ 2018-07-22 12:28 UTC (permalink / raw)
  To: buildroot

On 2018-07-19 22:43, Peter Seiderer wrote:
> - remove legacy patch
>   0003-configure-Makefile.am-use-pkg-config-to-discover-lib.patch
>
> - add patch to fix meson atomic ops detection
>   0003-meson.build-fix-intel-atomics-detection.patch
>
> - add patch to enable static build
>   0004-meson.build-enable-static-build.patch
>
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Tested-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>

--
ELB

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [RFC v3 4/4] libinput: bump version to 1.11.0 and convert to meson build
  2018-07-19 20:43 ` [Buildroot] [RFC v3 4/4] libinput: bump version to 1.11.0 and convert to meson build Peter Seiderer
@ 2018-07-22 12:29   ` Eric Le Bihan
  2019-04-07 20:20   ` Thomas Petazzoni
  1 sibling, 0 replies; 19+ messages in thread
From: Eric Le Bihan @ 2018-07-22 12:29 UTC (permalink / raw)
  To: buildroot

On 2018-07-19 22:43, Peter Seiderer wrote:
> For details since 1.8.x see [1], [2] and [3].
>
> Build system changed from autotools to meson exclusively
> since 1.9.0 (see [1]).
>
> Add hash for license file.
>
> [1] https://lists.freedesktop.org/archives/wayland-devel/2017-October/035469.html
> [2] https://lists.freedesktop.org/archives/wayland-devel/2018-February/036957.html
> [3] https://lists.freedesktop.org/archives/wayland-devel/2018-June/038349.html
>
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Tested-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>

--
ELB

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [RFC v3 1/4] meson: bump version to 0.47.1
  2018-07-19 20:43 [Buildroot] [RFC v3 1/4] meson: bump version to 0.47.1 Peter Seiderer
                   ` (3 preceding siblings ...)
  2018-07-22 12:21 ` [Buildroot] [RFC v3 1/4] meson: bump version to 0.47.1 Eric Le Bihan
@ 2018-08-16 11:52 ` Thomas Petazzoni
  4 siblings, 0 replies; 19+ messages in thread
From: Thomas Petazzoni @ 2018-08-16 11:52 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 19 Jul 2018 22:43:52 +0200, Peter Seiderer wrote:
> - delete legacy patch 0001-Only-fix-RPATH-if-install_rpath-is-not-empty.patch
>   (no complains from support/scripts/check-host-rpath even without the patch)
> 
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
> Changes v1 -> v2:
>   - new patch

Applied to next, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [RFC v3 2/4] meson: change from global to per package cross-compilation.conf
  2018-07-19 20:43 ` [Buildroot] [RFC v3 2/4] meson: change from global to per package cross-compilation.conf Peter Seiderer
  2018-07-22 12:27   ` Eric Le Bihan
@ 2018-08-16 11:57   ` Thomas Petazzoni
  2018-08-18 23:15     ` Peter Seiderer
  1 sibling, 1 reply; 19+ messages in thread
From: Thomas Petazzoni @ 2018-08-16 11:57 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 19 Jul 2018 22:43:53 +0200, Peter Seiderer wrote:

> -define HOST_MESON_INSTALL_CROSS_CONF
> +define HOST_MESON_INSTALL_CROSS_CONF_IN
>  	mkdir -p $(HOST_DIR)/etc/meson
>  	sed -e "s%@TARGET_CROSS@%$(TARGET_CROSS)%g" \
>  	    -e "s%@TARGET_ARCH@%$(ARCH)%g" \
> @@ -31,9 +31,9 @@ define HOST_MESON_INSTALL_CROSS_CONF
>  	    -e "s%@TARGET_CXXFLAGS@%$(HOST_MESON_SED_CXXFLAGS)%g" \
>  	    -e "s%@HOST_DIR@%$(HOST_DIR)%g" \
>  	    $(HOST_MESON_PKGDIR)/cross-compilation.conf.in \
> -	    > $(HOST_DIR)/etc/meson/cross-compilation.conf  
> +	    > $(HOST_DIR)/etc/meson/cross-compilation.conf.in

I am not super happy with this approach, because this file is not meant
to be used just during the build of Buildroot packages, but potentially
after the Buildroot build is finished, for people to easily
cross-compile Meson-based software manually. To me, this file is
similar to toolchainfile.cmake that pkg-cmake.mk is installing, and
which allows to easily cross-compile stuff with CMake outside of
Buildroot, using the Buildroot generated toolchain.

So I would prefer to:

 - Move this file to
   $(HOST_DIR)/usr/share/buildroot/meson-cross-compilation.conf or
   something like that, so that we are a bit consistent with what we do
   for CMake.

 - Keep it directly usable.

 - Pass the additional CFLAGS/LDFLAGS to packages on the command line
   rather than through this file.
   https://mesonbuild.com/howtox.html#set-extra-compiler-and-linker-flags-from-the-outside-when-eg-building-distro-packages
   seems to say this is possible, no ? Or does it override the ones
   from the cross-compilation.conf ?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [RFC v3 2/4] meson: change from global to per package cross-compilation.conf
  2018-08-16 11:57   ` Thomas Petazzoni
@ 2018-08-18 23:15     ` Peter Seiderer
  2018-08-19  9:22       ` Yann E. MORIN
  2018-08-19 13:22       ` Thomas Petazzoni
  0 siblings, 2 replies; 19+ messages in thread
From: Peter Seiderer @ 2018-08-18 23:15 UTC (permalink / raw)
  To: buildroot

Hello Thomas,

On Thu, 16 Aug 2018 13:57:45 +0200, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:

> Hello,
> 
> On Thu, 19 Jul 2018 22:43:53 +0200, Peter Seiderer wrote:
> 
> > -define HOST_MESON_INSTALL_CROSS_CONF
> > +define HOST_MESON_INSTALL_CROSS_CONF_IN
> >  	mkdir -p $(HOST_DIR)/etc/meson
> >  	sed -e "s%@TARGET_CROSS@%$(TARGET_CROSS)%g" \
> >  	    -e "s%@TARGET_ARCH@%$(ARCH)%g" \
> > @@ -31,9 +31,9 @@ define HOST_MESON_INSTALL_CROSS_CONF
> >  	    -e "s%@TARGET_CXXFLAGS@%$(HOST_MESON_SED_CXXFLAGS)%g" \
> >  	    -e "s%@HOST_DIR@%$(HOST_DIR)%g" \
> >  	    $(HOST_MESON_PKGDIR)/cross-compilation.conf.in \  
> > -	    > $(HOST_DIR)/etc/meson/cross-compilation.conf    
> > +	    > $(HOST_DIR)/etc/meson/cross-compilation.conf.in  
> 
> I am not super happy with this approach, because this file is not meant
> to be used just during the build of Buildroot packages, but potentially
> after the Buildroot build is finished, for people to easily
> cross-compile Meson-based software manually. To me, this file is
> similar to toolchainfile.cmake that pkg-cmake.mk is installing, and
> which allows to easily cross-compile stuff with CMake outside of
> Buildroot, using the Buildroot generated toolchain.
> 
> So I would prefer to:
> 
>  - Move this file to
>    $(HOST_DIR)/usr/share/buildroot/meson-cross-compilation.conf or
>    something like that, so that we are a bit consistent with what we do
>    for CMake.
> 
>  - Keep it directly usable.
> 
>  - Pass the additional CFLAGS/LDFLAGS to packages on the command line
>    rather than through this file.
>    https://mesonbuild.com/howtox.html#set-extra-compiler-and-linker-flags-from-the-outside-when-eg-building-distro-packages
>    seems to say this is possible, no ? Or does it override the ones
>    from the cross-compilation.conf ?

The CFLAGS are ignored, e.g. with 'LIBDRM_CONF_ENV += CFLAGS=-DAO_NO_SPARC_V9' in package/libdrm/libdrm.mk:

	$ make libdrm V=1
[...]

... CFLAGS=-DAO_NO_SPARC_V9 host/bin/meson --prefix=/usr --libdir=lib --default-library=shared --buildtype=debug --cross-file=.../host/etc/meson/cross-compilation.conf -Dcairo-tests=false -Dmanpages=false -Dintel=false -Dradeon=true -Damdgpu=true -Dnouveau=true -Dvmwgfx=false -Domap=false -Detnaviv=true -Dexynos=false -Dfreedreno=false -Dtegra=false -Dvc4=false -Dudev=true -Dvalgrind=false -Dinstall-test-programs=true .../build/libdrm-2.4.93/ .../build/libdrm-2.4.93//build
The Meson build system
Version: 0.47.1
Source dir: .../build/libdrm-2.4.93
Build dir: .../build/libdrm-2.4.93/build
Build type: cross build
WARNING: Unknown options: "manpages"
Project name: libdrm
Project version: 2.4.93
Appending CFLAGS from environment: '-DAO_NO_SPARC_V9'
Appending CFLAGS from environment: '-DAO_NO_SPARC_V9'
Native C compiler: cc (gcc 8.1.1 "cc (SUSE Linux) 8.1.1 20180719 [gcc-8-branch revision 262874]")
Cross C compiler: /home/seiderer/Work/Buildroot/build_libdrm_c99/host/bin/sparc-linux-gcc (gcc 6.4.0)

[...]

[1/104] .../host/bin/sparc-linux-gcc -Ilibkms/libkms@@kms at sha -Ilibkms -I../libkms -I. -I../ -I../include/drm -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -O0 -g -include config.h -fPIC -Wall -Wextra -Wsign-compare -Werror=undef -Werror-implicit-function-declaration -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wpacked -Wswitch-enum -Wmissing-format-attribute -Wstrict-aliasing=2 -Winit-self -Winline -Wshadow -Wdeclaration-after-statement -Wold-style-definition -Wno-unused-parameter -Wno-attributes -Wno-long-long -Wno-missing-field-initializers -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g2 -MD -MQ 'libkms/libkms@@kms at sha/api.c.o' -MF 'libkms/libkms@@kms at sha/api.c.o.d' -o 'libkms/libkms@@kms at sha/api.c.o' -c ../libkms/api.c

Only the c_args from cross-compilation.conf ('-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g2')
are used (in contrast to the 'Appending CFLAGS from environment' message)...

Regards,
Peter

> 
> Thanks!
> 
> Thomas

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [RFC v3 2/4] meson: change from global to per package cross-compilation.conf
  2018-08-18 23:15     ` Peter Seiderer
@ 2018-08-19  9:22       ` Yann E. MORIN
  2018-08-19 17:13         ` Peter Seiderer
  2018-08-19 13:22       ` Thomas Petazzoni
  1 sibling, 1 reply; 19+ messages in thread
From: Yann E. MORIN @ 2018-08-19  9:22 UTC (permalink / raw)
  To: buildroot

Peter, All,

On 2018-08-19 01:15 +0200, Peter Seiderer spake thusly:
> On Thu, 16 Aug 2018 13:57:45 +0200, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> > On Thu, 19 Jul 2018 22:43:53 +0200, Peter Seiderer wrote:
> > > -define HOST_MESON_INSTALL_CROSS_CONF
> > > +define HOST_MESON_INSTALL_CROSS_CONF_IN
> > >  	mkdir -p $(HOST_DIR)/etc/meson
> > >  	sed -e "s%@TARGET_CROSS@%$(TARGET_CROSS)%g" \
> > >  	    -e "s%@TARGET_ARCH@%$(ARCH)%g" \
> > > @@ -31,9 +31,9 @@ define HOST_MESON_INSTALL_CROSS_CONF
> > >  	    -e "s%@TARGET_CXXFLAGS@%$(HOST_MESON_SED_CXXFLAGS)%g" \
> > >  	    -e "s%@HOST_DIR@%$(HOST_DIR)%g" \
> > >  	    $(HOST_MESON_PKGDIR)/cross-compilation.conf.in \  
> > > -	    > $(HOST_DIR)/etc/meson/cross-compilation.conf    
> > > +	    > $(HOST_DIR)/etc/meson/cross-compilation.conf.in  
> > 
> > I am not super happy with this approach, because this file is not meant
> > to be used just during the build of Buildroot packages, but potentially
> > after the Buildroot build is finished, for people to easily
> > cross-compile Meson-based software manually. To me, this file is
> > similar to toolchainfile.cmake that pkg-cmake.mk is installing, and
> > which allows to easily cross-compile stuff with CMake outside of
> > Buildroot, using the Buildroot generated toolchain.
> > 
> > So I would prefer to:
> > 
> >  - Move this file to
> >    $(HOST_DIR)/usr/share/buildroot/meson-cross-compilation.conf or
> >    something like that, so that we are a bit consistent with what we do
> >    for CMake.
> > 
> >  - Keep it directly usable.
> > 
> >  - Pass the additional CFLAGS/LDFLAGS to packages on the command line
> >    rather than through this file.
> >    https://mesonbuild.com/howtox.html#set-extra-compiler-and-linker-flags-from-the-outside-when-eg-building-distro-packages
> >    seems to say this is possible, no ? Or does it override the ones
> >    from the cross-compilation.conf ?
> 
> The CFLAGS are ignored, e.g. with 'LIBDRM_CONF_ENV += CFLAGS=-DAO_NO_SPARC_V9' in package/libdrm/libdrm.mk:

What if you _also_ pass them in LIBDRM_NINJA_ENV ?

Regards,
Yann E. MORIN.

> 	$ make libdrm V=1
> [...]
> 
> ... CFLAGS=-DAO_NO_SPARC_V9 host/bin/meson --prefix=/usr --libdir=lib --default-library=shared --buildtype=debug --cross-file=.../host/etc/meson/cross-compilation.conf -Dcairo-tests=false -Dmanpages=false -Dintel=false -Dradeon=true -Damdgpu=true -Dnouveau=true -Dvmwgfx=false -Domap=false -Detnaviv=true -Dexynos=false -Dfreedreno=false -Dtegra=false -Dvc4=false -Dudev=true -Dvalgrind=false -Dinstall-test-programs=true .../build/libdrm-2.4.93/ .../build/libdrm-2.4.93//build
> The Meson build system
> Version: 0.47.1
> Source dir: .../build/libdrm-2.4.93
> Build dir: .../build/libdrm-2.4.93/build
> Build type: cross build
> WARNING: Unknown options: "manpages"
> Project name: libdrm
> Project version: 2.4.93
> Appending CFLAGS from environment: '-DAO_NO_SPARC_V9'
> Appending CFLAGS from environment: '-DAO_NO_SPARC_V9'
> Native C compiler: cc (gcc 8.1.1 "cc (SUSE Linux) 8.1.1 20180719 [gcc-8-branch revision 262874]")
> Cross C compiler: /home/seiderer/Work/Buildroot/build_libdrm_c99/host/bin/sparc-linux-gcc (gcc 6.4.0)
> 
> [...]
> 
> [1/104] .../host/bin/sparc-linux-gcc -Ilibkms/libkms@@kms at sha -Ilibkms -I../libkms -I. -I../ -I../include/drm -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -O0 -g -include config.h -fPIC -Wall -Wextra -Wsign-compare -Werror=undef -Werror-implicit-function-declaration -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wpacked -Wswitch-enum -Wmissing-format-attribute -Wstrict-aliasing=2 -Winit-self -Winline -Wshadow -Wdeclaration-after-statement -Wold-style-definition -Wno-unused-parameter -Wno-attributes -Wno-long-long -Wno-missing-field-initializers -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g2 -MD -MQ 'libkms/libkms@@kms at sha/api.c.o' -MF 'libkms/libkms@@kms at sha/api.c.o.d' -o 'libkms/libkms@@kms at sha/api.c.o' -c ../libkms/api.c
> 
> Only the c_args from cross-compilation.conf ('-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g2')
> are used (in contrast to the 'Appending CFLAGS from environment' message)...
> 
> Regards,
> Peter
> 
> > 
> > Thanks!
> > 
> > Thomas
> 

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [RFC v3 2/4] meson: change from global to per package cross-compilation.conf
  2018-08-18 23:15     ` Peter Seiderer
  2018-08-19  9:22       ` Yann E. MORIN
@ 2018-08-19 13:22       ` Thomas Petazzoni
  2018-08-19 17:15         ` Peter Seiderer
  1 sibling, 1 reply; 19+ messages in thread
From: Thomas Petazzoni @ 2018-08-19 13:22 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 19 Aug 2018 01:15:12 +0200, Peter Seiderer wrote:

> The CFLAGS are ignored, e.g. with 'LIBDRM_CONF_ENV += CFLAGS=-DAO_NO_SPARC_V9' in package/libdrm/libdrm.mk:
> 
> 	$ make libdrm V=1

It seems weird, no? It is documented to be working, and even at runtime
it tells you "I am going to use those additional CFLAGS". Isn't this a
bug or a misuse of meson from us ?

I would really prefer to understand what is going on here instead of
having to generate per-package .conf files.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [RFC v3 2/4] meson: change from global to per package cross-compilation.conf
  2018-08-19  9:22       ` Yann E. MORIN
@ 2018-08-19 17:13         ` Peter Seiderer
  0 siblings, 0 replies; 19+ messages in thread
From: Peter Seiderer @ 2018-08-19 17:13 UTC (permalink / raw)
  To: buildroot

Hello Yann,

On Sun, 19 Aug 2018 11:22:15 +0200, "Yann E. MORIN" <yann.morin.1998@free.fr> wrote:

> Peter, All,
> 
> On 2018-08-19 01:15 +0200, Peter Seiderer spake thusly:
> > On Thu, 16 Aug 2018 13:57:45 +0200, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:  
> > > On Thu, 19 Jul 2018 22:43:53 +0200, Peter Seiderer wrote:  
> > > > -define HOST_MESON_INSTALL_CROSS_CONF
> > > > +define HOST_MESON_INSTALL_CROSS_CONF_IN
> > > >  	mkdir -p $(HOST_DIR)/etc/meson
> > > >  	sed -e "s%@TARGET_CROSS@%$(TARGET_CROSS)%g" \
> > > >  	    -e "s%@TARGET_ARCH@%$(ARCH)%g" \
> > > > @@ -31,9 +31,9 @@ define HOST_MESON_INSTALL_CROSS_CONF
> > > >  	    -e "s%@TARGET_CXXFLAGS@%$(HOST_MESON_SED_CXXFLAGS)%g" \
> > > >  	    -e "s%@HOST_DIR@%$(HOST_DIR)%g" \
> > > >  	    $(HOST_MESON_PKGDIR)/cross-compilation.conf.in \    
> > > > -	    > $(HOST_DIR)/etc/meson/cross-compilation.conf      
> > > > +	    > $(HOST_DIR)/etc/meson/cross-compilation.conf.in    
> > > 
> > > I am not super happy with this approach, because this file is not meant
> > > to be used just during the build of Buildroot packages, but potentially
> > > after the Buildroot build is finished, for people to easily
> > > cross-compile Meson-based software manually. To me, this file is
> > > similar to toolchainfile.cmake that pkg-cmake.mk is installing, and
> > > which allows to easily cross-compile stuff with CMake outside of
> > > Buildroot, using the Buildroot generated toolchain.
> > > 
> > > So I would prefer to:
> > > 
> > >  - Move this file to
> > >    $(HOST_DIR)/usr/share/buildroot/meson-cross-compilation.conf or
> > >    something like that, so that we are a bit consistent with what we do
> > >    for CMake.
> > > 
> > >  - Keep it directly usable.
> > > 
> > >  - Pass the additional CFLAGS/LDFLAGS to packages on the command line
> > >    rather than through this file.
> > >    https://mesonbuild.com/howtox.html#set-extra-compiler-and-linker-flags-from-the-outside-when-eg-building-distro-packages
> > >    seems to say this is possible, no ? Or does it override the ones
> > >    from the cross-compilation.conf ?  
> > 
> > The CFLAGS are ignored, e.g. with 'LIBDRM_CONF_ENV += CFLAGS=-DAO_NO_SPARC_V9' in package/libdrm/libdrm.mk:  
> 
> What if you _also_ pass them in LIBDRM_NINJA_ENV ?
> 

No difference...

Regards,
Peter

> Regards,
> Yann E. MORIN.
> 
> > 	$ make libdrm V=1
> > [...]
> > 
> > ... CFLAGS=-DAO_NO_SPARC_V9 host/bin/meson --prefix=/usr --libdir=lib --default-library=shared --buildtype=debug --cross-file=.../host/etc/meson/cross-compilation.conf -Dcairo-tests=false -Dmanpages=false -Dintel=false -Dradeon=true -Damdgpu=true -Dnouveau=true -Dvmwgfx=false -Domap=false -Detnaviv=true -Dexynos=false -Dfreedreno=false -Dtegra=false -Dvc4=false -Dudev=true -Dvalgrind=false -Dinstall-test-programs=true .../build/libdrm-2.4.93/ .../build/libdrm-2.4.93//build
> > The Meson build system
> > Version: 0.47.1
> > Source dir: .../build/libdrm-2.4.93
> > Build dir: .../build/libdrm-2.4.93/build
> > Build type: cross build
> > WARNING: Unknown options: "manpages"
> > Project name: libdrm
> > Project version: 2.4.93
> > Appending CFLAGS from environment: '-DAO_NO_SPARC_V9'
> > Appending CFLAGS from environment: '-DAO_NO_SPARC_V9'
> > Native C compiler: cc (gcc 8.1.1 "cc (SUSE Linux) 8.1.1 20180719 [gcc-8-branch revision 262874]")
> > Cross C compiler: /home/seiderer/Work/Buildroot/build_libdrm_c99/host/bin/sparc-linux-gcc (gcc 6.4.0)
> > 
> > [...]
> > 
> > [1/104] .../host/bin/sparc-linux-gcc -Ilibkms/libkms@@kms at sha -Ilibkms -I../libkms -I. -I../ -I../include/drm -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -O0 -g -include config.h -fPIC -Wall -Wextra -Wsign-compare -Werror=undef -Werror-implicit-function-declaration -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wpacked -Wswitch-enum -Wmissing-format-attribute -Wstrict-aliasing=2 -Winit-self -Winline -Wshadow -Wdeclaration-after-statement -Wold-style-definition -Wno-unused-parameter -Wno-attributes -Wno-long-long -Wno-missing-field-initializers -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g2 -MD -MQ 'libkms/libkms@@kms at sha/api.c.o' -MF 'libkms/libkms@@kms at sha/api.c.o.d' -o 'libkms/libkms@@kms at sha/api.c.o' -c ../libkms/api.c
> > 
> > Only the c_args from cross-compilation.conf ('-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -g2')
> > are used (in contrast to the 'Appending CFLAGS from environment' message)...
> > 
> > Regards,
> > Peter
> >   
> > > 
> > > Thanks!
> > > 
> > > Thomas  
> >   
> 

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [RFC v3 2/4] meson: change from global to per package cross-compilation.conf
  2018-08-19 13:22       ` Thomas Petazzoni
@ 2018-08-19 17:15         ` Peter Seiderer
  2018-08-19 19:49           ` Peter Seiderer
  0 siblings, 1 reply; 19+ messages in thread
From: Peter Seiderer @ 2018-08-19 17:15 UTC (permalink / raw)
  To: buildroot

Hello Thomas,


On Sun, 19 Aug 2018 15:22:06 +0200, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:

> Hello,
> 
> On Sun, 19 Aug 2018 01:15:12 +0200, Peter Seiderer wrote:
> 
> > The CFLAGS are ignored, e.g. with 'LIBDRM_CONF_ENV += CFLAGS=-DAO_NO_SPARC_V9' in package/libdrm/libdrm.mk:
> > 
> > 	$ make libdrm V=1  
> 
> It seems weird, no? It is documented to be working, and even at runtime
> it tells you "I am going to use those additional CFLAGS". Isn't this a
> bug or a misuse of meson from us ?
> 

Bug or feature of the cross-compilation.conf usage? Will take a look at
the meson sources....

Regards,
Peter

> I would really prefer to understand what is going on here instead of
> having to generate per-package .conf files.
> 
> Thanks!
> 
> Thomas

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [RFC v3 2/4] meson: change from global to per package cross-compilation.conf
  2018-08-19 17:15         ` Peter Seiderer
@ 2018-08-19 19:49           ` Peter Seiderer
  2018-08-19 21:05             ` Thomas Petazzoni
  0 siblings, 1 reply; 19+ messages in thread
From: Peter Seiderer @ 2018-08-19 19:49 UTC (permalink / raw)
  To: buildroot

Hello Thomas,

On Sun, 19 Aug 2018 19:15:11 +0200, Peter Seiderer <ps.report@gmx.net> wrote:

> Hello Thomas,
> 
> 
> On Sun, 19 Aug 2018 15:22:06 +0200, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:
> 
> > Hello,
> > 
> > On Sun, 19 Aug 2018 01:15:12 +0200, Peter Seiderer wrote:
> >   
> > > The CFLAGS are ignored, e.g. with 'LIBDRM_CONF_ENV += CFLAGS=-DAO_NO_SPARC_V9' in package/libdrm/libdrm.mk:
> > > 
> > > 	$ make libdrm V=1    
> > 
> > It seems weird, no? It is documented to be working, and even at runtime
> > it tells you "I am going to use those additional CFLAGS". Isn't this a
> > bug or a misuse of meson from us ?
> >   
> 
> Bug or feature of the cross-compilation.conf usage? Will take a look at
> the meson sources....

Seems to be intentional, see mesonbuild/backend/backends.py#L542 ([1]):

        if not target.is_cross:
            # Compile args added from the env: CFLAGS/CXXFLAGS, etc. We want these
            # to override all the defaults, but not the per-target compile args.
commands += self.environment.coredata.get_external_args(compiler.get_language())

With the 'if not target.is_cross' added with this commit [2] fixing [3] which
suggests adding CROSS_*FLAGS...

Regards,
Peter

[1] https://github.com/mesonbuild/meson/blob/master/mesonbuild/backend/backends.py#L542
[2] https://github.com/mesonbuild/meson/commit/b595cda4ed0ca699da3052a6bd30ba7d1dae1124
[3] https://github.com/mesonbuild/meson/issues/1772

> 
> Regards,
> Peter
> 
> > I would really prefer to understand what is going on here instead of
> > having to generate per-package .conf files.
> > 
> > Thanks!
> > 
> > Thomas  
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [RFC v3 2/4] meson: change from global to per package cross-compilation.conf
  2018-08-19 19:49           ` Peter Seiderer
@ 2018-08-19 21:05             ` Thomas Petazzoni
  0 siblings, 0 replies; 19+ messages in thread
From: Thomas Petazzoni @ 2018-08-19 21:05 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 19 Aug 2018 21:49:17 +0200, Peter Seiderer wrote:

> Seems to be intentional, see mesonbuild/backend/backends.py#L542 ([1]):
> 
>         if not target.is_cross:
>             # Compile args added from the env: CFLAGS/CXXFLAGS, etc. We want these
>             # to override all the defaults, but not the per-target compile args.
> commands += self.environment.coredata.get_external_args(compiler.get_language())
> 
> With the 'if not target.is_cross' added with this commit [2] fixing [3] which
> suggests adding CROSS_*FLAGS...
> 
> Regards,
> Peter
> 
> [1] https://github.com/mesonbuild/meson/blob/master/mesonbuild/backend/backends.py#L542
> [2] https://github.com/mesonbuild/meson/commit/b595cda4ed0ca699da3052a6bd30ba7d1dae1124
> [3] https://github.com/mesonbuild/meson/issues/1772

Meh. This is plain silly, and completely inconsistent with what all
other build systems do. The idea that CFLAGS should not be taken into
account when cross-compiling is really stupid, as is "Cross build
settings should come from the cross file and nowhere else".

But well, OK, let's go with your solution then. I would still like a
proper .conf file to be generated and move in usr/share/buildroot/,
like the CMake file.

Could you also complain in that bug report, to explain that really
CFLAGS should be supported ?

Thanks for the additional research!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [RFC v3 4/4] libinput: bump version to 1.11.0 and convert to meson build
  2018-07-19 20:43 ` [Buildroot] [RFC v3 4/4] libinput: bump version to 1.11.0 and convert to meson build Peter Seiderer
  2018-07-22 12:29   ` Eric Le Bihan
@ 2019-04-07 20:20   ` Thomas Petazzoni
  1 sibling, 0 replies; 19+ messages in thread
From: Thomas Petazzoni @ 2019-04-07 20:20 UTC (permalink / raw)
  To: buildroot

Hello Peter,

On Thu, 19 Jul 2018 22:43:55 +0200
Peter Seiderer <ps.report@gmx.net> wrote:

> For details since 1.8.x see [1], [2] and [3].
> 
> Build system changed from autotools to meson exclusively
> since 1.9.0 (see [1]).
> 
> Add hash for license file.
> 
> [1] https://lists.freedesktop.org/archives/wayland-devel/2017-October/035469.html
> [2] https://lists.freedesktop.org/archives/wayland-devel/2018-February/036957.html
> [3] https://lists.freedesktop.org/archives/wayland-devel/2018-June/038349.html
> 
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>

Sorry for the slow answer. Turns out that in the mean time, another
libinput bump was merged which converted the package to use the meson
build system.

So I marked your patch as Superseded in patchwork.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 19+ messages in thread

* [Buildroot] [RFC v3 3/4] libdrm: change to meson build system
  2018-07-19 20:43 ` [Buildroot] [RFC v3 3/4] libdrm: change to meson build system Peter Seiderer
  2018-07-22 12:28   ` Eric Le Bihan
@ 2019-04-07 20:21   ` Thomas Petazzoni
  1 sibling, 0 replies; 19+ messages in thread
From: Thomas Petazzoni @ 2019-04-07 20:21 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu, 19 Jul 2018 22:43:54 +0200
Peter Seiderer <ps.report@gmx.net> wrote:

> - remove legacy patch
>   0003-configure-Makefile.am-use-pkg-config-to-discover-lib.patch
> 
> - add patch to fix meson atomic ops detection
>   0003-meson.build-fix-intel-atomics-detection.patch
> 
> - add patch to enable static build
>   0004-meson.build-enable-static-build.patch
> 
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>

It's been a while: could you refresh this patch on the latest master
and send a new version ?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2019-04-07 20:21 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-19 20:43 [Buildroot] [RFC v3 1/4] meson: bump version to 0.47.1 Peter Seiderer
2018-07-19 20:43 ` [Buildroot] [RFC v3 2/4] meson: change from global to per package cross-compilation.conf Peter Seiderer
2018-07-22 12:27   ` Eric Le Bihan
2018-08-16 11:57   ` Thomas Petazzoni
2018-08-18 23:15     ` Peter Seiderer
2018-08-19  9:22       ` Yann E. MORIN
2018-08-19 17:13         ` Peter Seiderer
2018-08-19 13:22       ` Thomas Petazzoni
2018-08-19 17:15         ` Peter Seiderer
2018-08-19 19:49           ` Peter Seiderer
2018-08-19 21:05             ` Thomas Petazzoni
2018-07-19 20:43 ` [Buildroot] [RFC v3 3/4] libdrm: change to meson build system Peter Seiderer
2018-07-22 12:28   ` Eric Le Bihan
2019-04-07 20:21   ` Thomas Petazzoni
2018-07-19 20:43 ` [Buildroot] [RFC v3 4/4] libinput: bump version to 1.11.0 and convert to meson build Peter Seiderer
2018-07-22 12:29   ` Eric Le Bihan
2019-04-07 20:20   ` Thomas Petazzoni
2018-07-22 12:21 ` [Buildroot] [RFC v3 1/4] meson: bump version to 0.47.1 Eric Le Bihan
2018-08-16 11:52 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox