Skip to contentSkip to conversation

Add convenience TARGET_CROSS

PATCH In review Vladimir Serbinenko 2 participants 2 messages Mar 27, 2025 – Apr 10, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add convenience TARGET_CROSS

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

---
 configure.ac | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
configure.ac +5 -5
index ad1e7bea5..34f4f9415 100644
@@ -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
Signature · 7 lines
2.49.0


_______________________________________________
Grub-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel
#1 lore raw
Quoted 2 lines · Vladimir Serbinenko

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.

Quoted 14 lines
---
 configure.ac | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
configure.ac +0 -1
index ad1e7bea5..34f4f9415 100644
@@ -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],

configure.ac if test "x$target_alias" != x && test "x$host_alias" != "x$target_alias"; then · line 548

Quoted 10 lines
configure.ac +5 -4
+  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
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel