Skip to contentSkip to conversation

BASH: Adding features that can not be automatically detected while cross-compiling

PATCH Superseded Arkady Gilinsky 5 participants 18 messages Jan 15, 2012 – Jan 22, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 BASH: Adding features that can not be automatically detected while cross-compiling

From: Arkady Gilinsky <[email protected]>
Date: Sat, 14 Jan 2012 11:27:11 +0200
Subject: [PATCH] BASH: Adding features that can not be automatically detected
while cross-compiling

There are some bash features that can not be detected automatically during configure stage while cross-compiling. This commit add ability to force support of such a features.

---
 package/bash/Config.in |   33 +++++++++++++++++++++++++++++++++
 package/bash/bash.mk   |    6 +++++-
 2 files changed, 38 insertions(+), 1 deletions(-)
package/bash/Config.in +33 -0
index 9ee46e8..b7cc27d 100644
@@ -5,3 +5,36 @@ config BR2_PACKAGE_BASH
 	  The standard GNU Bourne again shell.
 
 	  http://tiswww.case.edu/php/chet/bash/bashtop.html
+
+menu "BASH cross compile features selection"
+	depends on BR2_PACKAGE_BASH
+
+config BR2_PACKAGE_BASH_JOB_CONTROL
+	bool "job_control"
+	depends on BR2_PACKAGE_BASH
+	help
+	   The job control feature (Ctrl-Z and etc.)
+	   Configure variable - bash_cv_job_control_missing
+
+config BR2_PACKAGE_BASH_NAMED_PIPES
+	bool "named_pipes"
+	depends on BR2_PACKAGE_BASH
+	help
+	   Named pipe presence
+	   Configure variable - bash_cv_sys_named_pipes
+
+config BR2_PACKAGE_BASH_SIG_SET_JUMP
+	bool "sigsetjmp"
+	depends on BR2_PACKAGE_BASH
+	help
+	   POSIX-style sigsetjmp/siglongjmp
+	   Configure variable - bash_cv_func_sigsetjmp
+
+config BR2_PACKAGE_BASH_PRINTF_A_FORMAT
+	bool "printf_a_format"
+	depends on BR2_PACKAGE_BASH
+	help
+	   Printf floating point output in hex notation
+	   Configure variable - bash_cv_printf_a_format
+
+endmenu
package/bash/bash.mk +2 -1
index f1f951c..78face7 100644
@@ -7,7 +7,11 @@
 BASH_VERSION = 4.2
 BASH_SITE = $(BR2_GNU_MIRROR)/bash
 BASH_DEPENDENCIES = ncurses
-BASH_CONF_ENV = bash_cv_job_control_missing=no
+BASH_CONF_ENV +=
          \
+   bash_cv_job_control_missing=$(if

$(BR2_PACKAGE_BASH_JOB_CONTROL),present,no) \
+ $(if $(BR2_PACKAGE_BASH_NAMED_PIPES),
bash_cv_sys_named_pipes=present,) \
+ $(if $(BR2_PACKAGE_BASH_SIG_SET_JUMP),
bash_cv_func_sigsetjmp=present,) \
+ $(if $(BR2_PACKAGE_BASH_PRINTF_A_FORMAT), bash_cv_printf_a_format=yes,)

# Make sure we build after busybox so that /bin/sh links to bash ifeq ($(BR2_PACKAGE_BUSYBOX),y)

Signature · 5 lines
1.7.7

-- 
Best regards
Arkady Gilinsky
#1 lore raw

PATCH 1/1 BASH: Adding features that can not be automatically detected while cross-compiling

Hoi Arkady,

It's difficult or impossible to post patches from GMail. I've taken over
your patch and will post it in reply. I'll also post a v2 which incorporates some of my feedback, below.

Quoted 10 lines · On Sunday 15 January 2012 18:14:32 Arkady Gilinsky wrote:

From: Arkady Gilinsky <[email protected]>
Date: Sat, 14 Jan 2012 11:27:11 +0200
Subject: [PATCH] BASH: Adding features that can not be automatically detected
while cross-compiling

There are some bash features that can not be detected automatically during configure stage while cross-compiling. This commit add ability to force support of such a features.

Quoted 10 lines
---
 package/bash/Config.in |   33 +++++++++++++++++++++++++++++++++
 package/bash/bash.mk   |    6 +++++-
 2 files changed, 38 insertions(+), 1 deletions(-)
package/bash/Config.in +0 -0
index 9ee46e8..b7cc27d 100644

package/bash/Config.in config BR2_PACKAGE_BASH · line 10

Quoted 6 lines
package/bash/Config.in +3 -0
@@ -5,3 +5,36 @@ config BR2_PACKAGE_BASH
 	  The standard GNU Bourne again shell.
 
 	  http://tiswww.case.edu/php/chet/bash/bashtop.html
+
+menu "BASH cross compile features selection"
+	depends on BR2_PACKAGE_BASH

Adding a menu just makes things more complex - the indentation added
by the 'depends on' statements is sufficient. But then it should be a comment that explains the subsequent options.

package/bash/Config.in config BR2_PACKAGE_BASH · line 17

Quoted 6 lines
package/bash/Config.in +6 -0
+config BR2_PACKAGE_BASH_JOB_CONTROL
+	bool "job_control"
+	depends on BR2_PACKAGE_BASH
+	help
+	   The job control feature (Ctrl-Z and etc.)
+	   Configure variable - bash_cv_job_control_missing

I don' think mentioning the configure variable is relevant here. (Same
for the other options.)

Actually, doesn't this feature always exist on a Linux kernel?
(Again, same for the other options, except possibly printf_a_format.)

Quoted 39 lines
package/bash/Config.in +23 -0
+
+config BR2_PACKAGE_BASH_NAMED_PIPES
+	bool "named_pipes"
+	depends on BR2_PACKAGE_BASH
+	help
+	   Named pipe presence
+	   Configure variable - bash_cv_sys_named_pipes
+
+config BR2_PACKAGE_BASH_SIG_SET_JUMP
+	bool "sigsetjmp"
+	depends on BR2_PACKAGE_BASH
+	help
+	   POSIX-style sigsetjmp/siglongjmp
+	   Configure variable - bash_cv_func_sigsetjmp
+
+config BR2_PACKAGE_BASH_PRINTF_A_FORMAT
+	bool "printf_a_format"
+	depends on BR2_PACKAGE_BASH
+	help
+	   Printf floating point output in hex notation
+	   Configure variable - bash_cv_printf_a_format
+
+endmenu
package/bash/bash.mk +4 -1
index f1f951c..78face7 100644
@@ -7,7 +7,11 @@
 BASH_VERSION = 4.2
 BASH_SITE = $(BR2_GNU_MIRROR)/bash
 BASH_DEPENDENCIES = ncurses
-BASH_CONF_ENV = bash_cv_job_control_missing=no
+BASH_CONF_ENV +=
          \
+   bash_cv_job_control_missing=$(if
 $(BR2_PACKAGE_BASH_JOB_CONTROL),present,no) \
+   $(if $(BR2_PACKAGE_BASH_NAMED_PIPES),
 bash_cv_sys_named_pipes=present,)      \
+   $(if $(BR2_PACKAGE_BASH_SIG_SET_JUMP),
Quoted 2 lines

bash_cv_func_sigsetjmp=present,) \
+ $(if $(BR2_PACKAGE_BASH_PRINTF_A_FORMAT), bash_cv_printf_a_format=yes,)

I prefer (and I believe Peter does as well):

ifeq ($(BR2_PACKAGE_BASH_JOB_CONTROL),y)
BASH_CONF_ENV += bash_cv_job_control_missing=no
endif

more lines, but easier to read.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#2 lore raw

PATCH 1/1 BASH: Adding features that can not be automatically detected while cross-compiling

Quoted 4 lines · Arnout Vandecappelle

Hoi Arkady,

It's difficult or impossible to post patches from GMail.

There was a second posting with the GMail-Text features fixed.

Quoted 3 lines

I've taken over your patch and will post it in reply. I'll also post a v2 which incorporates some of my feedback, below.

I am sure the O.P. will appreciate that. Just making GMail work was a challenge. ;-)

Mike

Quoted 99 lines · On Sunday 15 January 2012 18:14:32 Arkady Gilinsky wrote:
Quoted 10 lines

From: Arkady Gilinsky <[email protected]>
Date: Sat, 14 Jan 2012 11:27:11 +0200
Subject: [PATCH] BASH: Adding features that can not be automatically detected
while cross-compiling

There are some bash features that can not be detected automatically during configure stage while cross-compiling. This commit add ability to force support of such a features.

Quoted 10 lines
---
 package/bash/Config.in |   33 +++++++++++++++++++++++++++++++++
 package/bash/bash.mk   |    6 +++++-
 2 files changed, 38 insertions(+), 1 deletions(-)
package/bash/Config.in +0 -0
index 9ee46e8..b7cc27d 100644

package/bash/Config.in config BR2_PACKAGE_BASH · line 10

Quoted 6 lines
package/bash/Config.in +3 -0
@@ -5,3 +5,36 @@ config BR2_PACKAGE_BASH
 	  The standard GNU Bourne again shell.
 
 	  http://tiswww.case.edu/php/chet/bash/bashtop.html
+
+menu "BASH cross compile features selection"
+	depends on BR2_PACKAGE_BASH

Adding a menu just makes things more complex - the indentation added
by the 'depends on' statements is sufficient. But then it should be a comment that explains the subsequent options.

package/bash/Config.in config BR2_PACKAGE_BASH · line 17

Quoted 6 lines
package/bash/Config.in +6 -0
+config BR2_PACKAGE_BASH_JOB_CONTROL
+	bool "job_control"
+	depends on BR2_PACKAGE_BASH
+	help
+	   The job control feature (Ctrl-Z and etc.)
+	   Configure variable - bash_cv_job_control_missing

I don' think mentioning the configure variable is relevant here. (Same
for the other options.)

Actually, doesn't this feature always exist on a Linux kernel?
(Again, same for the other options, except possibly printf_a_format.)

Quoted 39 lines
package/bash/Config.in +23 -0
+
+config BR2_PACKAGE_BASH_NAMED_PIPES
+	bool "named_pipes"
+	depends on BR2_PACKAGE_BASH
+	help
+	   Named pipe presence
+	   Configure variable - bash_cv_sys_named_pipes
+
+config BR2_PACKAGE_BASH_SIG_SET_JUMP
+	bool "sigsetjmp"
+	depends on BR2_PACKAGE_BASH
+	help
+	   POSIX-style sigsetjmp/siglongjmp
+	   Configure variable - bash_cv_func_sigsetjmp
+
+config BR2_PACKAGE_BASH_PRINTF_A_FORMAT
+	bool "printf_a_format"
+	depends on BR2_PACKAGE_BASH
+	help
+	   Printf floating point output in hex notation
+	   Configure variable - bash_cv_printf_a_format
+
+endmenu
package/bash/bash.mk +4 -1
index f1f951c..78face7 100644
@@ -7,7 +7,11 @@
 BASH_VERSION = 4.2
 BASH_SITE = $(BR2_GNU_MIRROR)/bash
 BASH_DEPENDENCIES = ncurses
-BASH_CONF_ENV = bash_cv_job_control_missing=no
+BASH_CONF_ENV +=
          \
+   bash_cv_job_control_missing=$(if
 $(BR2_PACKAGE_BASH_JOB_CONTROL),present,no) \
+   $(if $(BR2_PACKAGE_BASH_NAMED_PIPES),
 bash_cv_sys_named_pipes=present,)      \
+   $(if $(BR2_PACKAGE_BASH_SIG_SET_JUMP),
Quoted 2 lines

bash_cv_func_sigsetjmp=present,) \
+ $(if $(BR2_PACKAGE_BASH_PRINTF_A_FORMAT), bash_cv_printf_a_format=yes,)

I prefer (and I believe Peter does as well):

ifeq ($(BR2_PACKAGE_BASH_JOB_CONTROL),y)
BASH_CONF_ENV += bash_cv_job_control_missing=no
endif

more lines, but easier to read.

Regards,
Arnout

#3 lore raw

PATCH 1/1 BASH: Adding features that can not be automatically detected while cross-compiling

In reply to Arnout Vandecappelle
Quoted 6 lines · Arnout Vandecappelle

Hoi Arkady,

It's difficult or impossible to post patches from GMail. I've taken over
your patch and will post it in reply. I'll also post a v2 which incorporates some of my feedback, below.

This is kind of off topic, but git send-email works through the gmail smtp stuff. Lots of hits on how to set up in google.

Regards, Steve

#4 lore raw

PATCH 1/1 BASH: Adding features that can not be automatically detected

In reply to Arkady Gilinsky

From: Arkady Gilinsky <[email protected]>

while cross-compiling

There are some bash features that can not be detected automatically during configure stage while cross-compiling. This commit add ability to force support of such a features.

---
 package/bash/Config.in |   33 +++++++++++++++++++++++++++++++++
 package/bash/bash.mk   |    6 +++++-
 2 files changed, 38 insertions(+), 1 deletions(-)
package/bash/Config.in +33 -0
index 9ee46e8..b7cc27d 100644
@@ -5,3 +5,36 @@ config BR2_PACKAGE_BASH
 	  The standard GNU Bourne again shell.
 
 	  http://tiswww.case.edu/php/chet/bash/bashtop.html
+
+menu "BASH cross compile features selection"
+	depends on BR2_PACKAGE_BASH
+
+config BR2_PACKAGE_BASH_JOB_CONTROL
+	bool "job_control"
+	depends on BR2_PACKAGE_BASH
+	help
+	   The job control feature (Ctrl-Z and etc.)
+	   Configure variable - bash_cv_job_control_missing
+
+config BR2_PACKAGE_BASH_NAMED_PIPES
+	bool "named_pipes"
+	depends on BR2_PACKAGE_BASH
+	help
+	   Named pipe presence
+	   Configure variable - bash_cv_sys_named_pipes
+
+config BR2_PACKAGE_BASH_SIG_SET_JUMP
+	bool "sigsetjmp"
+	depends on BR2_PACKAGE_BASH
+	help
+	   POSIX-style sigsetjmp/siglongjmp
+	   Configure variable - bash_cv_func_sigsetjmp
+
+config BR2_PACKAGE_BASH_PRINTF_A_FORMAT
+	bool "printf_a_format"
+	depends on BR2_PACKAGE_BASH
+	help
+	   Printf floating point output in hex notation
+	   Configure variable - bash_cv_printf_a_format
+
+endmenu
package/bash/bash.mk +5 -1
index f1f951c..78face7 100644
@@ -7,7 +7,11 @@
 BASH_VERSION = 4.2
 BASH_SITE = $(BR2_GNU_MIRROR)/bash
 BASH_DEPENDENCIES = ncurses
-BASH_CONF_ENV = bash_cv_job_control_missing=no
+BASH_CONF_ENV +=                                                                \
+   bash_cv_job_control_missing=$(if $(BR2_PACKAGE_BASH_JOB_CONTROL),present,no) \
+   $(if $(BR2_PACKAGE_BASH_NAMED_PIPES), bash_cv_sys_named_pipes=present,)      \
+   $(if $(BR2_PACKAGE_BASH_SIG_SET_JUMP), bash_cv_func_sigsetjmp=present,)      \
+   $(if $(BR2_PACKAGE_BASH_PRINTF_A_FORMAT), bash_cv_printf_a_format=yes,)
 
 # Make sure we build after busybox so that /bin/sh links to bash
 ifeq ($(BR2_PACKAGE_BUSYBOX),y)
Signature · 1 line
1.7.8.3
#5 lore raw

PATCH v2 1/1 bash: Adding features that can not be automatically detected while cross-compiling

From: Arkady Gilinsky <[email protected]>

There are some bash features that can not be detected automatically during configure stage while cross-compiling. This commit adds the ability to force support of such features.

---
 package/bash/Config.in |   26 ++++++++++++++++++++++++++
 package/bash/bash.mk   |    6 +++++-
 2 files changed, 31 insertions(+), 1 deletions(-)
package/bash/Config.in +26 -0
index 9ee46e8..74f03e0 100644
@@ -5,3 +5,29 @@ config BR2_PACKAGE_BASH
 	  The standard GNU Bourne again shell.
 
 	  http://tiswww.case.edu/php/chet/bash/bashtop.html
+
+if BR2_PACKAGE_BASH
+
+comment "Bash features that cannot be derived automatically when cross-compiling"
+
+config BR2_PACKAGE_BASH_JOB_CONTROL
+	bool "job_control"
+	help
+	   The job control feature (Ctrl-Z and etc.)
+
+config BR2_PACKAGE_BASH_NAMED_PIPES
+	bool "named_pipes"
+	help
+	   Named pipe presence
+
+config BR2_PACKAGE_BASH_SIG_SET_JUMP
+	bool "sigsetjmp"
+	help
+	   POSIX-style sigsetjmp/siglongjmp
+
+config BR2_PACKAGE_BASH_PRINTF_A_FORMAT
+	bool "printf_a_format"
+	help
+	   Printf floating point output in hex notation
+
+endif
package/bash/bash.mk +5 -1
index f1f951c..78face7 100644
@@ -7,7 +7,11 @@
 BASH_VERSION = 4.2
 BASH_SITE = $(BR2_GNU_MIRROR)/bash
 BASH_DEPENDENCIES = ncurses
-BASH_CONF_ENV = bash_cv_job_control_missing=no
+BASH_CONF_ENV +=                                                                \
+   bash_cv_job_control_missing=$(if $(BR2_PACKAGE_BASH_JOB_CONTROL),present,no) \
+   $(if $(BR2_PACKAGE_BASH_NAMED_PIPES), bash_cv_sys_named_pipes=present,)      \
+   $(if $(BR2_PACKAGE_BASH_SIG_SET_JUMP), bash_cv_func_sigsetjmp=present,)      \
+   $(if $(BR2_PACKAGE_BASH_PRINTF_A_FORMAT), bash_cv_printf_a_format=yes,)
 
 # Make sure we build after busybox so that /bin/sh links to bash
 ifeq ($(BR2_PACKAGE_BUSYBOX),y)
Signature · 1 line
1.7.8.3
#6 lore raw

PATCH v2 1/1 bash: Adding features that can not be automatically detected while cross-compiling

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle (Essensium/Mind) <[email protected]> writes:

Arnout> From: Arkady Gilinsky <[email protected]>

Arnout> There are some bash features that can not be detected Arnout> automatically during configure stage while
Arnout> cross-compiling. This commit adds the ability to force support Arnout> of such features.

Ok, but does it make sense to make these things configurable? I haven't checked, but presumably these are supported on all Linux archs, and don't affect the binary size significantly (compared to bash size)?

Couldn't we just always forcibly enable these instead?

Arnout> Signed-off-by: Arkady Gilinsky <[email protected]> Arnout> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]> Arnout> ---

 Arnout>  package/bash/Config.in |   26 ++++++++++++++++++++++++++
 Arnout>  package/bash/bash.mk   |    6 +++++-

Arnout> 2 files changed, 31 insertions(+), 1 deletions(-)

Arnout> diff --git a/package/bash/Config.in b/package/bash/Config.in Arnout> index 9ee46e8..74f03e0 100644
Arnout> --- a/package/bash/Config.in
Arnout> +++ b/package/bash/Config.in
Arnout> @@ -5,3 +5,29 @@ config BR2_PACKAGE_BASH
Arnout> The standard GNU Bourne again shell.

Arnout> http://tiswww.case.edu/php/chet/bash/bashtop.html
Arnout> +
Arnout> +if BR2_PACKAGE_BASH
Arnout> +
Arnout> +comment "Bash features that cannot be derived automatically when cross-compiling" Arnout> +
Arnout> +config BR2_PACKAGE_BASH_JOB_CONTROL
Arnout> + bool "job_control"
Arnout> + help
Arnout> + The job control feature (Ctrl-Z and etc.)
Arnout> +
Arnout> +config BR2_PACKAGE_BASH_NAMED_PIPES
Arnout> + bool "named_pipes"
Arnout> + help
Arnout> + Named pipe presence
Arnout> +
Arnout> +config BR2_PACKAGE_BASH_SIG_SET_JUMP
Arnout> + bool "sigsetjmp"
Arnout> + help
Arnout> + POSIX-style sigsetjmp/siglongjmp
Arnout> +
Arnout> +config BR2_PACKAGE_BASH_PRINTF_A_FORMAT
Arnout> + bool "printf_a_format"
Arnout> + help
Arnout> + Printf floating point output in hex notation
Arnout> +
Arnout> +endif
Arnout> diff --git a/package/bash/bash.mk b/package/bash/bash.mk
Arnout> index f1f951c..78face7 100644
Arnout> --- a/package/bash/bash.mk
Arnout> +++ b/package/bash/bash.mk
Arnout> @@ -7,7 +7,11 @@

 Arnout>  BASH_VERSION = 4.2
 Arnout>  BASH_SITE = $(BR2_GNU_MIRROR)/bash
 Arnout>  BASH_DEPENDENCIES = ncurses
 Arnout> -BASH_CONF_ENV = bash_cv_job_control_missing=no
 Arnout> +BASH_CONF_ENV +=                                                                \
 Arnout> +   bash_cv_job_control_missing=$(if $(BR2_PACKAGE_BASH_JOB_CONTROL),present,no) \
 Arnout> +   $(if $(BR2_PACKAGE_BASH_NAMED_PIPES), bash_cv_sys_named_pipes=present,)      \
 Arnout> +   $(if $(BR2_PACKAGE_BASH_SIG_SET_JUMP), bash_cv_func_sigsetjmp=present,)      \
 Arnout> +   $(if $(BR2_PACKAGE_BASH_PRINTF_A_FORMAT), bash_cv_printf_a_format=yes,)

Arnout> # Make sure we build after busybox so that /bin/sh links to bash Arnout> ifeq ($(BR2_PACKAGE_BUSYBOX),y)
Arnout> --
Arnout> 1.7.8.3

Arnout> _______________________________________________ Arnout> buildroot mailing list
Arnout> buildroot at busybox.net
Arnout> http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 1 line
Bye, Peter Korsgaard
#7 lore raw

PATCH v2 1/1 bash: Adding features that can not be automatically detected while cross-compiling

Quoted 9 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle (Essensium/Mind) <[email protected]> writes:

?Arnout> From: Arkady Gilinsky <[email protected]>

?Arnout> There are some bash features that can not be detected ?Arnout> automatically during configure stage while
?Arnout> cross-compiling. This commit adds the ability to force support ?Arnout> of such features.

Quoted 5 lines

Ok, but does it make sense to make these things configurable? I haven't checked, but presumably these are supported on all Linux archs, and don't affect the binary size significantly (compared to bash size)?

Couldn't we just always forcibly enable these instead?

I agree with you, Peter, that these features supported on many/almost all Linux archs, but
current version of bash configuration in Buildroot has 'job_control' feature set to off.
I didn't find the reason why (may be you know), so I decided to leave the ability to set it off
for anybody who do not want/able to set this feature on. Also the default setting is off to not to break any existing build. If you find that these features should be forced set to on, inform me I will make an appropriate patch.

Signature · 2 lines
Best regards
Arkady Gilinsky
#8 lore raw

PATCH v2 1/1 bash: Adding features that can not be automatically detected while cross-compiling

Quoted 5 lines · On Wednesday 18 January 2012 07:37:30 Arkady Gilinsky wrote:
Quoted 4 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle (Essensium/Mind) <[email protected]> writes:

Arnout> From: Arkady Gilinsky <[email protected]>

Quoted 8 lines
Quoted 8 lines

Arnout> There are some bash features that can not be detected Arnout> automatically during configure stage while
Arnout> cross-compiling. This commit adds the ability to force support Arnout> of such features.

Ok, but does it make sense to make these things configurable? I haven't checked, but presumably these are supported on all Linux archs, and don't affect the binary size significantly (compared to bash size)?

I don't think it does (that's what I meant to say in my review), but I
didn't want to force the issue without prior feedback.

Quoted 2 lines
Quoted 2 lines

Couldn't we just always forcibly enable these instead?

Completely agree with that.

Quoted 11 lines

I agree with you, Peter, that these features supported on many/almost all Linux archs, but
current version of bash configuration in Buildroot has 'job_control' feature set to off.
I didn't find the reason why (may be you know), so I decided to leave the ability to set it off
for anybody who do not want/able to set this feature on. Also the default setting is off to not to break any existing build. If you find that these features should be forced set to on, inform me I will make an appropriate patch.

I'll post a v3 that does just that.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#9 lore raw

PATCH v3 1/1 bash: Adding features that can not be automatically detected while cross-compiling

From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]>

There are some bash features that can not be detected automatically during configure stage while cross-compiling. This commit forces them on.

---
 package/bash/bash.mk |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
package/bash/bash.mk +5 -1
index f1f951c..60fab06 100644
@@ -7,7 +7,11 @@
 BASH_VERSION = 4.2
 BASH_SITE = $(BR2_GNU_MIRROR)/bash
 BASH_DEPENDENCIES = ncurses
-BASH_CONF_ENV = bash_cv_job_control_missing=no
+BASH_CONF_ENV +=                       \
+   bash_cv_job_control_missing=no      \
+   bash_cv_sys_named_pipes=present     \
+   bash_cv_func_sigsetjmp=present      \
+   bash_cv_printf_a_format=yes
 
 # Make sure we build after busybox so that /bin/sh links to bash
 ifeq ($(BR2_PACKAGE_BUSYBOX),y)
Signature · 1 line
1.7.8.3
#10 lore raw

PATCH v3 1/1 bash: Adding features that can not be automatically detected while cross-compiling

Quoted 19 lines · Arnout Vandecappelle (Essensium/Mind)

From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]>

There are some bash features that can not be detected automatically during configure stage while cross-compiling. This commit forces them on.

---
?package/bash/bash.mk | ? ?6 +++++-
?1 files changed, 5 insertions(+), 1 deletions(-)

package/bash/bash.mk +0 -0
index f1f951c..60fab06 100644
@@ -7,7 +7,11 @@

?BASH_VERSION = 4.2
?BASH_SITE = $(BR2_GNU_MIRROR)/bash
?BASH_DEPENDENCIES = ncurses

package/bash/bash.mk

Quoted 3 lines
package/bash/bash.mk +2 -1
-BASH_CONF_ENV = bash_cv_job_control_missing=no
+BASH_CONF_ENV += ? ? ? ? ? ? ? ? ? ? ? \
+ ? bash_cv_job_control_missing=no ? ? ?\

I think it is not correct.
According to my analyze of bash configure script the variable bash_cv_job_control_missing
not implemented straight forward - the value 'missing' means that job control is disabled
and value 'present' means that job control supported by final binary. Find below the fragment of configure script of bash.
"
...
if test "$cross_compiling" = yes; then
{ $as_echo "$as_me:$LINENO: WARNING: cannot check job control if
cross-compiling -- defaulting to missing" >&5
$as_echo "$as_me: WARNING: cannot check job control if cross-compiling -- defaulting to missing" >&2;}
bash_cv_job_control_missing=missing
...
"
as you can see 'missing' value is set when cross compiling and configure script can not detect
if this feature is supported or not.

Quoted 9 lines

+ ? bash_cv_sys_named_pipes=present ? ? \
+ ? bash_cv_func_sigsetjmp=present ? ? ?\
+ ? bash_cv_printf_a_format=yes

?# Make sure we build after busybox so that /bin/sh links to bash ?ifeq ($(BR2_PACKAGE_BUSYBOX),y)
--
1.7.8.3

Signature · 2 lines
Best regards
Arkady Gilinsky
#11 lore raw

PATCH v4 1/1 bash: Adding features that can not be automatically detected while cross-compiling

From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]>

There are some bash features that can not be detected automatically during configure stage while cross-compiling. This commit forces them on.

---
 package/bash/bash.mk |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
package/bash/bash.mk +5 -1
index f1f951c..44f9337 100644
@@ -7,7 +7,11 @@
 BASH_VERSION = 4.2
 BASH_SITE = $(BR2_GNU_MIRROR)/bash
 BASH_DEPENDENCIES = ncurses
-BASH_CONF_ENV = bash_cv_job_control_missing=no
+BASH_CONF_ENV +=                       \
+   bash_cv_job_control_missing=present \
+   bash_cv_sys_named_pipes=present     \
+   bash_cv_func_sigsetjmp=present      \
+   bash_cv_printf_a_format=yes
 
 # Make sure we build after busybox so that /bin/sh links to bash
 ifeq ($(BR2_PACKAGE_BUSYBOX),y)
Signature · 1 line
1.7.8.3
#12 lore raw

PATCH v4 1/1 bash: Adding features that can not be automatically detected while cross-compiling

Quoted 1 line · On Thursday 19 January 2012 13:22:08 Arnout Vandecappelle (Essensium/Mind)…

+ bash_cv_printf_a_format=yes

Actually this one depends on UCLIBC_HAS_HEXADECIMAL_FLOATS, so maybe that
should be kept as a configure option?

BTW there are still a lot of other warnings in the bash configure, but I
don't think they remove features from the resulting executable.

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#13 lore raw

PATCH v4 1/1 bash: Adding features that can not be automatically detected while cross-compiling

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle <[email protected]> writes:

Quoted 1 line · Arnout> On Thursday 19 January 2012 13:22:08 Arnout Vandecappelle…
Quoted 1 line

+ bash_cv_printf_a_format=yes

Arnout> Actually this one depends on UCLIBC_HAS_HEXADECIMAL_FLOATS, so Arnout> maybe that should be kept as a configure option?

No, a lot of packages break if you start tweaking the uClibc configuration. I don't want to add configuration option of all of these, and really consider the custom uClibc config stuff to be an advanced "you-have-to-know-what-you-are-doing" option.

Signature · 1 line
Bye, Peter Korsgaard
#14 lore raw

PATCH v4 1/1 bash: Adding features that can not be automatically detected while cross-compiling

Quoted 5 lines · On Friday 20 January 2012 09:23:19 Peter Korsgaard wrote:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle <[email protected]> writes:

Quoted 1 line · Arnout> On Thursday 19 January 2012 13:22:08 Arnout Vandecappelle…
Quoted 1 line

+ bash_cv_printf_a_format=yes

Quoted 7 lines

Arnout> Actually this one depends on UCLIBC_HAS_HEXADECIMAL_FLOATS, so Arnout> maybe that should be kept as a configure option?

No, a lot of packages break if you start tweaking the uClibc configuration. I don't want to add configuration option of all of these, and really consider the custom uClibc config stuff to be an advanced "you-have-to-know-what-you-are-doing" option.

I agree; however:

toolchain/toolchain-crosstool-ng/uClibc.config:# UCLIBC_HAS_HEXADECIMAL_FLOATS is not set

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#15 lore raw

PATCH v4 1/1 bash: Adding features that can not be automatically detected while cross-compiling

Quoted 6 lines
Quoted 6 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle <[email protected]> writes:

No, a lot of packages break if you start tweaking the uClibc configuration. I don't want to add configuration option of all of these, and really consider the custom uClibc config stuff to be an advanced "you-have-to-know-what-you-are-doing" option.

Arnout> I agree; however:

Arnout> toolchain/toolchain-crosstool-ng/uClibc.config:# UCLIBC_HAS_HEXADECIMAL_FLOATS is not set

*Grumble* Why is it again we cannot use the same uClibc config for ctng as for the internal toolchain?

Signature · 1 line
Bye, Peter Korsgaard
#16 lore raw

PATCH v4 1/1 bash: Adding features that can not be automatically detected while cross-compiling

In reply to Arnout Vandecappelle (Essensium/Mind)
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle (Essensium/Mind) <[email protected]> writes:

Arnout> From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]> Arnout> There are some bash features that can not be detected automatically during Arnout> configure stage while cross-compiling. This commit forces them on.

Arnout> Signed-off-by: Arkady Gilinsky <[email protected]> Arnout> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <[email protected]>

Committed, thanks both.

Signature · 1 line
Bye, Peter Korsgaard
#17 lore raw

PATCH v2 1/1 bash: Adding features that can not be automatically detected while cross-compiling

In reply to Peter Korsgaard
Quoted 3 lines · On Wednesday 18 January 2012 00:07:43 Peter Korsgaard wrote:

Ok, but does it make sense to make these things configurable? I haven't checked, but presumably these are supported on all Linux archs, and don't affect the binary size significantly (compared to bash size)?

By the way, on ARM it increases the size from 878K to 879K...

Regards,
Arnout

Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F