initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
From c1359a49b61016031287d62f44a363cb76242c91 Mon Sep 17 00:00:00 2001
|
||||
From: Matt Weber <matthew.weber@rockwellcollins.com>
|
||||
Date: Sat, 26 Oct 2019 09:17:29 -0500
|
||||
Subject: [PATCH] Prefer ext static libs when --default-library=static
|
||||
|
||||
This patch adds a case in the library pattern logic to prefer static
|
||||
libraries when the Meson Core option for "default_library" is set to
|
||||
solely static.
|
||||
|
||||
The existing library search order makes sense for cases of shared and
|
||||
shared / static mixed. However if using a prebuilt cross-toolchain,
|
||||
they usually provide both a static and shared version of sysroot
|
||||
libraries. This presents a problem in a complete static build where
|
||||
there won't be shared libraries at runtime and during build time there
|
||||
are failures like "ld: attempted static link of dynamic object".
|
||||
|
||||
Bug:
|
||||
https://github.com/mesonbuild/meson/issues/6108
|
||||
|
||||
Fixes:
|
||||
http://autobuild.buildroot.net/results/db1740b4777f436324218c52bc7b08e5c21b667d/
|
||||
http://autobuild.buildroot.net/results/c17/c17bbb12d9deadd64a441b36e324cfbbe8aba5be/
|
||||
|
||||
Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
|
||||
[Updated for 0.57.1 - get_builtin_option() vs. get_option(OptionKey())]
|
||||
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
|
||||
---
|
||||
mesonbuild/compilers/mixins/clike.py | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py
|
||||
index 09ad837b1..b7f6b9f22 100644
|
||||
--- a/mesonbuild/compilers/mixins/clike.py
|
||||
+++ b/mesonbuild/compilers/mixins/clike.py
|
||||
@@ -978,6 +978,9 @@ class CLikeCompiler(Compiler):
|
||||
elif env.machines[self.for_machine].is_cygwin():
|
||||
shlibext = ['dll', 'dll.a']
|
||||
prefixes = ['cyg'] + prefixes
|
||||
+ elif env.coredata.get_option(OptionKey('default_library')) == 'static':
|
||||
+ # Linux/BSDs
|
||||
+ shlibext = ['a']
|
||||
else:
|
||||
# Linux/BSDs
|
||||
shlibext = ['so']
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
From 3d6a2db2270346236dd6247e0648ea0c949ba468 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Sat, 15 Feb 2020 15:13:59 +0100
|
||||
Subject: [PATCH] mesonbuild/dependencies/base.py: add pkg_config_static
|
||||
|
||||
Allow the user to always call pkg-config with --static thanks to a
|
||||
pkg_config_static property. This will allow to fix static build failures
|
||||
with libglib2:
|
||||
|
||||
FAILED: gio/gio
|
||||
/home/naourr/work/instance-0/output-1/host/bin/arm-linux-gcc -o gio/gio 'gio/6ae6c9e@@gio@exe/gio-tool.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-cat.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-copy.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-info.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-list.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-mime.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-mkdir.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-monitor.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-mount.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-move.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-open.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-rename.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-remove.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-save.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-set.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-trash.c.o' 'gio/6ae6c9e@@gio@exe/gio-tool-tree.c.o' -Wl,--as-needed -Wl,--no-undefined -Wl,-O1 -static -Wl,--start-group gio/libgio-2.0.a glib/libglib-2.0.a gobject/libgobject-2.0.a gmodule/libgmodule-2.0.a -pthread /home/naourr/work/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libz.a /home/naourr/work/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libmount.a /home/naourr/work/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libpcre.a -lm /home/naourr/work/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libffi.a -Wl,--end-group '-Wl,-rpath,$ORIGIN/:$ORIGIN/../glib:$ORIGIN/../gobject:$ORIGIN/../gmodule' -Wl,-rpath-link,/home/naourr/work/instance-0/output-1/build/libglib2-2.62.4/build/gio -Wl,-rpath-link,/home/naourr/work/instance-0/output-1/build/libglib2-2.62.4/build/glib -Wl,-rpath-link,/home/naourr/work/instance-0/output-1/build/libglib2-2.62.4/build/gobject -Wl,-rpath-link,/home/naourr/work/instance-0/output-1/build/libglib2-2.62.4/build/gmodule
|
||||
/home/naourr/work/instance-0/output-1/host/opt/ext-toolchain/bin/../lib/gcc/arm-buildroot-linux-uclibcgnueabi/8.3.0/../../../../arm-buildroot-linux-uclibcgnueabi/bin/ld: /home/naourr/work/instance-0/output-1/host/arm-buildroot-linux-uclibcgnueabi/sysroot/usr/lib/libmount.a(la-fs.o): in function `__mnt_fs_set_source_ptr':
|
||||
fs.c:(.text+0x5ec): undefined reference to `blkid_parse_tag_string'
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/0d36952def63cb69628697fa6408aeb6ce10cb5b
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
[Romain: Fix if condition, pkg_config_static is a string not a boolean]
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
[Rebased on 0.57.1]
|
||||
Signed-off-by: Peter Seiderer <ps.report@gmx.net>
|
||||
---
|
||||
mesonbuild/dependencies/pkgconfig.py | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/mesonbuild/dependencies/pkgconfig.py b/mesonbuild/dependencies/pkgconfig.py
|
||||
index 1e8d9132e..d902ba215 100644
|
||||
--- a/mesonbuild/dependencies/pkgconfig.py
|
||||
+++ b/mesonbuild/dependencies/pkgconfig.py
|
||||
@@ -338,7 +338,8 @@ class PkgConfigDependency(ExternalDependency):
|
||||
env = None
|
||||
libcmd = ['--libs']
|
||||
|
||||
- if self.static:
|
||||
+ if self.static or \
|
||||
+ (self.env.properties[self.for_machine].get('pkg_config_static', None) == 'true'):
|
||||
libcmd.append('--static')
|
||||
|
||||
libcmd.append(self.name)
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
# Note: Buildroot's and Meson's terminologies differ about the meaning
|
||||
# of 'build', 'host' and 'target':
|
||||
# - Buildroot's 'host' is Meson's 'build'
|
||||
# - Buildroot's 'target' is Meson's 'host'
|
||||
|
||||
[binaries]
|
||||
c = '@TARGET_CROSS@gcc'
|
||||
cpp = '@TARGET_CROSS@g++'
|
||||
ar = '@TARGET_CROSS@ar'
|
||||
strip = '@TARGET_CROSS@strip'
|
||||
pkgconfig = '@HOST_DIR@/bin/pkgconf'
|
||||
g-ir-compiler = '@STAGING_DIR@/usr/bin/g-ir-compiler'
|
||||
g-ir-scanner = '@STAGING_DIR@/usr/bin/g-ir-scanner'
|
||||
|
||||
[built-in options]
|
||||
c_args = [@TARGET_CFLAGS@]
|
||||
c_link_args = [@TARGET_LDFLAGS@]
|
||||
cpp_args = [@TARGET_CXXFLAGS@]
|
||||
cpp_link_args = [@TARGET_LDFLAGS@]
|
||||
wrap_mode = 'nodownload'
|
||||
|
||||
[properties]
|
||||
needs_exe_wrapper = true
|
||||
sys_root = '@STAGING_DIR@'
|
||||
pkg_config_libdir = '@STAGING_DIR@/usr/lib/pkgconfig:@STAGING_DIR@/usr/share/pkgconfig'
|
||||
pkg_config_static = '@STATIC@'
|
||||
|
||||
[host_machine]
|
||||
system = 'linux'
|
||||
cpu_family = '@TARGET_ARCH@'
|
||||
cpu = '@TARGET_CPU@'
|
||||
endian = '@TARGET_ENDIAN@'
|
||||
@@ -0,0 +1,4 @@
|
||||
# Locally calculated after checking pgp signature
|
||||
# https://github.com/mesonbuild/meson/releases/download/0.60.1/meson-0.60.1.tar.gz.asc
|
||||
sha256 5add789c953d984b500858b2851ee3d7add0460cf1a6f852f0a721af17384e13 meson-0.60.1.tar.gz
|
||||
sha256 cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 COPYING
|
||||
@@ -0,0 +1,60 @@
|
||||
################################################################################
|
||||
#
|
||||
# meson
|
||||
#
|
||||
################################################################################
|
||||
|
||||
MESON_VERSION = 0.60.1
|
||||
MESON_SITE = https://github.com/mesonbuild/meson/releases/download/$(MESON_VERSION)
|
||||
MESON_LICENSE = Apache-2.0
|
||||
MESON_LICENSE_FILES = COPYING
|
||||
MESON_SETUP_TYPE = setuptools
|
||||
|
||||
HOST_MESON_DEPENDENCIES = host-ninja
|
||||
HOST_MESON_NEEDS_HOST_PYTHON = python3
|
||||
|
||||
HOST_MESON_TARGET_ENDIAN = $(call qstrip,$(call LOWERCASE,$(BR2_ENDIAN)))
|
||||
HOST_MESON_TARGET_CPU = $(GCC_TARGET_CPU)
|
||||
|
||||
# https://mesonbuild.com/Reference-tables.html#cpu-families
|
||||
ifeq ($(BR2_arcle)$(BR2_arceb),y)
|
||||
HOST_MESON_TARGET_CPU_FAMILY = arc
|
||||
else ifeq ($(BR2_arm)$(BR2_armeb),y)
|
||||
HOST_MESON_TARGET_CPU_FAMILY = arm
|
||||
else ifeq ($(BR2_aarch64)$(BR2_aarch64_be),y)
|
||||
HOST_MESON_TARGET_CPU_FAMILY = aarch64
|
||||
else ifeq ($(BR2_i386),y)
|
||||
HOST_MESON_TARGET_CPU_FAMILY = x86
|
||||
else ifeq ($(BR2_m68k),y)
|
||||
HOST_MESON_TARGET_CPU_FAMILY = m68k
|
||||
else ifeq ($(BR2_microblazeel)$(BR2_microblazebe),y)
|
||||
HOST_MESON_TARGET_CPU_FAMILY = microblaze
|
||||
else ifeq ($(BR2_mips)$(BR2_mipsel),y)
|
||||
HOST_MESON_TARGET_CPU_FAMILY = mips
|
||||
else ifeq ($(BR2_mips64)$(BR2_mips64el),y)
|
||||
HOST_MESON_TARGET_CPU_FAMILY = mips64
|
||||
else ifeq ($(BR2_powerpc),y)
|
||||
HOST_MESON_TARGET_CPU_FAMILY = ppc
|
||||
else ifeq ($(BR2_powerpc64)$(BR2_powerpc64le),y)
|
||||
HOST_MESON_TARGET_CPU_FAMILY = ppc64
|
||||
else ifeq ($(BR2_riscv),y)
|
||||
HOST_MESON_TARGET_CPU_FAMILY = riscv64
|
||||
else ifeq ($(BR2_sh4)$(BR2_sh4eb)$(BR2_sh4a)$(BR2_sh4aeb),y)
|
||||
HOST_MESON_TARGET_CPU_FAMILY = sh4
|
||||
else ifeq ($(BR2_sparc),y)
|
||||
HOST_MESON_TARGET_CPU_FAMILY = sparc
|
||||
else ifeq ($(BR2_sparc64),y)
|
||||
HOST_MESON_TARGET_CPU_FAMILY = sparc64
|
||||
else ifeq ($(BR2_x86_64),y)
|
||||
HOST_MESON_TARGET_CPU_FAMILY = x86_64
|
||||
else
|
||||
HOST_MESON_TARGET_CPU_FAMILY = $(ARCH)
|
||||
endif
|
||||
|
||||
# Avoid interpreter shebang longer than 128 chars
|
||||
define HOST_MESON_SET_INTERPRETER
|
||||
$(SED) '1s:.*:#!/usr/bin/env python3:' $(HOST_DIR)/bin/meson
|
||||
endef
|
||||
HOST_MESON_POST_INSTALL_HOOKS += HOST_MESON_SET_INTERPRETER
|
||||
|
||||
$(eval $(host-python-package))
|
||||
Reference in New Issue
Block a user