From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Vincent Fazio <vfazio@xes-inc.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/bash: fix non-multibyte builds
Date: Sun, 29 Jan 2023 17:39:04 +0100 [thread overview]
Message-ID: <20230129163904.GL2632@scaer> (raw)
In-Reply-To: <20230128191409.1472620-1-vfazio@xes-inc.com>
Vincent, All,
On 2023-01-28 13:14 -0600, Vincent Fazio spake thusly:
> Builds using toolchains without WCHAR support would fail due to an
> undeclared reference to `shell_input_line_property`.
>
> Fix this by using a guard to check if ENABLE_MULTIBYTE is defined.
>
> Fixes:
> - http://autobuild.buildroot.net/results/133ddcbc37512e6bcc5daab669ce316efa7ec4fc/
>
> Signed-off-by: Vincent Fazio <vfazio@xes-inc.com>
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> ...compilation-for-non-multibyte-builds.patch | 63 +++++++++++++++++++
> 1 file changed, 63 insertions(+)
> create mode 100644 package/bash/0002-parse.y-fix-compilation-for-non-multibyte-builds.patch
>
> diff --git a/package/bash/0002-parse.y-fix-compilation-for-non-multibyte-builds.patch b/package/bash/0002-parse.y-fix-compilation-for-non-multibyte-builds.patch
> new file mode 100644
> index 0000000000..d330de5cd4
> --- /dev/null
> +++ b/package/bash/0002-parse.y-fix-compilation-for-non-multibyte-builds.patch
> @@ -0,0 +1,63 @@
> +From 0217fc2816e47ee296472df71d1011f0eb2937e6 Mon Sep 17 00:00:00 2001
> +From: Vincent Fazio <vfazio@gmail.com>
> +Date: Fri, 27 Jan 2023 14:37:26 -0600
> +Subject: [PATCH] parse.y: fix compilation for non-multibyte builds
> +
> +Builds configured with --disable-multibyte or when the toolchain does
> +not have WCHAR support would encounter a compile error due to an
> +undeclared reference to shell_input_line_property in shell_getc.
> +
> +Add a HANDLE_MULTIBYTE guard to conditionally compile the block that
> +references shell_input_line_property in shell_getc as it's only declared
> +when HANDLE_MULTIBYTE is defined.
> +
> +Signed-off-by: Vincent Fazio <vfazio@gmail.com>
> +[Upstream status: https://savannah.gnu.org/patch/index.php?10309]
> +---
> + parse.y | 2 ++
> + y.tab.c | 2 ++
> + 2 files changed, 4 insertions(+)
> +
> +diff --git a/parse.y b/parse.y
> +index 1d12e639..8f1355c6 100644
> +--- a/parse.y
> ++++ b/parse.y
> +@@ -2625,6 +2625,7 @@ next_alias_char:
> + parser_state |= PST_ENDALIAS;
> + /* We need to do this to make sure last_shell_getc_is_singlebyte returns
> + true, since we are returning a single-byte space. */
> ++#if defined (HANDLE_MULTIBYTE)
> + if (shell_input_line_index == shell_input_line_len && last_shell_getc_is_singlebyte == 0)
> + {
> + #if 0
> +@@ -2638,6 +2639,7 @@ next_alias_char:
> + shell_input_line_property[shell_input_line_index - 1] = 1;
> + #endif
> + }
> ++#endif /* HANDLE_MULTIBYTE */
> + return ' '; /* END_ALIAS */
> + }
> + #endif
> +diff --git a/y.tab.c b/y.tab.c
> +index 50c5845b..799f730f 100644
> +--- a/y.tab.c
> ++++ b/y.tab.c
> +@@ -4936,6 +4936,7 @@ next_alias_char:
> + parser_state |= PST_ENDALIAS;
> + /* We need to do this to make sure last_shell_getc_is_singlebyte returns
> + true, since we are returning a single-byte space. */
> ++#if defined (HANDLE_MULTIBYTE)
> + if (shell_input_line_index == shell_input_line_len && last_shell_getc_is_singlebyte == 0)
> + {
> + #if 0
> +@@ -4949,6 +4950,7 @@ next_alias_char:
> + shell_input_line_property[shell_input_line_index - 1] = 1;
> + #endif
> + }
> ++#endif /* HANDLE_MULTIBYTE */
> + return ' '; /* END_ALIAS */
> + }
> + #endif
> +--
> +2.25.1
> +
> --
> 2.25.1
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2023-01-29 16:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-28 19:14 [Buildroot] [PATCH 1/1] package/bash: fix non-multibyte builds Vincent Fazio
2023-01-29 16:39 ` Yann E. MORIN [this message]
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=20230129163904.GL2632@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=vfazio@xes-inc.com \
/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.