All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Add convenience TARGET_CROSS
@ 2024-05-16 19:07 Vladimir Serbinenko
  2024-06-03 16:30 ` Daniel Kiper
  2024-06-04 17:32 ` Mike Gilbert
  0 siblings, 2 replies; 5+ messages in thread
From: Vladimir Serbinenko @ 2024-05-16 19:07 UTC (permalink / raw)
  To: grub-devel; +Cc: Vladimir Serbinenko

This allows to set up cross environment with just 3 parameters: target,
platform and TARGET_CROSS

Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
---
 configure.ac | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index 84a202c6e..cacbdb6ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -539,12 +539,12 @@ if test "x$target_alias" != x && test "x$host_alias" != "x$target_alias"; then
   tmp_ac_tool_prefix="$ac_tool_prefix"
   ac_tool_prefix=$target_alias-
 
-  AC_CHECK_TOOLS(TARGET_CC, [gcc egcs cc],
+  AC_CHECK_TOOLS(TARGET_CC, [${TARGET_CROSS}gcc ${TARGET_CROSS}egcs ${TARGET_CROSS}cc],
                  [AC_MSG_ERROR([none of gcc, egcs and cc is found. set TARGET_CC manually.])])
-  AC_CHECK_TOOL(TARGET_OBJCOPY, objcopy)
-  AC_CHECK_TOOL(TARGET_STRIP, strip)
-  AC_CHECK_TOOL(TARGET_NM, nm)
-  AC_CHECK_TOOL(TARGET_RANLIB, ranlib)
+  AC_CHECK_TOOL(TARGET_OBJCOPY, ${TARGET_CROSS}objcopy)
+  AC_CHECK_TOOL(TARGET_STRIP, ${TARGET_CROSS}strip)
+  AC_CHECK_TOOL(TARGET_NM, ${TARGET_CROSS}nm)
+  AC_CHECK_TOOL(TARGET_RANLIB, ${TARGET_CROSS}ranlib)
 
   ac_tool_prefix="$tmp_ac_tool_prefix"
 else
-- 
2.39.2


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

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

* Re: [PATCH] Add convenience TARGET_CROSS
  2024-05-16 19:07 [PATCH] Add convenience TARGET_CROSS Vladimir Serbinenko
@ 2024-06-03 16:30 ` Daniel Kiper
  2024-06-04 17:32 ` Mike Gilbert
  1 sibling, 0 replies; 5+ messages in thread
From: Daniel Kiper @ 2024-06-03 16:30 UTC (permalink / raw)
  To: Vladimir Serbinenko; +Cc: grub-devel

On Thu, May 16, 2024 at 10:07:12PM +0300, Vladimir Serbinenko wrote:
> This allows to set up cross environment with just 3 parameters: target,
> platform and TARGET_CROSS

May I ask you to document this in the INSTALL file?

Daniel

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

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

* Re: [PATCH] Add convenience TARGET_CROSS
  2024-05-16 19:07 [PATCH] Add convenience TARGET_CROSS Vladimir Serbinenko
  2024-06-03 16:30 ` Daniel Kiper
@ 2024-06-04 17:32 ` Mike Gilbert
  1 sibling, 0 replies; 5+ messages in thread
From: Mike Gilbert @ 2024-06-04 17:32 UTC (permalink / raw)
  To: The development of GNU GRUB; +Cc: Vladimir Serbinenko

On Thu, May 16, 2024 at 3:07 PM Vladimir Serbinenko <phcoder@gmail.com> wrote:
>
> This allows to set up cross environment with just 3 parameters: target,
> platform and TARGET_CROSS

I wonder if it would make sense to use the AC_CHECK_TARGET_TOOL[S]
macros instead of AC_CHECK_TOOL[S]?

https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.72/html_node/Generic-Programs.html#index-AC_005fCHECK_005fTARGET_005fTOOL-1

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

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

* [PATCH] Add convenience TARGET_CROSS
@ 2025-03-27 16:32 Vladimir Serbinenko
  2025-04-10 14:43 ` Daniel Kiper
  0 siblings, 1 reply; 5+ messages in thread
From: Vladimir Serbinenko @ 2025-03-27 16:32 UTC (permalink / raw)
  To: grub-devel; +Cc: Vladimir Serbinenko

Setting all TARGET_* variables is cumbersome. This convenience macro allows
to set them all in one go

Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
---
 configure.ac | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index ad1e7bea5..34f4f9415 100644
--- a/configure.ac
+++ b/configure.ac
@@ -540,12 +540,12 @@ if test "x$target_alias" != x && test "x$host_alias" != "x$target_alias"; then
   tmp_ac_tool_prefix="$ac_tool_prefix"
   ac_tool_prefix=$target_alias-
 
-  AC_CHECK_TOOLS(TARGET_CC, [gcc egcs cc],
+  AC_CHECK_TOOLS(TARGET_CC, [${TARGET_CROSS}gcc ${TARGET_CROSS}egcs ${TARGET_CROSS}cc],
                  [AC_MSG_ERROR([none of gcc, egcs and cc is found. set TARGET_CC manually.])])
-  AC_CHECK_TOOL(TARGET_OBJCOPY, objcopy)
-  AC_CHECK_TOOL(TARGET_STRIP, strip)
-  AC_CHECK_TOOL(TARGET_NM, nm)
-  AC_CHECK_TOOL(TARGET_RANLIB, ranlib)
+  AC_CHECK_TOOL(TARGET_OBJCOPY, ${TARGET_CROSS}objcopy)
+  AC_CHECK_TOOL(TARGET_STRIP, ${TARGET_CROSS}strip)
+  AC_CHECK_TOOL(TARGET_NM, ${TARGET_CROSS}nm)
+  AC_CHECK_TOOL(TARGET_RANLIB, ${TARGET_CROSS}ranlib)
 
   ac_tool_prefix="$tmp_ac_tool_prefix"
 else
-- 
2.49.0


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

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

* Re: [PATCH] Add convenience TARGET_CROSS
  2025-03-27 16:32 Vladimir Serbinenko
@ 2025-04-10 14:43 ` Daniel Kiper
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Kiper @ 2025-04-10 14:43 UTC (permalink / raw)
  To: Vladimir Serbinenko; +Cc: grub-devel

On Thu, Mar 27, 2025 at 07:32:04PM +0300, Vladimir Serbinenko wrote:
> Setting all TARGET_* variables is cumbersome. This convenience macro allows
> to set them all in one go

I think TARGET_CROSS should be documented in the INSTALL file.

> Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
> ---
>  configure.ac | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index ad1e7bea5..34f4f9415 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -540,12 +540,12 @@ if test "x$target_alias" != x && test "x$host_alias" != "x$target_alias"; then
>    tmp_ac_tool_prefix="$ac_tool_prefix"
>    ac_tool_prefix=$target_alias-
>
> -  AC_CHECK_TOOLS(TARGET_CC, [gcc egcs cc],
> +  AC_CHECK_TOOLS(TARGET_CC, [${TARGET_CROSS}gcc ${TARGET_CROSS}egcs ${TARGET_CROSS}cc],
>                   [AC_MSG_ERROR([none of gcc, egcs and cc is found. set TARGET_CC manually.])])
> -  AC_CHECK_TOOL(TARGET_OBJCOPY, objcopy)
> -  AC_CHECK_TOOL(TARGET_STRIP, strip)
> -  AC_CHECK_TOOL(TARGET_NM, nm)
> -  AC_CHECK_TOOL(TARGET_RANLIB, ranlib)
> +  AC_CHECK_TOOL(TARGET_OBJCOPY, ${TARGET_CROSS}objcopy)
> +  AC_CHECK_TOOL(TARGET_STRIP, ${TARGET_CROSS}strip)
> +  AC_CHECK_TOOL(TARGET_NM, ${TARGET_CROSS}nm)
> +  AC_CHECK_TOOL(TARGET_RANLIB, ${TARGET_CROSS}ranlib)

AC_CHECK_TOOL(TARGET_RANLIB, ranlib, false, ${TARGET_CROSS})?

Daniel

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

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

end of thread, other threads:[~2025-04-10 14:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-16 19:07 [PATCH] Add convenience TARGET_CROSS Vladimir Serbinenko
2024-06-03 16:30 ` Daniel Kiper
2024-06-04 17:32 ` Mike Gilbert
  -- strict thread matches above, loose matches on Subject: below --
2025-03-27 16:32 Vladimir Serbinenko
2025-04-10 14:43 ` 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.