Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/5] poke: new package
@ 2021-05-02 21:49 Romain Naour
  2021-05-02 21:49 ` [Buildroot] [PATCH 1/5] package/bdwgc: Fix 'undefined reference to __data_start' linker error on RISC-V Romain Naour
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Romain Naour @ 2021-05-02 21:49 UTC (permalink / raw)
  To: buildroot

This series add poke package into Buildroot.

In order to build poke on riscv, this series enable riscv support in libatomic_ops
along with a bdwgc fix for riscv64.

The uClibc-ng support has been difficult to add due to issues
with gnulib similar we have with gdb package.
With the workaround applied, poke is working at runtime.
This will be reported to gnulib project.

More info about poke:
https://www.youtube.com/watch?v=92Sykut06N8

Qemu testing:
https://asciinema.org/a/mtFjz7pcN1QuVbxdZhBUfBQTs

Romain Naour (5):
  package/bdwgc: Fix 'undefined reference to __data_start' linker error
    on RISC-V
  package/libatomic_ops: enable for riscv32 and riscv64
  package/poke: new package
  package/poke: add optional json-c dependency
  package/poke: enable uClibc-ng support

 package/Config.in                             |  1 +
 ...ference-to-__data_start-linker-error.patch | 33 ++++++++++++
 package/libatomic_ops/Config.in               |  2 +-
 ...ck-for-Tcl-Tk-if-disable-gui-is-spec.patch | 43 +++++++++++++++
 ...nfig.in-avoit-host-poisoning-while-c.patch | 45 ++++++++++++++++
 ...P2MAN-replace-by-true-when-cross-com.patch | 34 ++++++++++++
 package/poke/Config.in                        | 27 ++++++++++
 package/poke/poke.hash                        |  3 ++
 package/poke/poke.mk                          | 54 +++++++++++++++++++
 9 files changed, 241 insertions(+), 1 deletion(-)
 create mode 100644 package/bdwgc/0001-Fix-undefined-reference-to-__data_start-linker-error.patch
 create mode 100644 package/poke/0001-build-do-not-check-for-Tcl-Tk-if-disable-gui-is-spec.patch
 create mode 100644 package/poke/0002-jitter-jitter-config.in-avoit-host-poisoning-while-c.patch
 create mode 100644 package/poke/0003-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch
 create mode 100644 package/poke/Config.in
 create mode 100644 package/poke/poke.hash
 create mode 100644 package/poke/poke.mk

-- 
2.30.2

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

* [Buildroot] [PATCH 1/5] package/bdwgc: Fix 'undefined reference to __data_start' linker error on RISC-V
  2021-05-02 21:49 [Buildroot] [PATCH 0/5] poke: new package Romain Naour
@ 2021-05-02 21:49 ` Romain Naour
  2021-05-03  0:15   ` Alistair Francis
  2021-05-17 13:04   ` Yann E. MORIN
  2021-05-02 21:49 ` [Buildroot] [PATCH 2/5] package/libatomic_ops: enable for riscv32 and riscv64 Romain Naour
                   ` (3 subsequent siblings)
  4 siblings, 2 replies; 12+ messages in thread
From: Romain Naour @ 2021-05-02 21:49 UTC (permalink / raw)
  To: buildroot

Backport an upstream patch fixing a link issue with libgc.so on RISC-V

riscv64-buildroot-linux-musl/sysroot/usr/lib/libgc.so: undefined reference to `__data_start'

https://gitlab.com/kubu93/buildroot/-/jobs/1229888983

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
 ...ference-to-__data_start-linker-error.patch | 33 +++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 package/bdwgc/0001-Fix-undefined-reference-to-__data_start-linker-error.patch

diff --git a/package/bdwgc/0001-Fix-undefined-reference-to-__data_start-linker-error.patch b/package/bdwgc/0001-Fix-undefined-reference-to-__data_start-linker-error.patch
new file mode 100644
index 0000000000..81221c9f66
--- /dev/null
+++ b/package/bdwgc/0001-Fix-undefined-reference-to-__data_start-linker-error.patch
@@ -0,0 +1,33 @@
+From 301ef15aefa6764466c374d07efb511b1c3862cc Mon Sep 17 00:00:00 2001
+From: Nikita Ermakov <coffe92@gmail.com>
+Date: Wed, 20 May 2020 17:57:17 +0300
+Subject: [PATCH] Fix 'undefined reference to __data_start' linker error on
+ RISC-V
+
+Issue #294 (bdwgc).
+
+* include/private/gcconfig.h [RISCV && LINUX] (__data_start): Add
+attribute(weak).
+
+(cherry picked from commit 538562ad01b181f4cc3913da1ac06a77945cd9b9)
+Signed-off-by: Romain Naour <romain.naour@gmail.com>
+---
+ include/private/gcconfig.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h
+index d9d45da1..d6cefa6f 100644
+--- a/include/private/gcconfig.h
++++ b/include/private/gcconfig.h
+@@ -2943,7 +2943,7 @@ EXTERN_C_BEGIN
+ #   define ALIGNMENT (CPP_WORDSZ/8)
+ #   ifdef LINUX
+ #     define OS_TYPE "LINUX"
+-      extern int __data_start[];
++      extern int __data_start[] __attribute__((__weak__));
+ #     define DATASTART ((ptr_t)__data_start)
+ #     define LINUX_STACKBOTTOM
+ #     define DYNAMIC_LOADING
+-- 
+2.30.2
+
-- 
2.30.2

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

* [Buildroot] [PATCH 2/5] package/libatomic_ops: enable for riscv32 and riscv64
  2021-05-02 21:49 [Buildroot] [PATCH 0/5] poke: new package Romain Naour
  2021-05-02 21:49 ` [Buildroot] [PATCH 1/5] package/bdwgc: Fix 'undefined reference to __data_start' linker error on RISC-V Romain Naour
@ 2021-05-02 21:49 ` Romain Naour
  2021-05-03  0:15   ` Alistair Francis
  2021-05-17 13:06   ` Yann E. MORIN
  2021-05-02 21:49 ` [Buildroot] [PATCH 3/5] package/poke: new package Romain Naour
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 12+ messages in thread
From: Romain Naour @ 2021-05-02 21:49 UTC (permalink / raw)
  To: buildroot

The riscv support has been added since v7.6.4 release.

https://github.com/ivmai/libatomic_ops/commit/137643f1417ded071c56e05401ca6a3c16492d96

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
 package/libatomic_ops/Config.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/libatomic_ops/Config.in b/package/libatomic_ops/Config.in
index e9206f3395..6de5979aeb 100644
--- a/package/libatomic_ops/Config.in
+++ b/package/libatomic_ops/Config.in
@@ -1,6 +1,6 @@
 config BR2_PACKAGE_LIBATOMIC_OPS_ARCH_SUPPORTS
 	bool
-	default y if BR2_arm || BR2_armeb || BR2_aarch64 || BR2_i386 || BR2_sparc || BR2_sparc64 || BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || BR2_x86_64 || BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
+	default y if BR2_arm || BR2_armeb || BR2_aarch64 || BR2_i386 || BR2_sparc || BR2_sparc64 || BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || BR2_x86_64 || BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || BR2_riscv
 	# Unsupported for MIPS R6
 	depends on !BR2_MIPS_CPU_MIPS32R6 && !BR2_MIPS_CPU_MIPS64R6
 
-- 
2.30.2

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

* [Buildroot] [PATCH 3/5] package/poke: new package
  2021-05-02 21:49 [Buildroot] [PATCH 0/5] poke: new package Romain Naour
  2021-05-02 21:49 ` [Buildroot] [PATCH 1/5] package/bdwgc: Fix 'undefined reference to __data_start' linker error on RISC-V Romain Naour
  2021-05-02 21:49 ` [Buildroot] [PATCH 2/5] package/libatomic_ops: enable for riscv32 and riscv64 Romain Naour
@ 2021-05-02 21:49 ` Romain Naour
  2021-05-17 13:25   ` Yann E. MORIN
  2021-05-02 21:49 ` [Buildroot] [PATCH 4/5] package/poke: add optional json-c dependency Romain Naour
  2021-05-02 21:49 ` [Buildroot] [PATCH 5/5] package/poke: enable uClibc-ng support Romain Naour
  4 siblings, 1 reply; 12+ messages in thread
From: Romain Naour @ 2021-05-02 21:49 UTC (permalink / raw)
  To: buildroot

Backport a patch to disable tcl/tk dependencies when gui support
is disabled.

Add a local patch to workaround a path poisoning issue. Issue
reported upstream.

Add another local patch when HELP2MAN is missing.

Disable uClibc-ng toolchain for now due to issues with
bundled gnulib.

See:
http://www.jemarch.net/poke-1.0-relnotes.html
http://www.jemarch.net/poke-1.1-relnotes.html
http://www.jemarch.net/poke-1.2-relnotes.html

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Jose E. Marchesi <jemarch@gnu.org>
Cc: Luca Saiu <positron@gnu.org>
---
Build tested with test-pkg and Runtime tested on gitlab:
https://gitlab.com/kubu93/buildroot/-/jobs/1229817663
---
 package/Config.in                             |  1 +
 ...ck-for-Tcl-Tk-if-disable-gui-is-spec.patch | 43 ++++++++++++++++++
 ...nfig.in-avoit-host-poisoning-while-c.patch | 45 +++++++++++++++++++
 ...P2MAN-replace-by-true-when-cross-com.patch | 34 ++++++++++++++
 package/poke/Config.in                        | 31 +++++++++++++
 package/poke/poke.hash                        |  3 ++
 package/poke/poke.mk                          | 23 ++++++++++
 7 files changed, 180 insertions(+)
 create mode 100644 package/poke/0001-build-do-not-check-for-Tcl-Tk-if-disable-gui-is-spec.patch
 create mode 100644 package/poke/0002-jitter-jitter-config.in-avoit-host-poisoning-while-c.patch
 create mode 100644 package/poke/0003-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch
 create mode 100644 package/poke/Config.in
 create mode 100644 package/poke/poke.hash
 create mode 100644 package/poke/poke.mk

diff --git a/package/Config.in b/package/Config.in
index 6181aaac2c..922ae99e13 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -126,6 +126,7 @@ menu "Debugging, profiling and benchmark"
 	source "package/pcm-tools/Config.in"
 	source "package/piglit/Config.in"
 	source "package/ply/Config.in"
+	source "package/poke/Config.in"
 	source "package/ptm2human/Config.in"
 	source "package/pv/Config.in"
 	source "package/racehound/Config.in"
diff --git a/package/poke/0001-build-do-not-check-for-Tcl-Tk-if-disable-gui-is-spec.patch b/package/poke/0001-build-do-not-check-for-Tcl-Tk-if-disable-gui-is-spec.patch
new file mode 100644
index 0000000000..3bd041a0e7
--- /dev/null
+++ b/package/poke/0001-build-do-not-check-for-Tcl-Tk-if-disable-gui-is-spec.patch
@@ -0,0 +1,43 @@
+From cef3fc90f02ef4fc49515745194bac3d81a2265b Mon Sep 17 00:00:00 2001
+From: "Jose E. Marchesi" <jose.marchesi@oracle.com>
+Date: Fri, 30 Apr 2021 13:17:05 +0200
+Subject: [PATCH] build: do not check for Tcl/Tk if --disable-gui is specified
+
+2021-04-30  Jose E. Marchesi  <jemarch@gnu.org>
+
+	* configure.ac: Do not check for tcl/tk if --disable-gui is
+	specified at configure time.
+
+(cherry picked from commit 280a5e154287e43c0a40d9530a9cc658a7367a9c)
+[Romain: remove Changelog entry]
+Signed-off-by: Romain Naour <romain.naour@gmail.com>
+---
+ configure.ac | 9 ++++++---
+ 1 file changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index c7205513..c2f0760a 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -214,12 +214,15 @@ fi
+ dnl The GUI is optional, and depends on the availability of Tcl and
+ dnl Tk.
+ 
+-POKE_TCLTK
+-
+ AC_ARG_ENABLE([gui],
+               AS_HELP_STRING([--enable-gui],
+                              [Enable the GUI (default is YES)]),
+-              [gui_enabled=$enableval], [gui_enabled=$has_tcltk])
++              [gui_enabled=$enableval], [gui_enabled=yes])
++
++if test "x$gui_enabled" = "xyes"; then
++ POKE_TCLTK
++ gui_enabled=$has_tcltk
++fi
+ 
+ AM_CONDITIONAL([GUI], [test "x$gui_enabled" = "xyes"])
+ 
+-- 
+2.30.2
+
diff --git a/package/poke/0002-jitter-jitter-config.in-avoit-host-poisoning-while-c.patch b/package/poke/0002-jitter-jitter-config.in-avoit-host-poisoning-while-c.patch
new file mode 100644
index 0000000000..fa55f817ff
--- /dev/null
+++ b/package/poke/0002-jitter-jitter-config.in-avoit-host-poisoning-while-c.patch
@@ -0,0 +1,45 @@
+From c37419e459bd5863534719fa50755174d0912e6d Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@gmail.com>
+Date: Fri, 30 Apr 2021 14:32:21 +0200
+Subject: [PATCH] jitter: jitter-config.in: avoit host poisoning while
+ cross-compiling
+
+When jitter is bundled into another project (poke), jitter-config --cppflags
+return an unsafe path "-I /usr/include".
+
+In the context of Buildroot, such configuration script woulf be "fixed"
+after installation. But jitter-config is not installed by poke since it's
+build as static library and liked to poke.
+
+For now, patch jitter-config.in instead of jitter-config.in.m4sh since
+there is an issue while converting the M4sh m4sh script ( .in.m4sh )
+into a portable shell script ( .in ) ready to be processed by aclocal
+for @-substitutions.
+
+[1] https://git.buildroot.net/buildroot/tree/package/pkg-generic.mk?h=2021.02.1#n291
+
+Signed-off-by: Romain Naour <romain.naour@gmail.com>
+---
+ jitter/bin/jitter-config.in | 6 +-----
+ 1 file changed, 1 insertion(+), 5 deletions(-)
+
+diff --git a/jitter/bin/jitter-config.in b/jitter/bin/jitter-config.in
+index 5e124f0..af0ac9d 100644
+--- a/jitter/bin/jitter-config.in
++++ b/jitter/bin/jitter-config.in
+@@ -998,11 +998,7 @@ while test "$#" != "0"; do
+             append_to_output cflags;;
+         --cppflags)
+             no_option_argument
+-            append_to_output cppflags
+-            # Append a -I argument.  This is defined separately from the rest,
+-            # as the installation prefix can be decided very late, at Jitter
+-            # installation time.
+-            output="$output -I $includedir";;
++            append_to_output cppflags;;
+         --ldadd)
+             no_option_argument
+             append_to_output ldadd;;
+-- 
+2.30.2
+
diff --git a/package/poke/0003-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch b/package/poke/0003-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch
new file mode 100644
index 0000000000..f217c917f1
--- /dev/null
+++ b/package/poke/0003-configure.ac-HELP2MAN-replace-by-true-when-cross-com.patch
@@ -0,0 +1,34 @@
+From 8ba76a5a7ce311f67890199c5595bc1f626495ad Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@gmail.com>
+Date: Fri, 30 Apr 2021 15:43:59 +0200
+Subject: [PATCH] configure.ac: HELP2MAN replace ':' by 'true' when
+ cross-compiling
+
+Avoid:
+/usr/bin/make  ./../poke/poke
+../run \
+  : -p poke --name="The GNU extensible binary editor" \
+      ./../poke/poke -o ./poke.1
+../run: line 51: exec: :: not found
+
+Signed-off-by: Romain Naour <romain.naour@gmail.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index c2f0760a..93769ef9 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -74,7 +74,7 @@ gl_LIBTEXTSTYLE_OPTIONAL([0.20.5])
+ if test $cross_compiling = no; then
+   AM_MISSING_PROG(HELP2MAN, help2man)
+ else
+-  HELP2MAN=:
++  HELP2MAN=true
+ fi
+ 
+ dnl recfix is part of the GNU recutils suite, and is used in cfg.mk to
+-- 
+2.30.2
+
diff --git a/package/poke/Config.in b/package/poke/Config.in
new file mode 100644
index 0000000000..5d391bfb43
--- /dev/null
+++ b/package/poke/Config.in
@@ -0,0 +1,31 @@
+config BR2_PACKAGE_POKE
+	bool "poke"
+	depends on BR2_PACKAGE_LIBATOMIC_OPS_ARCH_SUPPORTS # bdwgc
+	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # less
+	depends on BR2_USE_WCHAR # needs wctomb
+	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
+	depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL # gnulib
+	select BR2_PACKAGE_BDWGC
+	select BR2_PACKAGE_LESS # runtime
+	select BR2_PACKAGE_READLINE
+	help
+	  GNU poke is a new interactive editor for binary data. Not
+	  limited to editing basic entities such as bits and bytes,
+	  it provides a full-fledged procedural, interactive
+	  programming language designed to describe data structures
+	  and to operate on them. Once a user has defined a structure
+	  for binary data (usually matching some file format) she can
+	  search, inspect, create, shuffle and modify abstract entities
+	  such as ELF relocations, MP3 tags, DWARF expressions,
+	  partition table entries, and so on, with primitives
+	  resembling simple editing of bits and bytes. The program
+	  comes with a library of already written descriptions (or
+	  "pickles" in poke parlance) for many binary formats.
+
+	  https://www.gnu.org/software/poke/
+
+comment "poke needs a toolchain w/ NPTL, wchar"
+	depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_USE_WCHAR
+
+comment "poke needs glibc or musl"
+	depends on !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL)
diff --git a/package/poke/poke.hash b/package/poke/poke.hash
new file mode 100644
index 0000000000..f8d23e635a
--- /dev/null
+++ b/package/poke/poke.hash
@@ -0,0 +1,3 @@
+# Locally calculated
+sha256  f61cf8da5b64c01a1359373725aad1ca257f35c1c9269e4d50dd0664183ddf62  poke-1.2.tar.gz
+sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  COPYING
diff --git a/package/poke/poke.mk b/package/poke/poke.mk
new file mode 100644
index 0000000000..ecf2221acd
--- /dev/null
+++ b/package/poke/poke.mk
@@ -0,0 +1,23 @@
+################################################################################
+#
+# poke
+#
+################################################################################
+
+POKE_VERSION = 1.2
+POKE_SITE = $(BR2_GNU_MIRROR)/poke
+POKE_LICENSE = GPL-3.0+
+POKE_LICENSE_FILES = COPYING
+
+# 0001-build-do-not-check-for-Tcl-Tk-if-disable-gui-is-spec.patch
+# 0003-configure.ac-HELP2MAN-replace-by-false-when-cross-co.patch
+POKE_AUTORECONF = YES
+
+POKE_DEPENDENCIES = host-flex host-bison host-pkgconf bdwgc readline
+
+POKE_CONF_OPTS = --disable-gui \
+	--disable-libnbd \
+	--disable-mi \
+	--with-libreadline-prefix=$(STAGING_DIR)
+
+$(eval $(autotools-package))
-- 
2.30.2

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

* [Buildroot] [PATCH 4/5] package/poke: add optional json-c dependency
  2021-05-02 21:49 [Buildroot] [PATCH 0/5] poke: new package Romain Naour
                   ` (2 preceding siblings ...)
  2021-05-02 21:49 ` [Buildroot] [PATCH 3/5] package/poke: new package Romain Naour
@ 2021-05-02 21:49 ` Romain Naour
  2021-05-02 21:49 ` [Buildroot] [PATCH 5/5] package/poke: enable uClibc-ng support Romain Naour
  4 siblings, 0 replies; 12+ messages in thread
From: Romain Naour @ 2021-05-02 21:49 UTC (permalink / raw)
  To: buildroot

From [1]:
"The poke machine-interface uses a protocol to communicate with
clients, which is based on JSON.  poke uses the json-c library to
parse and build JSON strings.
If this library is not found, poke will build without machine-interface
support."

[1] https://git.savannah.nongnu.org/cgit/poke.git/tree/DEPENDENCIES?h=releases/poke-1.2#n55

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Jose E. Marchesi <jemarch@gnu.org>
Cc: Luca Saiu <positron@gnu.org>
---
 package/poke/poke.mk | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/package/poke/poke.mk b/package/poke/poke.mk
index ecf2221acd..268b9598d7 100644
--- a/package/poke/poke.mk
+++ b/package/poke/poke.mk
@@ -17,7 +17,13 @@ POKE_DEPENDENCIES = host-flex host-bison host-pkgconf bdwgc readline
 
 POKE_CONF_OPTS = --disable-gui \
 	--disable-libnbd \
-	--disable-mi \
 	--with-libreadline-prefix=$(STAGING_DIR)
 
+ifeq ($(BR2_PACKAGE_JSON_C),y)
+POKE_DEPENDENCIES += json-c
+POKE_CONF_OPTS += --enable-mi
+else
+POKE_CONF_OPTS += --disable-mi
+endif
+
 $(eval $(autotools-package))
-- 
2.30.2

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

* [Buildroot] [PATCH 5/5] package/poke: enable uClibc-ng support
  2021-05-02 21:49 [Buildroot] [PATCH 0/5] poke: new package Romain Naour
                   ` (3 preceding siblings ...)
  2021-05-02 21:49 ` [Buildroot] [PATCH 4/5] package/poke: add optional json-c dependency Romain Naour
@ 2021-05-02 21:49 ` Romain Naour
  4 siblings, 0 replies; 12+ messages in thread
From: Romain Naour @ 2021-05-02 21:49 UTC (permalink / raw)
  To: buildroot

poke bundle gnulib that doesn't support the case where
host_os='linux-uclibc'. When cross-compiling, the guessed
answers are mostly wrong and gnulib will try to replace
snprintf with rpl_snprintf. This lead to "undefined reference
to `rpl_snprintf'" errors.

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
 package/poke/Config.in |  4 ----
 package/poke/poke.mk   | 25 +++++++++++++++++++++++++
 2 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/package/poke/Config.in b/package/poke/Config.in
index 5d391bfb43..762ed0221d 100644
--- a/package/poke/Config.in
+++ b/package/poke/Config.in
@@ -4,7 +4,6 @@ config BR2_PACKAGE_POKE
 	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # less
 	depends on BR2_USE_WCHAR # needs wctomb
 	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
-	depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL # gnulib
 	select BR2_PACKAGE_BDWGC
 	select BR2_PACKAGE_LESS # runtime
 	select BR2_PACKAGE_READLINE
@@ -26,6 +25,3 @@ config BR2_PACKAGE_POKE
 
 comment "poke needs a toolchain w/ NPTL, wchar"
 	depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_USE_WCHAR
-
-comment "poke needs glibc or musl"
-	depends on !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL)
diff --git a/package/poke/poke.mk b/package/poke/poke.mk
index 268b9598d7..cff52d37bf 100644
--- a/package/poke/poke.mk
+++ b/package/poke/poke.mk
@@ -15,6 +15,31 @@ POKE_AUTORECONF = YES
 
 POKE_DEPENDENCIES = host-flex host-bison host-pkgconf bdwgc readline
 
+# poke bundle gnulib that doesn't support the case where
+# host_os='linux-uclibc'. When cross-compiling, the guessed
+# answers are mostly wrong and gnulib will try to replace
+# snprintf with rpl_snprintf. This lead to "undefined reference
+# to `rpl_snprintf'" errors.
+ifeq ($(BR2_TOOLCHAIN_USES_UCLIBC),y)
+POKE_CONF_ENV = gl_cv_func_printf_positions=yes \
+	gl_cv_func_snprintf_retval_c99=yes \
+	gl_cv_func_printf_sizes_c99=yes \
+	gl_cv_func_printf_infinite_long_double=yes \
+	gl_cv_func_snprintf_retval_c99=yes \
+	gl_cv_func_snprintf_truncation_c99=yes \
+	gl_cv_func_snprintf_usable=yes \
+	gl_cv_func_strerror_0_works=yes \
+	gl_cv_header_working_stdint_h=yes \
+	gl_cv_func_printf_infinite=yes \
+	gl_cv_func_printf_flag_zero=yes \
+	gl_cv_func_printf_enomem=yes \
+	gl_cv_func_printf_directive_f=yes \
+	gl_cv_func_printf_directive_a=yes \
+	gl_cv_func_snprintf_directive_n=yes \
+	gl_cv_func_vsnprintf_posix=yes \
+	gl_cv_func_vsnprintf_zerosize_c99=yes
+endif
+
 POKE_CONF_OPTS = --disable-gui \
 	--disable-libnbd \
 	--with-libreadline-prefix=$(STAGING_DIR)
-- 
2.30.2

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

* [Buildroot] [PATCH 1/5] package/bdwgc: Fix 'undefined reference to __data_start' linker error on RISC-V
  2021-05-02 21:49 ` [Buildroot] [PATCH 1/5] package/bdwgc: Fix 'undefined reference to __data_start' linker error on RISC-V Romain Naour
@ 2021-05-03  0:15   ` Alistair Francis
  2021-05-17 13:04   ` Yann E. MORIN
  1 sibling, 0 replies; 12+ messages in thread
From: Alistair Francis @ 2021-05-03  0:15 UTC (permalink / raw)
  To: buildroot

On Mon, May 3, 2021 at 7:49 AM Romain Naour <romain.naour@gmail.com> wrote:
>
> Backport an upstream patch fixing a link issue with libgc.so on RISC-V
>
> riscv64-buildroot-linux-musl/sysroot/usr/lib/libgc.so: undefined reference to `__data_start'
>
> https://gitlab.com/kubu93/buildroot/-/jobs/1229888983
>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  ...ference-to-__data_start-linker-error.patch | 33 +++++++++++++++++++
>  1 file changed, 33 insertions(+)
>  create mode 100644 package/bdwgc/0001-Fix-undefined-reference-to-__data_start-linker-error.patch
>
> diff --git a/package/bdwgc/0001-Fix-undefined-reference-to-__data_start-linker-error.patch b/package/bdwgc/0001-Fix-undefined-reference-to-__data_start-linker-error.patch
> new file mode 100644
> index 0000000000..81221c9f66
> --- /dev/null
> +++ b/package/bdwgc/0001-Fix-undefined-reference-to-__data_start-linker-error.patch
> @@ -0,0 +1,33 @@
> +From 301ef15aefa6764466c374d07efb511b1c3862cc Mon Sep 17 00:00:00 2001
> +From: Nikita Ermakov <coffe92@gmail.com>
> +Date: Wed, 20 May 2020 17:57:17 +0300
> +Subject: [PATCH] Fix 'undefined reference to __data_start' linker error on
> + RISC-V
> +
> +Issue #294 (bdwgc).
> +
> +* include/private/gcconfig.h [RISCV && LINUX] (__data_start): Add
> +attribute(weak).
> +
> +(cherry picked from commit 538562ad01b181f4cc3913da1ac06a77945cd9b9)
> +Signed-off-by: Romain Naour <romain.naour@gmail.com>
> +---
> + include/private/gcconfig.h | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h
> +index d9d45da1..d6cefa6f 100644
> +--- a/include/private/gcconfig.h
> ++++ b/include/private/gcconfig.h
> +@@ -2943,7 +2943,7 @@ EXTERN_C_BEGIN
> + #   define ALIGNMENT (CPP_WORDSZ/8)
> + #   ifdef LINUX
> + #     define OS_TYPE "LINUX"
> +-      extern int __data_start[];
> ++      extern int __data_start[] __attribute__((__weak__));
> + #     define DATASTART ((ptr_t)__data_start)
> + #     define LINUX_STACKBOTTOM
> + #     define DYNAMIC_LOADING
> +--
> +2.30.2
> +
> --
> 2.30.2
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 2/5] package/libatomic_ops: enable for riscv32 and riscv64
  2021-05-02 21:49 ` [Buildroot] [PATCH 2/5] package/libatomic_ops: enable for riscv32 and riscv64 Romain Naour
@ 2021-05-03  0:15   ` Alistair Francis
  2021-05-17 13:06   ` Yann E. MORIN
  1 sibling, 0 replies; 12+ messages in thread
From: Alistair Francis @ 2021-05-03  0:15 UTC (permalink / raw)
  To: buildroot

On Mon, May 3, 2021 at 7:50 AM Romain Naour <romain.naour@gmail.com> wrote:
>
> The riscv support has been added since v7.6.4 release.
>
> https://github.com/ivmai/libatomic_ops/commit/137643f1417ded071c56e05401ca6a3c16492d96
>
> Signed-off-by: Romain Naour <romain.naour@gmail.com>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  package/libatomic_ops/Config.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/package/libatomic_ops/Config.in b/package/libatomic_ops/Config.in
> index e9206f3395..6de5979aeb 100644
> --- a/package/libatomic_ops/Config.in
> +++ b/package/libatomic_ops/Config.in
> @@ -1,6 +1,6 @@
>  config BR2_PACKAGE_LIBATOMIC_OPS_ARCH_SUPPORTS
>         bool
> -       default y if BR2_arm || BR2_armeb || BR2_aarch64 || BR2_i386 || BR2_sparc || BR2_sparc64 || BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || BR2_x86_64 || BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
> +       default y if BR2_arm || BR2_armeb || BR2_aarch64 || BR2_i386 || BR2_sparc || BR2_sparc64 || BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || BR2_x86_64 || BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || BR2_riscv
>         # Unsupported for MIPS R6
>         depends on !BR2_MIPS_CPU_MIPS32R6 && !BR2_MIPS_CPU_MIPS64R6
>
> --
> 2.30.2
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

* [Buildroot] [PATCH 1/5] package/bdwgc: Fix 'undefined reference to __data_start' linker error on RISC-V
  2021-05-02 21:49 ` [Buildroot] [PATCH 1/5] package/bdwgc: Fix 'undefined reference to __data_start' linker error on RISC-V Romain Naour
  2021-05-03  0:15   ` Alistair Francis
@ 2021-05-17 13:04   ` Yann E. MORIN
  1 sibling, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2021-05-17 13:04 UTC (permalink / raw)
  To: buildroot

Romain, All,

On 2021-05-02 23:49 +0200, Romain Naour spake thusly:
> Backport an upstream patch fixing a link issue with libgc.so on RISC-V
> 
> riscv64-buildroot-linux-musl/sysroot/usr/lib/libgc.so: undefined reference to `__data_start'
> 
> https://gitlab.com/kubu93/buildroot/-/jobs/1229888983
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>

I considered applying for master, but that depends on libatomic-ops
support on riscv, which is arguably a new feature, so does not belong to
master.

Applied to next, thanks.

Regards,
Yann E. MORIN.

> ---
>  ...ference-to-__data_start-linker-error.patch | 33 +++++++++++++++++++
>  1 file changed, 33 insertions(+)
>  create mode 100644 package/bdwgc/0001-Fix-undefined-reference-to-__data_start-linker-error.patch
> 
> diff --git a/package/bdwgc/0001-Fix-undefined-reference-to-__data_start-linker-error.patch b/package/bdwgc/0001-Fix-undefined-reference-to-__data_start-linker-error.patch
> new file mode 100644
> index 0000000000..81221c9f66
> --- /dev/null
> +++ b/package/bdwgc/0001-Fix-undefined-reference-to-__data_start-linker-error.patch
> @@ -0,0 +1,33 @@
> +From 301ef15aefa6764466c374d07efb511b1c3862cc Mon Sep 17 00:00:00 2001
> +From: Nikita Ermakov <coffe92@gmail.com>
> +Date: Wed, 20 May 2020 17:57:17 +0300
> +Subject: [PATCH] Fix 'undefined reference to __data_start' linker error on
> + RISC-V
> +
> +Issue #294 (bdwgc).
> +
> +* include/private/gcconfig.h [RISCV && LINUX] (__data_start): Add
> +attribute(weak).
> +
> +(cherry picked from commit 538562ad01b181f4cc3913da1ac06a77945cd9b9)
> +Signed-off-by: Romain Naour <romain.naour@gmail.com>
> +---
> + include/private/gcconfig.h | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h
> +index d9d45da1..d6cefa6f 100644
> +--- a/include/private/gcconfig.h
> ++++ b/include/private/gcconfig.h
> +@@ -2943,7 +2943,7 @@ EXTERN_C_BEGIN
> + #   define ALIGNMENT (CPP_WORDSZ/8)
> + #   ifdef LINUX
> + #     define OS_TYPE "LINUX"
> +-      extern int __data_start[];
> ++      extern int __data_start[] __attribute__((__weak__));
> + #     define DATASTART ((ptr_t)__data_start)
> + #     define LINUX_STACKBOTTOM
> + #     define DYNAMIC_LOADING
> +-- 
> +2.30.2
> +
> -- 
> 2.30.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH 2/5] package/libatomic_ops: enable for riscv32 and riscv64
  2021-05-02 21:49 ` [Buildroot] [PATCH 2/5] package/libatomic_ops: enable for riscv32 and riscv64 Romain Naour
  2021-05-03  0:15   ` Alistair Francis
@ 2021-05-17 13:06   ` Yann E. MORIN
  1 sibling, 0 replies; 12+ messages in thread
From: Yann E. MORIN @ 2021-05-17 13:06 UTC (permalink / raw)
  To: buildroot

Romain, All,

On 2021-05-02 23:49 +0200, Romain Naour spake thusly:
> The riscv support has been added since v7.6.4 release.
> 
> https://github.com/ivmai/libatomic_ops/commit/137643f1417ded071c56e05401ca6a3c16492d96
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> ---
>  package/libatomic_ops/Config.in | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/libatomic_ops/Config.in b/package/libatomic_ops/Config.in
> index e9206f3395..6de5979aeb 100644
> --- a/package/libatomic_ops/Config.in
> +++ b/package/libatomic_ops/Config.in
> @@ -1,6 +1,6 @@
>  config BR2_PACKAGE_LIBATOMIC_OPS_ARCH_SUPPORTS
>  	bool
> -	default y if BR2_arm || BR2_armeb || BR2_aarch64 || BR2_i386 || BR2_sparc || BR2_sparc64 || BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || BR2_x86_64 || BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el
> +	default y if BR2_arm || BR2_armeb || BR2_aarch64 || BR2_i386 || BR2_sparc || BR2_sparc64 || BR2_powerpc || BR2_powerpc64 || BR2_powerpc64le || BR2_x86_64 || BR2_mips || BR2_mipsel || BR2_mips64 || BR2_mips64el || BR2_riscv

This line is waaayy too long. I've split it, reordered the archs
alphabetically, and groupped rlated archs together (i386 with x86_64).

Riscv support is a new feature, so: applied to next, thanks.

Regards,
Yann E. MORIN.

>  	# Unsupported for MIPS R6
>  	depends on !BR2_MIPS_CPU_MIPS32R6 && !BR2_MIPS_CPU_MIPS64R6
>  
> -- 
> 2.30.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH 3/5] package/poke: new package
  2021-05-02 21:49 ` [Buildroot] [PATCH 3/5] package/poke: new package Romain Naour
@ 2021-05-17 13:25   ` Yann E. MORIN
  2021-05-17 14:19     ` Romain Naour
  0 siblings, 1 reply; 12+ messages in thread
From: Yann E. MORIN @ 2021-05-17 13:25 UTC (permalink / raw)
  To: buildroot

On 2021-05-02 23:49 +0200, Romain Naour spake thusly:
> Backport a patch to disable tcl/tk dependencies when gui support
> is disabled.
> 
> Add a local patch to workaround a path poisoning issue. Issue
> reported upstream.

Upstream has applied a patch similar to yours:
    http://git.ageinghacker.net/jitter/commit?id=428406c7b8d4c20f3472d41ed57c12c1a88ad37e

> Add another local patch when HELP2MAN is missing.
> 
> Disable uClibc-ng toolchain for now due to issues with
> bundled gnulib.
> 
> See:
> http://www.jemarch.net/poke-1.0-relnotes.html
> http://www.jemarch.net/poke-1.1-relnotes.html
> http://www.jemarch.net/poke-1.2-relnotes.html
> 
> Signed-off-by: Romain Naour <romain.naour@gmail.com>
> Cc: Jose E. Marchesi <jemarch@gnu.org>
> Cc: Luca Saiu <positron@gnu.org>
[--SNIP--]
> diff --git a/package/poke/Config.in b/package/poke/Config.in
> new file mode 100644
> index 0000000000..5d391bfb43
> --- /dev/null
> +++ b/package/poke/Config.in
> @@ -0,0 +1,31 @@
> +config BR2_PACKAGE_POKE
> +	bool "poke"
> +	depends on BR2_PACKAGE_LIBATOMIC_OPS_ARCH_SUPPORTS # bdwgc
> +	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # less
> +	depends on BR2_USE_WCHAR # needs wctomb
> +	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
> +	depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL # gnulib
> +	select BR2_PACKAGE_BDWGC
> +	select BR2_PACKAGE_LESS # runtime
> +	select BR2_PACKAGE_READLINE
> +	help
> +	  GNU poke is a new interactive editor for binary data. Not
> +	  limited to editing basic entities such as bits and bytes,
> +	  it provides a full-fledged procedural, interactive
> +	  programming language designed to describe data structures
> +	  and to operate on them. Once a user has defined a structure
> +	  for binary data (usually matching some file format) she can
> +	  search, inspect, create, shuffle and modify abstract entities
> +	  such as ELF relocations, MP3 tags, DWARF expressions,
> +	  partition table entries, and so on, with primitives
> +	  resembling simple editing of bits and bytes. The program
> +	  comes with a library of already written descriptions (or
> +	  "pickles" in poke parlance) for many binary formats.
> +
> +	  https://www.gnu.org/software/poke/
> +
> +comment "poke needs a toolchain w/ NPTL, wchar"
> +	depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_USE_WCHAR
> +
> +comment "poke needs glibc or musl"
> +	depends on !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL)

This can (should) be made a single comment:

    comment "poke needs a glibc or musl toolchain w/ NPTL, wchar"
        depends on ...

> diff --git a/package/poke/poke.hash b/package/poke/poke.hash
> new file mode 100644
> index 0000000000..f8d23e635a
> --- /dev/null
> +++ b/package/poke/poke.hash
> @@ -0,0 +1,3 @@
> +# Locally calculated
> +sha256  f61cf8da5b64c01a1359373725aad1ca257f35c1c9269e4d50dd0664183ddf62  poke-1.2.tar.gz
> +sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  COPYING
> diff --git a/package/poke/poke.mk b/package/poke/poke.mk
> new file mode 100644
> index 0000000000..ecf2221acd
> --- /dev/null
> +++ b/package/poke/poke.mk
> @@ -0,0 +1,23 @@
> +################################################################################
> +#
> +# poke
> +#
> +################################################################################
> +
> +POKE_VERSION = 1.2
> +POKE_SITE = $(BR2_GNU_MIRROR)/poke
> +POKE_LICENSE = GPL-3.0+
> +POKE_LICENSE_FILES = COPYING

poke bundles jitter and gnulib; we need the licensing info for those,
too, license names and files (jitter: GPL-3.0+; gnulib: a bit of a
mess.)

> +# 0001-build-do-not-check-for-Tcl-Tk-if-disable-gui-is-spec.patch
> +# 0003-configure.ac-HELP2MAN-replace-by-false-when-cross-co.patch
> +POKE_AUTORECONF = YES
> +
> +POKE_DEPENDENCIES = host-flex host-bison host-pkgconf bdwgc readline
> +
> +POKE_CONF_OPTS = --disable-gui \
> +	--disable-libnbd \
> +	--disable-mi \
> +	--with-libreadline-prefix=$(STAGING_DIR)

Nitpick: with multi-line assignment, have even the first item on its own
line:

    POKE_CONF_OPTS = \
        --disable-gui \
        --disable-libnbd \
        --disable-mi \
        --with-libreadline-prefix=$(STAGING_DIR)

> +$(eval $(autotools-package))
> -- 
> 2.30.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

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

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

* [Buildroot] [PATCH 3/5] package/poke: new package
  2021-05-17 13:25   ` Yann E. MORIN
@ 2021-05-17 14:19     ` Romain Naour
  0 siblings, 0 replies; 12+ messages in thread
From: Romain Naour @ 2021-05-17 14:19 UTC (permalink / raw)
  To: buildroot

Hello Yann,

Thanks for your review :)

Le 17/05/2021 ? 15:25, Yann E. MORIN a ?crit?:
> On 2021-05-02 23:49 +0200, Romain Naour spake thusly:
>> Backport a patch to disable tcl/tk dependencies when gui support
>> is disabled.
>>
>> Add a local patch to workaround a path poisoning issue. Issue
>> reported upstream.
> 
> Upstream has applied a patch similar to yours:
>     http://git.ageinghacker.net/jitter/commit?id=428406c7b8d4c20f3472d41ed57c12c1a88ad37e

It seems I was involved in this upstream patch :)

The patch was committed just after my testing but as explained the my patch,
patching jitter-config.in.m4sh doesn't work well in Buildroot.

> 
>> Add another local patch when HELP2MAN is missing.
>>
>> Disable uClibc-ng toolchain for now due to issues with
>> bundled gnulib.
>>
>> See:
>> http://www.jemarch.net/poke-1.0-relnotes.html
>> http://www.jemarch.net/poke-1.1-relnotes.html
>> http://www.jemarch.net/poke-1.2-relnotes.html
>>
>> Signed-off-by: Romain Naour <romain.naour@gmail.com>
>> Cc: Jose E. Marchesi <jemarch@gnu.org>
>> Cc: Luca Saiu <positron@gnu.org>
> [--SNIP--]
>> diff --git a/package/poke/Config.in b/package/poke/Config.in
>> new file mode 100644
>> index 0000000000..5d391bfb43
>> --- /dev/null
>> +++ b/package/poke/Config.in
>> @@ -0,0 +1,31 @@
>> +config BR2_PACKAGE_POKE
>> +	bool "poke"
>> +	depends on BR2_PACKAGE_LIBATOMIC_OPS_ARCH_SUPPORTS # bdwgc
>> +	depends on BR2_PACKAGE_BUSYBOX_SHOW_OTHERS # less
>> +	depends on BR2_USE_WCHAR # needs wctomb
>> +	depends on BR2_TOOLCHAIN_HAS_THREADS_NPTL
>> +	depends on BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL # gnulib
>> +	select BR2_PACKAGE_BDWGC
>> +	select BR2_PACKAGE_LESS # runtime
>> +	select BR2_PACKAGE_READLINE
>> +	help
>> +	  GNU poke is a new interactive editor for binary data. Not
>> +	  limited to editing basic entities such as bits and bytes,
>> +	  it provides a full-fledged procedural, interactive
>> +	  programming language designed to describe data structures
>> +	  and to operate on them. Once a user has defined a structure
>> +	  for binary data (usually matching some file format) she can
>> +	  search, inspect, create, shuffle and modify abstract entities
>> +	  such as ELF relocations, MP3 tags, DWARF expressions,
>> +	  partition table entries, and so on, with primitives
>> +	  resembling simple editing of bits and bytes. The program
>> +	  comes with a library of already written descriptions (or
>> +	  "pickles" in poke parlance) for many binary formats.
>> +
>> +	  https://www.gnu.org/software/poke/
>> +
>> +comment "poke needs a toolchain w/ NPTL, wchar"
>> +	depends on !BR2_TOOLCHAIN_HAS_THREADS_NPTL || !BR2_USE_WCHAR
>> +
>> +comment "poke needs glibc or musl"
>> +	depends on !(BR2_TOOLCHAIN_USES_GLIBC || BR2_TOOLCHAIN_USES_MUSL)
> 
> This can (should) be made a single comment:
> 
>     comment "poke needs a glibc or musl toolchain w/ NPTL, wchar"
>         depends on ...

ok

> 
>> diff --git a/package/poke/poke.hash b/package/poke/poke.hash
>> new file mode 100644
>> index 0000000000..f8d23e635a
>> --- /dev/null
>> +++ b/package/poke/poke.hash
>> @@ -0,0 +1,3 @@
>> +# Locally calculated
>> +sha256  f61cf8da5b64c01a1359373725aad1ca257f35c1c9269e4d50dd0664183ddf62  poke-1.2.tar.gz
>> +sha256  8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903  COPYING
>> diff --git a/package/poke/poke.mk b/package/poke/poke.mk
>> new file mode 100644
>> index 0000000000..ecf2221acd
>> --- /dev/null
>> +++ b/package/poke/poke.mk
>> @@ -0,0 +1,23 @@
>> +################################################################################
>> +#
>> +# poke
>> +#
>> +################################################################################
>> +
>> +POKE_VERSION = 1.2
>> +POKE_SITE = $(BR2_GNU_MIRROR)/poke
>> +POKE_LICENSE = GPL-3.0+
>> +POKE_LICENSE_FILES = COPYING
> 
> poke bundles jitter and gnulib; we need the licensing info for those,
> too, license names and files (jitter: GPL-3.0+; gnulib: a bit of a
> mess.)

gnulib: Something like this ?

https://src.fedoraproject.org/rpms/gnulib/blob/rawhide/f/gnulib.spec#_53

The gnulib licensing is not the only problem... see the last patch to enable
uClibc support. It remind me the coreutils package where a lot of gl_cv_func*
are provided.

https://git.buildroot.net/buildroot/tree/package/coreutils/coreutils.mk?h=2021.02.2#n29

https://git.buildroot.net/buildroot/commit/?id=94b4383252694aedfc61b00a09043dc5450a52ba

Jitter development is closely related to Poke.
Maintainers will try to unbundle Jitter for the next Poke major release (Poke 2.0).

> 
>> +# 0001-build-do-not-check-for-Tcl-Tk-if-disable-gui-is-spec.patch
>> +# 0003-configure.ac-HELP2MAN-replace-by-false-when-cross-co.patch
>> +POKE_AUTORECONF = YES
>> +
>> +POKE_DEPENDENCIES = host-flex host-bison host-pkgconf bdwgc readline
>> +
>> +POKE_CONF_OPTS = --disable-gui \
>> +	--disable-libnbd \
>> +	--disable-mi \
>> +	--with-libreadline-prefix=$(STAGING_DIR)
> 
> Nitpick: with multi-line assignment, have even the first item on its own
> line:
> 
>     POKE_CONF_OPTS = \
>         --disable-gui \
>         --disable-libnbd \
>         --disable-mi \
>         --with-libreadline-prefix=$(STAGING_DIR)

Ok.

Best regards,
Romain

> 
>> +$(eval $(autotools-package))
>> -- 
>> 2.30.2
>>
>> _______________________________________________
>> buildroot mailing list
>> buildroot at busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot
> 

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

end of thread, other threads:[~2021-05-17 14:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-02 21:49 [Buildroot] [PATCH 0/5] poke: new package Romain Naour
2021-05-02 21:49 ` [Buildroot] [PATCH 1/5] package/bdwgc: Fix 'undefined reference to __data_start' linker error on RISC-V Romain Naour
2021-05-03  0:15   ` Alistair Francis
2021-05-17 13:04   ` Yann E. MORIN
2021-05-02 21:49 ` [Buildroot] [PATCH 2/5] package/libatomic_ops: enable for riscv32 and riscv64 Romain Naour
2021-05-03  0:15   ` Alistair Francis
2021-05-17 13:06   ` Yann E. MORIN
2021-05-02 21:49 ` [Buildroot] [PATCH 3/5] package/poke: new package Romain Naour
2021-05-17 13:25   ` Yann E. MORIN
2021-05-17 14:19     ` Romain Naour
2021-05-02 21:49 ` [Buildroot] [PATCH 4/5] package/poke: add optional json-c dependency Romain Naour
2021-05-02 21:49 ` [Buildroot] [PATCH 5/5] package/poke: enable uClibc-ng support Romain Naour

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