0002-build-ax_lua.m4-fix-cross-compilation.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. From aed16d13d881492e8558f9da21be2dffc4ab2c33 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Sat, 4 Sep 2021 17:23:58 +0200
  4. Subject: [PATCH] build/ax_lua.m4: fix cross-compilation
  5. Don't try to "find" and "fix" the script and module directories when
  6. cross-compiling as this will give unexpected results such as using
  7. ${prefix}/lfs/hdd_v1/rc-buildroot-test/scripts/instance-0/output-1/host/usr/share/lua/5.3
  8. instead of
  9. ${prefix}/share/lua/5.3
  10. if the host machine root directory is /usr
  11. Fixes:
  12. - http://autobuild.buildroot.org/results/09fa6dd9844d6d4694801ec59434dad7a56bf290
  13. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  14. ---
  15. build/ax_lua.m4 | 4 ++--
  16. 1 file changed, 2 insertions(+), 2 deletions(-)
  17. diff --git a/build/ax_lua.m4 b/build/ax_lua.m4
  18. index 23ca774..7c25cfd 100644
  19. --- a/build/ax_lua.m4
  20. +++ b/build/ax_lua.m4
  21. @@ -291,7 +291,7 @@ AC_DEFUN([AX_PROG_LUA],
  22. dnl Try to find a path with the prefix.
  23. _AX_LUA_FND_PRFX_PTH([$LUA], [$ax_lua_prefix], [package.path])
  24. - AS_IF([test "x$ax_lua_prefixed_path" != 'x'],
  25. + AS_IF([test "x$ax_lua_prefixed_path" != 'x' && test "x$cross_compiling" != 'xyes'],
  26. [ dnl Fix the prefix.
  27. _ax_strip_prefix=`echo "$ax_lua_prefix" | sed 's|.|.|g'`
  28. ax_cv_lua_luadir=`echo "$ax_lua_prefixed_path" | \
  29. @@ -318,7 +318,7 @@ AC_DEFUN([AX_PROG_LUA],
  30. dnl Try to find a path with the prefix.
  31. _AX_LUA_FND_PRFX_PTH([$LUA],
  32. [$ax_lua_exec_prefix], [package.cpathd])
  33. - AS_IF([test "x$ax_lua_prefixed_path" != 'x'],
  34. + AS_IF([test "x$ax_lua_prefixed_path" != 'x' && test "x$cross_compiling" != 'xyes'],
  35. [ dnl Fix the prefix.
  36. _ax_strip_prefix=`echo "$ax_lua_exec_prefix" | sed 's|.|.|g'`
  37. ax_cv_lua_luaexecdir=`echo "$ax_lua_prefixed_path" | \
  38. --
  39. 2.32.0