Skip to contentSkip to conversation

Add convenience TARGET_CROSS

PATCH In review Vladimir Serbinenko 3 participants 3 messages May 16, 2024 – Jun 4, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add convenience TARGET_CROSS

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

---
 configure.ac | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
configure.ac +5 -5
index 84a202c6e..cacbdb6ef 100644
@@ -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
Signature · 7 lines
2.39.2


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

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
[email protected]
https://lists.gnu.org/mailman/listinfo/grub-devel