All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] configure.ac: avoid bashisms
@ 2025-10-29  9:31 Lars Wendler via Grub-devel
  2025-10-30  6:13 ` Gary Lin via Grub-devel
  0 siblings, 1 reply; 6+ messages in thread
From: Lars Wendler via Grub-devel @ 2025-10-29  9:31 UTC (permalink / raw)
  To: grub-devel; +Cc: Lars Wendler

or else configure check doesn't succeed with non-bash shell (e.g. dash):

  checking whether to enable AMD64 as(1) feature detection... /var/tmp/portage/sys-boot/grub-2.14_rc1/work/grub-2.14~rc1/configure: 39176: test: xx86_64: unexpected operator
  no

and later build fails with

  /var/tmp/portage/sys-boot/grub-2.14_rc1/work/grub-2.14~rc1/grub-core/lib/libgcrypt-grub/src/hwf-x86.c: In function ‘detect_x86_gnuc’:
  /var/tmp/portage/sys-boot/grub-2.14_rc1/work/grub-2.14~rc1/grub-core/lib/libgcrypt-grub/src/hwf-x86.c:252:17: error: ‘HWF_INTEL_CPU’ undeclared (first use in this function)
    252 |       result |= HWF_INTEL_CPU;
        |                 ^~~~~~~~~~~~~

and other corresponding HWF_INTEL_* definitions because HAVE_CPU_ARCH_X86 was
erroneously not defined by configure script.
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 8a72c078e..17937baf4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1150,7 +1150,7 @@ fi
 
 # Implementation of the --disable-amd64-as-feature-detection switch.
 AC_MSG_CHECKING([whether to enable AMD64 as(1) feature detection])
-if test x$target_cpu == xx86_64 -a x$platform == xefi; then
+if test x$target_cpu = xx86_64 -a x$platform = xefi; then
   CPPFLAGS_GCRY_ASM="-D__x86_64 -DHAVE_CPU_ARCH_X86"
   AC_ARG_ENABLE(amd64-as-feature-detection,
     AS_HELP_STRING([--disable-amd64-as-feature-detection],
-- 
2.51.2


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] configure.ac: avoid bashisms
  2025-10-29  9:31 Lars Wendler via Grub-devel
@ 2025-10-30  6:13 ` Gary Lin via Grub-devel
  2025-10-30  6:31   ` Lars Wendler via Grub-devel
  0 siblings, 1 reply; 6+ messages in thread
From: Gary Lin via Grub-devel @ 2025-10-30  6:13 UTC (permalink / raw)
  To: Lars Wendler; +Cc: Gary Lin, The development of GNU GRUB

On Wed, Oct 29, 2025 at 10:31:31AM +0100, Lars Wendler via Grub-devel wrote:
Hi Lars,

> or else configure check doesn't succeed with non-bash shell (e.g. dash):
> 
>   checking whether to enable AMD64 as(1) feature detection... /var/tmp/portage/sys-boot/grub-2.14_rc1/work/grub-2.14~rc1/configure: 39176: test: xx86_64: unexpected operator
>   no
> 
> and later build fails with
> 
>   /var/tmp/portage/sys-boot/grub-2.14_rc1/work/grub-2.14~rc1/grub-core/lib/libgcrypt-grub/src/hwf-x86.c: In function ‘detect_x86_gnuc’:
>   /var/tmp/portage/sys-boot/grub-2.14_rc1/work/grub-2.14~rc1/grub-core/lib/libgcrypt-grub/src/hwf-x86.c:252:17: error: ‘HWF_INTEL_CPU’ undeclared (first use in this function)
>     252 |       result |= HWF_INTEL_CPU;
>         |                 ^~~~~~~~~~~~~
> 
> and other corresponding HWF_INTEL_* definitions because HAVE_CPU_ARCH_X86 was
> erroneously not defined by configure script.
Thanks for fixing the error.

Could you add your "Signed-off" to this patch?
With that fixed,

Reviewed-by: Gary Lin <glin@suse.com>

Cheers,

Gary Lin

> ---
>  configure.ac | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 8a72c078e..17937baf4 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1150,7 +1150,7 @@ fi
>  
>  # Implementation of the --disable-amd64-as-feature-detection switch.
>  AC_MSG_CHECKING([whether to enable AMD64 as(1) feature detection])
> -if test x$target_cpu == xx86_64 -a x$platform == xefi; then
> +if test x$target_cpu = xx86_64 -a x$platform = xefi; then
>    CPPFLAGS_GCRY_ASM="-D__x86_64 -DHAVE_CPU_ARCH_X86"
>    AC_ARG_ENABLE(amd64-as-feature-detection,
>      AS_HELP_STRING([--disable-amd64-as-feature-detection],
> -- 
> 2.51.2
> 
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] configure.ac: avoid bashisms
  2025-10-30  6:13 ` Gary Lin via Grub-devel
@ 2025-10-30  6:31   ` Lars Wendler via Grub-devel
  2025-10-30  8:37     ` Sudhakar Kuppusamy
  2025-11-05 19:01     ` Daniel Kiper
  0 siblings, 2 replies; 6+ messages in thread
From: Lars Wendler via Grub-devel @ 2025-10-30  6:31 UTC (permalink / raw)
  To: grub-devel; +Cc: Lars Wendler

or else configure check doesn't succeed with non-bash shell (e.g. dash):

  checking whether to enable AMD64 as(1) feature detection... /var/tmp/portage/sys-boot/grub-2.14_rc1/work/grub-2.14~rc1/configure: 39176: test: xx86_64: unexpected operator
  no

and later build fails with

  /var/tmp/portage/sys-boot/grub-2.14_rc1/work/grub-2.14~rc1/grub-core/lib/libgcrypt-grub/src/hwf-x86.c: In function ‘detect_x86_gnuc’:
  /var/tmp/portage/sys-boot/grub-2.14_rc1/work/grub-2.14~rc1/grub-core/lib/libgcrypt-grub/src/hwf-x86.c:252:17: error: ‘HWF_INTEL_CPU’ undeclared (first use in this function)
    252 |       result |= HWF_INTEL_CPU;
        |                 ^~~~~~~~~~~~~

and other corresponding HWF_INTEL_* definitions because HAVE_CPU_ARCH_X86 was
erroneously not defined by configure script.

Signed-off-by: Lars Wendler <polynomial-c@gmx.de>
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 8a72c078e..17937baf4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1150,7 +1150,7 @@ fi
 
 # Implementation of the --disable-amd64-as-feature-detection switch.
 AC_MSG_CHECKING([whether to enable AMD64 as(1) feature detection])
-if test x$target_cpu == xx86_64 -a x$platform == xefi; then
+if test x$target_cpu = xx86_64 -a x$platform = xefi; then
   CPPFLAGS_GCRY_ASM="-D__x86_64 -DHAVE_CPU_ARCH_X86"
   AC_ARG_ENABLE(amd64-as-feature-detection,
     AS_HELP_STRING([--disable-amd64-as-feature-detection],
-- 
2.51.2


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] configure.ac: avoid bashisms
  2025-10-30  6:31   ` Lars Wendler via Grub-devel
@ 2025-10-30  8:37     ` Sudhakar Kuppusamy
  2025-11-05 19:01     ` Daniel Kiper
  1 sibling, 0 replies; 6+ messages in thread
From: Sudhakar Kuppusamy @ 2025-10-30  8:37 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Lars Wendler

On 30 Oct 2025, at 12:01 PM, Lars Wendler via Grub-devel <grub-devel@gnu.org> wrote:
> 
> or else configure check doesn't succeed with non-bash shell (e.g. dash):
> 
>  checking whether to enable AMD64 as(1) feature detection... /var/tmp/portage/sys-boot/grub-2.14_rc1/work/grub-2.14~rc1/configure: 39176: test: xx86_64: unexpected operator
>  no
> 
> and later build fails with
> 
>  /var/tmp/portage/sys-boot/grub-2.14_rc1/work/grub-2.14~rc1/grub-core/lib/libgcrypt-grub/src/hwf-x86.c: In function ‘detect_x86_gnuc’:
>  /var/tmp/portage/sys-boot/grub-2.14_rc1/work/grub-2.14~rc1/grub-core/lib/libgcrypt-grub/src/hwf-x86.c:252:17: error: ‘HWF_INTEL_CPU’ undeclared (first use in this function)
>    252 |       result |= HWF_INTEL_CPU;
>        |                 ^~~~~~~~~~~~~
> 
> and other corresponding HWF_INTEL_* definitions because HAVE_CPU_ARCH_X86 was
> erroneously not defined by configure script.
> 
> Signed-off-by: Lars Wendler <polynomial-c@gmx.de>

Reviewed-by: Sudhakar Kuppusamy <sudhakar@linux.ibm.com>

> ---
> configure.ac | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/configure.ac b/configure.ac
> index 8a72c078e..17937baf4 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1150,7 +1150,7 @@ fi
> 
> # Implementation of the --disable-amd64-as-feature-detection switch.
> AC_MSG_CHECKING([whether to enable AMD64 as(1) feature detection])
> -if test x$target_cpu == xx86_64 -a x$platform == xefi; then
> +if test x$target_cpu = xx86_64 -a x$platform = xefi; then
>   CPPFLAGS_GCRY_ASM="-D__x86_64 -DHAVE_CPU_ARCH_X86"
>   AC_ARG_ENABLE(amd64-as-feature-detection,
>     AS_HELP_STRING([--disable-amd64-as-feature-detection],
> -- 
> 2.51.2
> 
> 
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] configure.ac: avoid bashisms
       [not found] <mailman.20754.1761826895.1109.grub-devel@gnu.org>
@ 2025-10-31  6:54 ` Avnish Chouhan
  0 siblings, 0 replies; 6+ messages in thread
From: Avnish Chouhan @ 2025-10-31  6:54 UTC (permalink / raw)
  To: polynomial-c; +Cc: grub-devel, Daniel Kiper

On 2025-10-30 17:51, grub-devel-request@gnu.org wrote:
> Message: 2
> Date: Thu, 30 Oct 2025 07:31:59 +0100
> From: Lars Wendler <polynomial-c@gmx.de>
> To: grub-devel@gnu.org
> Cc: Lars Wendler <polynomial-c@gmx.de>
> Subject: [PATCH] configure.ac: avoid bashisms
> Message-ID: <20251030063159.11177-1-polynomial-c@gmx.de>
> Content-Type: text/plain; charset=UTF-8
> 
> or else configure check doesn't succeed with non-bash shell (e.g. 
> dash):
> 
>   checking whether to enable AMD64 as(1) feature detection...
> /var/tmp/portage/sys-boot/grub-2.14_rc1/work/grub-2.14~rc1/configure:
> 39176: test: xx86_64: unexpected operator
>   no
> 
> and later build fails with
> 
> 
> /var/tmp/portage/sys-boot/grub-2.14_rc1/work/grub-2.14~rc1/grub-core/lib/libgcrypt-grub/src/hwf-x86.c:
> In function ‘detect_x86_gnuc’:
> 
> /var/tmp/portage/sys-boot/grub-2.14_rc1/work/grub-2.14~rc1/grub-core/lib/libgcrypt-grub/src/hwf-x86.c:252:17:
> error: ‘HWF_INTEL_CPU’ undeclared (first use in this function)
>     252 |       result |= HWF_INTEL_CPU;
>         |                 ^~~~~~~~~~~~~
> 
> and other corresponding HWF_INTEL_* definitions because 
> HAVE_CPU_ARCH_X86 was
> erroneously not defined by configure script.
> 
> Signed-off-by: Lars Wendler <polynomial-c@gmx.de>
> ---

Reviewed-by: Avnish Chouhan <avnish@linux.ibm.com>

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] configure.ac: avoid bashisms
  2025-10-30  6:31   ` Lars Wendler via Grub-devel
  2025-10-30  8:37     ` Sudhakar Kuppusamy
@ 2025-11-05 19:01     ` Daniel Kiper
  1 sibling, 0 replies; 6+ messages in thread
From: Daniel Kiper @ 2025-11-05 19:01 UTC (permalink / raw)
  To: Lars Wendler; +Cc: grub-devel

On Thu, Oct 30, 2025 at 07:31:59AM +0100, Lars Wendler via Grub-devel wrote:
> or else configure check doesn't succeed with non-bash shell (e.g. dash):
>
>   checking whether to enable AMD64 as(1) feature detection... /var/tmp/portage/sys-boot/grub-2.14_rc1/work/grub-2.14~rc1/configure: 39176: test: xx86_64: unexpected operator
>   no
>
> and later build fails with
>
>   /var/tmp/portage/sys-boot/grub-2.14_rc1/work/grub-2.14~rc1/grub-core/lib/libgcrypt-grub/src/hwf-x86.c: In function ‘detect_x86_gnuc’:
>   /var/tmp/portage/sys-boot/grub-2.14_rc1/work/grub-2.14~rc1/grub-core/lib/libgcrypt-grub/src/hwf-x86.c:252:17: error: ‘HWF_INTEL_CPU’ undeclared (first use in this function)
>     252 |       result |= HWF_INTEL_CPU;
>         |                 ^~~~~~~~~~~~~
>
> and other corresponding HWF_INTEL_* definitions because HAVE_CPU_ARCH_X86 was
> erroneously not defined by configure script.
>
> Signed-off-by: Lars Wendler <polynomial-c@gmx.de>

Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>

Daniel

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-11-05 19:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.20754.1761826895.1109.grub-devel@gnu.org>
2025-10-31  6:54 ` [PATCH] configure.ac: avoid bashisms Avnish Chouhan
2025-10-29  9:31 Lars Wendler via Grub-devel
2025-10-30  6:13 ` Gary Lin via Grub-devel
2025-10-30  6:31   ` Lars Wendler via Grub-devel
2025-10-30  8:37     ` Sudhakar Kuppusamy
2025-11-05 19:01     ` Daniel Kiper

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.