summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools
diff options
context:
space:
mode:
authorOleksiy Obitotskyy <oobitots@cisco.com>2021-01-19 04:49:38 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-01-20 22:46:18 +0000
commitd610e691d09faeff25573276dfe480feb6839c15 (patch)
tree2016cce4198c90d6a2f3a9b893605e34f57072db /meta/recipes-devtools
parentda846838fc5d2a1b421767be68561cdaa08bca42 (diff)
downloadpoky-d610e691d09faeff25573276dfe480feb6839c15.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. (From OE-Core rev: 0bf2cb7dc2123f220accf1542c2ae4c4b4b8275a) Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-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 @@
1From 440f3f55739468cd26e22f31871eca8cbbd53294 Mon Sep 17 00:00:00 2001
2From: Oleksiy Obitotskyy <oobitots@cisco.com>
3Date: Wed, 6 Jan 2021 06:12:14 -0800
4Subject: [PATCH] Emit no #line directives if gen_line_dirs is false
5
6If we set --noline we should not print line directives.
7But setting --noline means gen_line_dirs is false.
8
9Upstream-Status: Submitted
10Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com>
11---
12 src/buf.c | 4 ++--
13 1 file changed, 2 insertions(+), 2 deletions(-)
14
15diff --git a/src/buf.c b/src/buf.c
16index 185083c..4439e28 100644
17--- a/src/buf.c
18+++ b/src/buf.c
19@@ -95,8 +95,8 @@ struct Buf *buf_linedir (struct Buf *buf, const char* filename, int lineno)
20 const char *src;
21 size_t tsz;
22
23- if (gen_line_dirs)
24- return buf;
25+ if (!gen_line_dirs)
26+ return buf;
27
28 tsz = strlen("#line \"\"\n") + /* constant parts */
29 2 * strlen (filename) + /* filename with possibly all backslashes escaped */
30--
312.26.2.Cisco
32
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
16 ${@bb.utils.contains('PTEST_ENABLED', '1', '', 'file://disable-tests.patch', d)} \ 16 ${@bb.utils.contains('PTEST_ENABLED', '1', '', 'file://disable-tests.patch', d)} \
17 file://0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch \ 17 file://0001-build-AC_USE_SYSTEM_EXTENSIONS-in-configure.ac.patch \
18 file://check-funcs.patch \ 18 file://check-funcs.patch \
19 file://0001-Emit-no-line-directives-if-gen_line_dirs-is-false.patch \
19 " 20 "
20 21
21SRC_URI[md5sum] = "2882e3179748cc9f9c23ec593d6adc8d" 22SRC_URI[md5sum] = "2882e3179748cc9f9c23ec593d6adc8d"