Message ID | 20190612233934.14805-2-mmayer@broadcom.com |
---|---|
State | Superseded |
Headers | show |
Series | lmbench patches | expand |
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
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`}
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