* [Buildroot] [PATCH 1/1] package/bash: fix non-multibyte builds
@ 2023-01-28 19:14 Vincent Fazio
2023-01-29 16:39 ` Yann E. MORIN
0 siblings, 1 reply; 2+ messages in thread
From: Vincent Fazio @ 2023-01-28 19:14 UTC (permalink / raw)
To: buildroot; +Cc: Vincent Fazio
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>
---
...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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Buildroot] [PATCH 1/1] package/bash: fix non-multibyte builds
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
0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2023-01-29 16:39 UTC (permalink / raw)
To: Vincent Fazio; +Cc: buildroot
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-29 16:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox