* [Buildroot] [PATCH 0/2] lmbench patches
@ 2019-06-12 23:39 Markus Mayer
2019-06-12 23:39 ` [Buildroot] [PATCH 1/2] lmbench: mark scripts/build as bash script Markus Mayer
2019-06-12 23:39 ` [Buildroot] [PATCH 2/2] lmbench: install the lmbench script on the target Markus Mayer
0 siblings, 2 replies; 4+ messages in thread
From: Markus Mayer @ 2019-06-12 23:39 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.
Markus Mayer (2):
lmbench: mark scripts/build as bash script
lmbench: install the lmbench script on the target
package/lmbench/0001-build_use_bash.patch | 8 ++++++++
package/lmbench/0002-install_lmbench.patch | 11 +++++++++++
2 files changed, 19 insertions(+)
create mode 100644 package/lmbench/0001-build_use_bash.patch
create mode 100644 package/lmbench/0002-install_lmbench.patch
--
2.17.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/2] lmbench: mark scripts/build as bash script
2019-06-12 23:39 [Buildroot] [PATCH 0/2] lmbench patches Markus Mayer
@ 2019-06-12 23:39 ` Markus Mayer
2019-06-13 11:26 ` Thomas Petazzoni
2019-06-12 23:39 ` [Buildroot] [PATCH 2/2] lmbench: install the lmbench script on the target Markus Mayer
1 sibling, 1 reply; 4+ messages in thread
From: Markus Mayer @ 2019-06-12 23:39 UTC (permalink / raw)
To: buildroot
While bash supports the "+=" operator for environment variables,
/bin/sh does not. scripts/build is making use of "+=" but declares
itself to be a /bin/sh script. This leads to errors of the form
../scripts/build: 21: ../scripts/build: LDLIBS+= -lm: not found
and doesn't change the contents of LDLIBS as was the intention.
Therefore, we change the interpreter to /bin/bash, which makes things
work as intended.
Signed-off-by: Markus Mayer <mmayer@broadcom.com>
---
package/lmbench/0001-build_use_bash.patch | 8 ++++++++
1 file changed, 8 insertions(+)
create mode 100644 package/lmbench/0001-build_use_bash.patch
diff --git a/package/lmbench/0001-build_use_bash.patch b/package/lmbench/0001-build_use_bash.patch
new file mode 100644
index 000000000000..c68ed2ef7ac4
--- /dev/null
+++ b/package/lmbench/0001-build_use_bash.patch
@@ -0,0 +1,8 @@
+--- lmbench-3.0-a9/scripts/build.orig 2006-06-27 09:25:18.000000000 -0700
++++ lmbench-3.0-a9/scripts/build 2019-06-12 16:08:26.078093924 -0700
+@@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+
+ CC=${CC-`../scripts/compiler`}
+ MAKE=${MAKE-`../scripts/make`}
--
2.17.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 2/2] lmbench: install the lmbench script on the target
2019-06-12 23:39 [Buildroot] [PATCH 0/2] lmbench patches Markus Mayer
2019-06-12 23:39 ` [Buildroot] [PATCH 1/2] lmbench: mark scripts/build as bash script Markus Mayer
@ 2019-06-12 23:39 ` Markus Mayer
1 sibling, 0 replies; 4+ messages in thread
From: Markus Mayer @ 2019-06-12 23:39 UTC (permalink / raw)
To: buildroot
lmbench seems to be forgetting to install its main script when "make
install" is being performed. Rectify this by adding lmbench to the list
of executables.
Signed-off-by: Markus Mayer <mmayer@broadcom.com>
---
package/lmbench/0002-install_lmbench.patch | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 package/lmbench/0002-install_lmbench.patch
diff --git a/package/lmbench/0002-install_lmbench.patch b/package/lmbench/0002-install_lmbench.patch
new file mode 100644
index 000000000000..7397ea7e3a33
--- /dev/null
+++ b/package/lmbench/0002-install_lmbench.patch
@@ -0,0 +1,11 @@
+--- lmbench-3.0-a9/src/Makefile.orig 2007-04-10 05:16:49.000000000 -0700
++++ lmbench-3.0-a9/src/Makefile 2019-06-12 16:11:49.955136809 -0700
+@@ -98,7 +98,7 @@
+ $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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH 1/2] lmbench: mark scripts/build as bash script
2019-06-12 23:39 ` [Buildroot] [PATCH 1/2] lmbench: mark scripts/build as bash script Markus Mayer
@ 2019-06-13 11:26 ` Thomas Petazzoni
0 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2019-06-13 11:26 UTC (permalink / raw)
To: buildroot
Hello,
On Wed, 12 Jun 2019 16:39:33 -0700
Markus Mayer <mmayer@broadcom.com> wrote:
> While bash supports the "+=" operator for environment variables,
> /bin/sh does not. scripts/build is making use of "+=" but declares
> itself to be a /bin/sh script. This leads to errors of the form
> ../scripts/build: 21: ../scripts/build: LDLIBS+= -lm: not found
> and doesn't change the contents of LDLIBS as was the intention.
>
> Therefore, we change the interpreter to /bin/bash, which makes things
> work as intended.
>
> Signed-off-by: Markus Mayer <mmayer@broadcom.com>
> ---
> package/lmbench/0001-build_use_bash.patch | 8 ++++++++
> 1 file changed, 8 insertions(+)
> create mode 100644 package/lmbench/0001-build_use_bash.patch
>
> diff --git a/package/lmbench/0001-build_use_bash.patch b/package/lmbench/0001-build_use_bash.patch
> new file mode 100644
> index 000000000000..c68ed2ef7ac4
> --- /dev/null
> +++ b/package/lmbench/0001-build_use_bash.patch
We need all patches to have a description + Signed-off-by line.
Ideally, they should be generated using git format-patch, but since
there is apparently no upstream git repo for lmbench, that is not a
requirement.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-06-13 11:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-12 23:39 [Buildroot] [PATCH 0/2] lmbench patches Markus Mayer
2019-06-12 23:39 ` [Buildroot] [PATCH 1/2] lmbench: mark scripts/build as bash script Markus Mayer
2019-06-13 11:26 ` Thomas Petazzoni
2019-06-12 23:39 ` [Buildroot] [PATCH 2/2] lmbench: install the lmbench script on the target Markus Mayer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox