0001-src-platform.hh-fix-or1k-build.patch 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. From 2294e61b057215bf089b1d1c482a5dcbcad6b414 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Thu, 23 May 2024 17:50:18 +0200
  4. Subject: [PATCH] src/platform.hh: fix or1k build
  5. Fix the following or1k build failure raised since version 0.2.2 and
  6. https://github.com/q66/cffi-lua/commit/27755f61e4c625dff951302bade4ad07e3609ca5:
  7. In file included from /home/buildroot/autobuild/run/instance-0/output-1/host/or1k-buildroot-linux-uclibc/sysroot/usr/include/lua.hpp:6,
  8. from ../src/lua.hh:23,
  9. from ../src/parser.hh:4,
  10. from ../src/ffilib.cc:7:
  11. ../src/ffilib.cc: In static member function 'static void ffi_module::setup(lua_State*)':
  12. ../src/ffilib.cc:1616:28: error: expected ')' before 'FFI_ARCH_NAME'
  13. 1616 | lua_pushliteral(L, FFI_ARCH_NAME);
  14. | ^~~~~~~~~~~~~
  15. Fixes: 27755f61e4c625dff951302bade4ad07e3609ca5
  16. - http://autobuild.buildroot.org/results/4e14753732c5b6fe8ba9ecc4050ffb35f471c428
  17. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  18. Upstream: https://github.com/q66/cffi-lua/commit/2294e61b057215bf089b1d1c482a5dcbcad6b414
  19. ---
  20. src/platform.hh | 2 +-
  21. 1 file changed, 1 insertion(+), 1 deletion(-)
  22. diff --git a/src/platform.hh b/src/platform.hh
  23. index 84e0a89..dab1e76 100644
  24. --- a/src/platform.hh
  25. +++ b/src/platform.hh
  26. @@ -192,7 +192,7 @@
  27. # endif
  28. #elif defined(__OR1K__)
  29. # define FFI_ARCH FFI_ARCH_OR1K
  30. -# define FFO_ARCH_NAME "or1k"
  31. +# define FFI_ARCH_NAME "or1k"
  32. #elif defined(__riscv) || defined(__riscv__)
  33. # if __riscv_xlen == 32
  34. # define FFI_ARCH FFI_ARCH_RV32