Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/pkg-meson.mk: disable staticpic on Coldfire
@ 2023-06-18 18:31 Bernd Kuhls
  2023-06-18 18:31 ` [Buildroot] [PATCH v2 2/2] package/libdisplay-info: new package Bernd Kuhls
  2023-07-10 18:39 ` [Buildroot] [PATCH 1/2] package/pkg-meson.mk: disable staticpic on Coldfire Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 3+ messages in thread
From: Bernd Kuhls @ 2023-06-18 18:31 UTC (permalink / raw)
  To: buildroot; +Cc: Eric Le Bihan

Fixes build error in the upcoming libdisplay-info package:
"Tried to convert PC relative branch to absolute jump" as described
here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101971#c11

Since this issue not only occurs with this package, see
https://git.busybox.net/buildroot/commit/?id=2a48a6ee9d6b81c804182ff0ad6e0f7c850f6839
we add the configure option to pkg-meson.mk.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
Suggested by Yann:
https://lists.buildroot.org/pipermail/buildroot/2023-June/669138.html

 package/pkg-meson.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk
index 4aa6e44afa..65cabf23ba 100644
--- a/package/pkg-meson.mk
+++ b/package/pkg-meson.mk
@@ -156,6 +156,7 @@ define $(2)_CONFIGURE_CMDS
 		--buildtype=$(if $(BR2_ENABLE_RUNTIME_DEBUG),debug,release) \
 		--cross-file=$$($$(PKG)_SRCDIR)/build/cross-compilation.conf \
 		-Db_pie=false \
+		-Db_staticpic=$(if $(BR2_m68k_cf),false,true) \
 		-Dstrip=false \
 		-Dbuild.pkg_config_path=$$(HOST_DIR)/lib/pkgconfig \
 		-Dbuild.cmake_prefix_path=$$(HOST_DIR)/lib/cmake \
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH v2 2/2] package/libdisplay-info: new package
  2023-06-18 18:31 [Buildroot] [PATCH 1/2] package/pkg-meson.mk: disable staticpic on Coldfire Bernd Kuhls
@ 2023-06-18 18:31 ` Bernd Kuhls
  2023-07-10 18:39 ` [Buildroot] [PATCH 1/2] package/pkg-meson.mk: disable staticpic on Coldfire Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Bernd Kuhls @ 2023-06-18 18:31 UTC (permalink / raw)
  To: buildroot; +Cc: Eric Le Bihan

Needed for upcoming Kodi version 21.0-Omega.
Depends on the previous patch to fix build error on Coldfire.

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
---
v2: add upstream commit URL to patch (Yann)
    moved Coldfire fix to pkg-meson.mk (Yann)

 DEVELOPERS                                    |  1 +
 package/Config.in                             |  1 +
 ...0001-displayid.c-Include-sys-types.h.patch | 36 +++++++++++++++++++
 package/libdisplay-info/Config.in             |  8 +++++
 package/libdisplay-info/libdisplay-info.hash  |  3 ++
 package/libdisplay-info/libdisplay-info.mk    | 18 ++++++++++
 6 files changed, 67 insertions(+)
 create mode 100644 package/libdisplay-info/0001-displayid.c-Include-sys-types.h.patch
 create mode 100644 package/libdisplay-info/Config.in
 create mode 100644 package/libdisplay-info/libdisplay-info.hash
 create mode 100644 package/libdisplay-info/libdisplay-info.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index 694dfe0bdd..9b59bbc54b 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -364,6 +364,7 @@ F:	package/libbluray/
 F:	package/libbroadvoice/
 F:	package/libcdio/
 F:	package/libcec/
+F:	package/libdisplay-info/
 F:	package/libcodec2/
 F:	package/libcrossguid/
 F:	package/libdeflate/
diff --git a/package/Config.in b/package/Config.in
index bff090a661..216495646d 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1680,6 +1680,7 @@ menu "Hardware handling"
 	source "package/libatasmart/Config.in"
 	source "package/libblockdev/Config.in"
 	source "package/libcec/Config.in"
+	source "package/libdisplay-info/Config.in"
 	source "package/libfreefare/Config.in"
 	source "package/libftdi/Config.in"
 	source "package/libftdi1/Config.in"
diff --git a/package/libdisplay-info/0001-displayid.c-Include-sys-types.h.patch b/package/libdisplay-info/0001-displayid.c-Include-sys-types.h.patch
new file mode 100644
index 0000000000..3fa57ee10d
--- /dev/null
+++ b/package/libdisplay-info/0001-displayid.c-Include-sys-types.h.patch
@@ -0,0 +1,36 @@
+From 648c1cb66b571b037976b61363654f39448f5fac Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd@kuhls.net>
+Date: Sun, 7 May 2023 14:14:48 +0200
+Subject: [PATCH] displayid.c: Include sys/types.h
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes build error
+../displayid.c:377:10: error: ‘ssize_t’ undeclared (first use in this function); did you mean ‘size_t’?
+
+seen with:
+arc-linux-gcc.br_real (Buildroot 2021.11-4428-g6b6741b) 10.2.0
+
+Upstream: https://gitlab.freedesktop.org/emersion/libdisplay-info/-/commit/5c9801a75f2815790ad1ed5500cec2728a36c6ec
+
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ displayid.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/displayid.c b/displayid.c
+index 398772b..f1749c6 100644
+--- a/displayid.c
++++ b/displayid.c
+@@ -3,6 +3,7 @@
+ #include <inttypes.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <sys/types.h>
+ 
+ #include "bits.h"
+ #include "displayid.h"
+-- 
+2.39.2
+
diff --git a/package/libdisplay-info/Config.in b/package/libdisplay-info/Config.in
new file mode 100644
index 0000000000..b8363ed61b
--- /dev/null
+++ b/package/libdisplay-info/Config.in
@@ -0,0 +1,8 @@
+config BR2_PACKAGE_LIBDISPLAY_INFO
+	bool "libdisplay-info"
+	select BR2_PACKAGE_HWDATA
+	select BR2_PACKAGE_HWDATA_PNP_IDS
+	help
+	  EDID and DisplayID library.
+
+	  https://gitlab.freedesktop.org/emersion/libdisplay-info
diff --git a/package/libdisplay-info/libdisplay-info.hash b/package/libdisplay-info/libdisplay-info.hash
new file mode 100644
index 0000000000..a0829479a8
--- /dev/null
+++ b/package/libdisplay-info/libdisplay-info.hash
@@ -0,0 +1,3 @@
+# Locally computed
+sha256  51cdb0362882ca2af62532ab4d95e60d81e9890b339264719fd55f8e3945d695  libdisplay-info-0.1.1.tar.bz2
+sha256  15b396244e58830c5614b9394f4deccfe684970cd507f299383ab57ad339eedd  LICENSE
diff --git a/package/libdisplay-info/libdisplay-info.mk b/package/libdisplay-info/libdisplay-info.mk
new file mode 100644
index 0000000000..26a6a9a4d9
--- /dev/null
+++ b/package/libdisplay-info/libdisplay-info.mk
@@ -0,0 +1,18 @@
+################################################################################
+#
+# libdisplay-info
+#
+################################################################################
+
+LIBDISPLAY_INFO_VERSION = 0.1.1
+LIBDISPLAY_INFO_SOURCE = libdisplay-info-$(LIBDISPLAY_INFO_VERSION).tar.bz2
+LIBDISPLAY_INFO_SITE = https://gitlab.freedesktop.org/emersion/libdisplay-info/-/archive/$(LIBDISPLAY_INFO_VERSION)
+LIBDISPLAY_INFO_LICENSE = MIT
+LIBDISPLAY_INFO_LICENSE_FILES = LICENSE
+LIBDISPLAY_INFO_INSTALL_STAGING = YES
+LIBDISPLAY_INFO_DEPENDENCIES = hwdata
+
+# workaround for static_assert on uclibc-ng < 1.0.42
+LIBDISPLAY_INFO_CFLAGS += $(TARGET_CFLAGS) -Dstatic_assert=_Static_assert
+
+$(eval $(meson-package))
-- 
2.39.2

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/2] package/pkg-meson.mk: disable staticpic on Coldfire
  2023-06-18 18:31 [Buildroot] [PATCH 1/2] package/pkg-meson.mk: disable staticpic on Coldfire Bernd Kuhls
  2023-06-18 18:31 ` [Buildroot] [PATCH v2 2/2] package/libdisplay-info: new package Bernd Kuhls
@ 2023-07-10 18:39 ` Thomas Petazzoni via buildroot
  1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2023-07-10 18:39 UTC (permalink / raw)
  To: Bernd Kuhls; +Cc: Eric Le Bihan, buildroot

On Sun, 18 Jun 2023 20:31:04 +0200
Bernd Kuhls <bernd@kuhls.net> wrote:

> Fixes build error in the upcoming libdisplay-info package:
> "Tried to convert PC relative branch to absolute jump" as described
> here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101971#c11
> 
> Since this issue not only occurs with this package, see
> https://git.busybox.net/buildroot/commit/?id=2a48a6ee9d6b81c804182ff0ad6e0f7c850f6839
> we add the configure option to pkg-meson.mk.
> 
> Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
> ---
> Suggested by Yann:
> https://lists.buildroot.org/pipermail/buildroot/2023-June/669138.html

I've applied both patches. I'm not a huge fan of the conditions on
BR2_m68k_cf. I would prefer to have some better hidden options such as
BR2_ARCH_SUPPORTS_STATIC_PIC or something like that, with a clear
understanding of which platforms support it and don't support it. But
oh well, I don't know if putting too much effort into Coldfire is
really worth the trouble...

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2023-07-10 18:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-18 18:31 [Buildroot] [PATCH 1/2] package/pkg-meson.mk: disable staticpic on Coldfire Bernd Kuhls
2023-06-18 18:31 ` [Buildroot] [PATCH v2 2/2] package/libdisplay-info: new package Bernd Kuhls
2023-07-10 18:39 ` [Buildroot] [PATCH 1/2] package/pkg-meson.mk: disable staticpic on Coldfire Thomas Petazzoni via buildroot

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