Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 0/2] lmbench patches
@ 2019-06-13 19:50 Markus Mayer
  2019-06-13 19:50 ` [Buildroot] [PATCH v2 1/2] lmbench: mark scripts/build as bash script Markus Mayer
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Markus Mayer @ 2019-06-13 19:50 UTC (permalink / raw)
  To: buildroot

We recently stumbled upon two lmbench issues, one being discovered
while investigating the other.

- lmbench's scripts/build script is declared as /bin/sh script, but
  uses bash only syntax which can lead to errors

- lmbench's install routine doesn't install the lmbench script itself

Here are two patches to address both issues.

Changes since v2:

- used GIT to generate the lmbench patch files, so they contain a
  description and a signed-off-by line
- no changes to the actual code

Markus Mayer (2):
  lmbench: mark scripts/build as bash script
  lmbench: install the lmbench script on the target

 ...-scripts-build-use-bin-bash-as-shell.patch | 28 ++++++++++++++++++
 ...e-add-lmbench-to-list-of-executables.patch | 29 +++++++++++++++++++
 2 files changed, 57 insertions(+)
 create mode 100644 package/lmbench/0001-scripts-build-use-bin-bash-as-shell.patch
 create mode 100644 package/lmbench/0002-src-Makefile-add-lmbench-to-list-of-executables.patch

-- 
2.17.1

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

* [Buildroot] [PATCH v2 1/2] lmbench: mark scripts/build as bash script
  2019-06-13 19:50 [Buildroot] [PATCH v2 0/2] lmbench patches Markus Mayer
@ 2019-06-13 19:50 ` Markus Mayer
  2019-06-24 19:53   ` Peter Korsgaard
  2019-06-13 19:50 ` [Buildroot] [PATCH v2 2/2] lmbench: install the lmbench script on the target Markus Mayer
  2019-06-22  8:15 ` [Buildroot] [PATCH v2 0/2] lmbench patches Thomas Petazzoni
  2 siblings, 1 reply; 6+ messages in thread
From: Markus Mayer @ 2019-06-13 19:50 UTC (permalink / raw)
  To: buildroot

scripts/build makes use of the "+=" operator which is not supported by
/bin/sh. We switch to /bin/bash in order to avoid errors of the form

    ../scripts/build: 21: ../scripts/build: LDLIBS+= -lm: not found

Signed-off-by: Markus Mayer <mmayer@broadcom.com>
---
 ...-scripts-build-use-bin-bash-as-shell.patch | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 package/lmbench/0001-scripts-build-use-bin-bash-as-shell.patch

diff --git a/package/lmbench/0001-scripts-build-use-bin-bash-as-shell.patch b/package/lmbench/0001-scripts-build-use-bin-bash-as-shell.patch
new file mode 100644
index 000000000000..649a5f922454
--- /dev/null
+++ b/package/lmbench/0001-scripts-build-use-bin-bash-as-shell.patch
@@ -0,0 +1,28 @@
+From 02a538c2b4b54b41d23dbd7668714ea4d2016131 Mon Sep 17 00:00:00 2001
+From: Markus Mayer <mmayer@broadcom.com>
+Date: Thu, 13 Jun 2019 12:27:04 -0700
+Subject: [PATCH 1/2] scripts/build: use /bin/bash as shell
+
+scripts/build makes use of the "+=" operator which is not supported by
+/bin/sh. We switch to /bin/bash in order to avoid errors of the form
+
+    ../scripts/build: 21: ../scripts/build: LDLIBS+= -lm: not found
+
+Signed-off-by: Markus Mayer <mmayer@broadcom.com>
+---
+ scripts/build | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/scripts/build b/scripts/build
+index 34a1371d0056..60b755cd2320 100755
+--- a/scripts/build
++++ b/scripts/build
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ 
+ CC=${CC-`../scripts/compiler`}
+ MAKE=${MAKE-`../scripts/make`}
+-- 
+2.17.1
+
-- 
2.17.1

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

* [Buildroot] [PATCH v2 2/2] lmbench: install the lmbench script on the target
  2019-06-13 19:50 [Buildroot] [PATCH v2 0/2] lmbench patches Markus Mayer
  2019-06-13 19:50 ` [Buildroot] [PATCH v2 1/2] lmbench: mark scripts/build as bash script Markus Mayer
@ 2019-06-13 19:50 ` Markus Mayer
  2019-06-24 19:53   ` Peter Korsgaard
  2019-06-22  8:15 ` [Buildroot] [PATCH v2 0/2] lmbench patches Thomas Petazzoni
  2 siblings, 1 reply; 6+ messages in thread
From: Markus Mayer @ 2019-06-13 19:50 UTC (permalink / raw)
  To: buildroot

We want to install the lmbench script along with the other executables,
so we add it to the appropriate list.

Signed-off-by: Markus Mayer <mmayer@broadcom.com>
---
 ...e-add-lmbench-to-list-of-executables.patch | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 package/lmbench/0002-src-Makefile-add-lmbench-to-list-of-executables.patch

diff --git a/package/lmbench/0002-src-Makefile-add-lmbench-to-list-of-executables.patch b/package/lmbench/0002-src-Makefile-add-lmbench-to-list-of-executables.patch
new file mode 100644
index 000000000000..5b8f44ae1d21
--- /dev/null
+++ b/package/lmbench/0002-src-Makefile-add-lmbench-to-list-of-executables.patch
@@ -0,0 +1,29 @@
+From c158a02561c64d0cd236f86db24cc20d0378eb72 Mon Sep 17 00:00:00 2001
+From: Markus Mayer <mmayer@broadcom.com>
+Date: Thu, 13 Jun 2019 12:28:54 -0700
+Subject: [PATCH 2/2] src/Makefile: add lmbench to list of executables
+
+We want to install the lmbench script along with the other executables,
+so we add it to the appropriate list.
+
+Signed-off-by: Markus Mayer <mmayer@broadcom.com>
+---
+ src/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index 4962815b5fe7..70dbc6794898 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -98,7 +98,7 @@ EXES =	$O/bw_file_rd $O/bw_mem $O/bw_mmap_rd $O/bw_pipe $O/bw_tcp 	\
+ 	$O/lat_select $O/lat_pipe $O/lat_rpc $O/lat_syscall $O/lat_tcp	\
+ 	$O/lat_udp $O/lat_mmap $O/mhz $O/lat_proc $O/lat_pagefault	\
+ 	$O/lat_connect $O/lat_fs $O/lat_sig $O/lat_mem_rd $O/lat_ctx	\
+-	$O/lat_sem 							\
++	$O/lat_sem $O/lmbench						\
+ 	$O/memsize $O/lat_unix $O/lmdd $O/timing_o $O/enough		\
+ 	$O/msleep $O/loop_o $O/lat_fifo $O/lmhttp $O/lat_http		\
+ 	$O/lat_fcntl $O/disk $O/lat_unix_connect $O/flushdisk		\
+-- 
+2.17.1
+
-- 
2.17.1

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

* [Buildroot] [PATCH v2 0/2] lmbench patches
  2019-06-13 19:50 [Buildroot] [PATCH v2 0/2] lmbench patches Markus Mayer
  2019-06-13 19:50 ` [Buildroot] [PATCH v2 1/2] lmbench: mark scripts/build as bash script Markus Mayer
  2019-06-13 19:50 ` [Buildroot] [PATCH v2 2/2] lmbench: install the lmbench script on the target Markus Mayer
@ 2019-06-22  8:15 ` Thomas Petazzoni
  2 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2019-06-22  8:15 UTC (permalink / raw)
  To: buildroot

On Thu, 13 Jun 2019 12:50:45 -0700
Markus Mayer <mmayer@broadcom.com> wrote:

> Markus Mayer (2):
>   lmbench: mark scripts/build as bash script
>   lmbench: install the lmbench script on the target

Both applied, thanks! Unfortunately, there isn't really any upstream
where to send those patches :-/

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

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

* [Buildroot] [PATCH v2 1/2] lmbench: mark scripts/build as bash script
  2019-06-13 19:50 ` [Buildroot] [PATCH v2 1/2] lmbench: mark scripts/build as bash script Markus Mayer
@ 2019-06-24 19:53   ` Peter Korsgaard
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2019-06-24 19:53 UTC (permalink / raw)
  To: buildroot

>>>>> "Markus" == Markus Mayer <mmayer@broadcom.com> writes:

 > scripts/build makes use of the "+=" operator which is not supported by
 > /bin/sh. We switch to /bin/bash in order to avoid errors of the form

 >     ../scripts/build: 21: ../scripts/build: LDLIBS+= -lm: not found

 > Signed-off-by: Markus Mayer <mmayer@broadcom.com>

Committed to 2019.02.x and 2019.05.x, thanks.

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [PATCH v2 2/2] lmbench: install the lmbench script on the target
  2019-06-13 19:50 ` [Buildroot] [PATCH v2 2/2] lmbench: install the lmbench script on the target Markus Mayer
@ 2019-06-24 19:53   ` Peter Korsgaard
  0 siblings, 0 replies; 6+ messages in thread
From: Peter Korsgaard @ 2019-06-24 19:53 UTC (permalink / raw)
  To: buildroot

>>>>> "Markus" == Markus Mayer <mmayer@broadcom.com> writes:

 > We want to install the lmbench script along with the other executables,
 > so we add it to the appropriate list.

 > Signed-off-by: Markus Mayer <mmayer@broadcom.com>

Committed to 2019.02.x and 2019.05.x, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2019-06-24 19:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-13 19:50 [Buildroot] [PATCH v2 0/2] lmbench patches Markus Mayer
2019-06-13 19:50 ` [Buildroot] [PATCH v2 1/2] lmbench: mark scripts/build as bash script Markus Mayer
2019-06-24 19:53   ` Peter Korsgaard
2019-06-13 19:50 ` [Buildroot] [PATCH v2 2/2] lmbench: install the lmbench script on the target Markus Mayer
2019-06-24 19:53   ` Peter Korsgaard
2019-06-22  8:15 ` [Buildroot] [PATCH v2 0/2] lmbench patches Thomas Petazzoni

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