summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorOleksiy Obitotskyy <oobitots@cisco.com>2021-01-19 04:49:38 -0800
committerSteve Sakoman <steve@sakoman.com>2021-01-28 06:13:19 -1000
commit2c000cb19aa605c1578afc0b5a445163a2387089 (patch)
tree12dd2439af65b87fc364754291c629cbe34a9a56 /meta
parent0668fa21b7a5dbf96632b406d28d152c7c53fa3c (diff)
downloadopenembedded-core-contrib-2c000cb19aa605c1578afc0b5a445163a2387089.tar.gz
flex: Fix --noline option behavior
Option --noline or -L does not handled properly. So generated code contains #line directives with file absolute path and prevents to create reproducible builds. Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0bf2cb7dc2123f220accf1542c2ae4c4b4b8275a) Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/flex/flex/0001-Emit-no-line-directives-if-gen_line_dirs-is-false.patch32
-rw-r--r--meta/recipes-devtools/flex/flex_2.6.4.bb1
2 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-devtools/flex/flex/0001-Emit-no-line-directives-if-gen_line_dirs-is-false.patch b/meta/recipes-devtools/flex/flex/0001-Emit-no-line-directives-if-gen_line_dirs-is-false.patch
new file mode 100644
index 0000000000..c8202b6bd5
--- /dev/null
+++ b/meta/recipes-devtools/flex/flex/0001-Emit-no-line-directives-if-gen_line_dirs-is-false.patch
@@ -0,0 +1,32 @@
+From 440f3f55739468cd26e22f31871eca8cbbd53294 Mon Sep 17 00:00:00 2001
+From: Oleksiy Obitotskyy <oobitots@cisco.com>
+Date: Wed, 6 Jan 2021 06:12:14 -0800
+Subject: [PATCH] Emit no #line directives if gen_line_dirs is false
+
+If we set --noline we should not print line directives.
+But setting --noline means gen_line_dirs is false.
+
+Upstream-Status: Submitted
+Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com>
+---
+ src/buf.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/buf.c b/src/buf.c
+index 185083c..4439e28 100644
+--- a/src/buf.c
++++ b/src/buf.c
+@@ -95,8 +95,8 @@ struct Buf *buf_linedir (struct Buf *buf, const char* filename, int lineno)
+ const char *src;
+ size_t tsz;
+
+- if (gen_line_dirs)
+- return buf;
++ if (!gen_line_dirs)
++ return buf;
+
+ tsz = strlen("#line \"\"\n") + /* constant parts */
+ 2 * strlen (filename) + /* filename with possibly all backslashes escaped */
+--
+2.26.2.Cisco
+
diff --git a/meta/recipes-devtools/flex/flex_2.6.4.bb b/meta/recipes-devtools/flex/flex_2.6.4.bb
index 3d57572865..1d43d2228a 100644
--- a/meta/recipes-devtools/flex/flex_2.6.4.bb
+++ b/meta/recipes-devtools/flex/flex_2.6.4.bb
@@ -16,6 +16,7 @@ SRC_URI = "https://github.com/westes/flex/releases/download/v${PV}/flex-${PV}.ta
${@bb.utils.contains('PTEST_ENABLED', '1', '', 'file://disable-tests.patch', d)} \
file://0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch \
file://check-funcs.patch \
+ file://0001-Emit-no-line-directives-if-gen_line_dirs-is-false.patch \
"
SRC_URI[md5sum] = "2882e3179748cc9f9c23ec593d6adc8d"