]> code.ossystems Code Review - openembedded-core.git/commitdiff
kernelshark/trace-cmd: fix syntax error of shell
authorChong Lu <Chong.Lu@windriver.com>
Thu, 10 Apr 2014 08:25:03 +0000 (16:25 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 10 Apr 2014 09:22:26 +0000 (10:22 +0100)
Delete "<<<" syntax of bash in Makefile, else we would get following error:

        Syntax error: redirection unexpected

[YOCTO #6112]

Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb
meta/recipes-kernel/trace-cmd/trace-cmd/kernelshark-fix-syntax-error-of-shell.patch [new file with mode: 0644]
meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-fix-syntax-error-of-shell.patch [new file with mode: 0644]
meta/recipes-kernel/trace-cmd/trace-cmd_1.2.bb

index 9268a506b846735f3155a39d08d5b10c0118a607..d61097df913b5ea46765d9c5f2464b627cf03621 100644 (file)
@@ -15,7 +15,8 @@ inherit pkgconfig pythonnative
 SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git \
            file://addldflags.patch \
            file://make-docs-optional.patch \
-           file://blktrace-api-compatibility.patch"
+           file://blktrace-api-compatibility.patch \
+           file://kernelshark-fix-syntax-error-of-shell.patch"
 S = "${WORKDIR}/git"
 
 EXTRA_OEMAKE = "'CC=${CC}' 'AR=${AR}' 'prefix=${prefix}' gui"
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd/kernelshark-fix-syntax-error-of-shell.patch b/meta/recipes-kernel/trace-cmd/trace-cmd/kernelshark-fix-syntax-error-of-shell.patch
new file mode 100644 (file)
index 0000000..351b24b
--- /dev/null
@@ -0,0 +1,30 @@
+kernelshark: fix syntax error of shell
+
+Delete "<<<" syntax of bash in Makefile, else we would get following error:
+
+       Syntax error: redirection unexpected
+
+Upstream-status: Pending
+
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ Makefile |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index c1fa906..be84415 100644
+--- a/Makefile
++++ b/Makefile
+@@ -89,8 +89,7 @@ endif
+ # $(call test-build, snippet, ret) -> ret if snippet compiles
+ #                                  -> empty otherwise
+-test-build = $(if $(shell $(CC) -o /dev/null -c -x c - > /dev/null 2>&1 \
+-                        <<<'$1' && echo y), $2)
++test-build = $(if $(shell echo '$1' |$(CC) -o /dev/null -c -x c - > /dev/null 2>&1 && echo y), $2)
+ # have udis86 disassembler library?
+ udis86-flags := $(call test-build,\#include <udis86.h>,-DHAVE_UDIS86 -ludis86)
+-- 
+1.7.9.5
+
diff --git a/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-fix-syntax-error-of-shell.patch b/meta/recipes-kernel/trace-cmd/trace-cmd/trace-cmd-fix-syntax-error-of-shell.patch
new file mode 100644 (file)
index 0000000..b1ebf49
--- /dev/null
@@ -0,0 +1,30 @@
+trace-cmd: fix syntax error of shell
+
+Delete "<<<" syntax of bash in Makefile, else we would get following error:
+
+       Syntax error: redirection unexpected
+
+Upstream-status: Pending
+
+Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
+---
+ Makefile |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index c1fa906..7973c53 100644
+--- a/Makefile
++++ b/Makefile
+@@ -89,8 +89,7 @@ endif
+ # $(call test-build, snippet, ret) -> ret if snippet compiles
+ #                                  -> empty otherwise
+-test-build = $(if $(shell $(CC) -o /dev/null -c -x c - > /dev/null 2>&1 \
+-                        <<<'$1' && echo y), $2)
++test-build = $(if $(shell echo '$1' |$(CC) -o /dev/null -c -x c - > /dev/null 2>&1 && echo y), $2)
+ # have udis86 disassembler library?
+ udis86-flags := $(call test-build,\#include <udis86.h>,-DHAVE_UDIS86 -ludis86)
+-- 
+1.7.9.5
+
index 74eafbb530edeaa964e0ab68319d505c5457e940..a0c823bf62564e001c52063eba2d03655faea61c 100644 (file)
@@ -18,6 +18,7 @@ SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git \
            file://trace-cmd-Add-checks-for-invalid-pointers-to-fix-seg.patch \
            file://trace-cmd-Do-not-call-stop_threads-if-doing-latency-.patch \
            file://trace-cmd-Setting-plugin-to-nop-clears-data-before-i.patch \
+           file://trace-cmd-fix-syntax-error-of-shell.patch \
 "
 S = "${WORKDIR}/git"