All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Steve Sakoman" <steve@sakoman.com>
To: openembedded-core@lists.openembedded.org
Subject: [OE-core][dunfell 06/21] flex: Fix --noline option behavior
Date: Mon,  1 Feb 2021 06:24:37 -1000	[thread overview]
Message-ID: <2c000cb19aa605c1578afc0b5a445163a2387089.1612188857.git.steve@sakoman.com> (raw)
In-Reply-To: <cover.1612188857.git.steve@sakoman.com>

From: Oleksiy Obitotskyy <oobitots@cisco.com>

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>
---
 ...directives-if-gen_line_dirs-is-false.patch | 32 +++++++++++++++++++
 meta/recipes-devtools/flex/flex_2.6.4.bb      |  1 +
 2 files changed, 33 insertions(+)
 create mode 100644 meta/recipes-devtools/flex/flex/0001-Emit-no-line-directives-if-gen_line_dirs-is-false.patch

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"
-- 
2.25.1


  parent reply	other threads:[~2021-02-01 16:26 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-01 16:24 [OE-core][dunfell 00/21] Patch review Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 01/21] sanity: Verify that user isn't building in PSEUDO_IGNORE_PATHS Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 02/21] sanity.bbclass: sanity check for if bitbake is present in PATH Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 03/21] oeqa/ptest: print a warning if ptests failed Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 04/21] flex: fix build with autoconf 2.70 Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 05/21] flex: Refresh patch Steve Sakoman
2021-02-01 16:24 ` Steve Sakoman [this message]
2021-02-01 16:24 ` [OE-core][dunfell 07/21] toolchain-shar-relocate.sh: Fix handling files with colons Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 08/21] devtool: Fix source extraction for gcc shared source Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 09/21] externalsrc: Fix parsing error with devtool non-git sources Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 10/21] oeqa/selftest/cases/tinfoil.py: increase timeout 10->60s test_wait_event Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 11/21] devtool: Fix file:// fetcher symlink directory structure Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 12/21] dtc: improve reproducibility Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 13/21] core-image-sato-sdk-ptest: these images need ptest Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 14/21] ovmf-shell-image: image is only buildable on x86-64 Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 15/21] selftest/devtool: Add modify_localfiles_only test checking symlink path Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 16/21] timezone: upgrade to 2021a Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 17/21] strace: increase ptest timeout duration 120->240s Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 18/21] externalsrc: Detect code changes in submodules Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 19/21] ncurses: Don't put terminfo into the sysroot Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 20/21] python3: Avoid installing test data into recipe-sysroot Steve Sakoman
2021-02-01 16:24 ` [OE-core][dunfell 21/21] staging: Clean up files installed into the sysroot Steve Sakoman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2c000cb19aa605c1578afc0b5a445163a2387089.1612188857.git.steve@sakoman.com \
    --to=steve@sakoman.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.