Fix compiling for linux arm64 (#650)

* Enable MK64 build option for torch

* Fix HMAS type error (present on arm64)

* Align memory pool and fix empty macro

* Experimental: Add 4096 memory alignment

* Add alignment for ALIGNED8 macro

* Use memset over deprecated bzero

* Ensure OPENGLES flag can be used in CMakeLists.txt

* Diagnostic: align ship2_window_i8 to rule out odd-alignment crash

---------

Co-authored-by: MegaMech <MegaMech@users.noreply.github.com>
This commit is contained in:
Jeod
2026-04-22 19:38:48 -04:00
committed by GitHub
parent 3a5af8ff76
commit 10f10f17e6
15 changed files with 55 additions and 33 deletions
+9 -2
View File
@@ -63,18 +63,25 @@
// Align to 8-byte boundary for DMA requirements
#ifdef __GNUC__
#define ALIGNED8
#define ALIGNED8 __attribute__((aligned(8)))
#else
#define ALIGNED8
#endif
// Align to 16-byte boundary for audio lib requirements
#ifdef __GNUC__
#define ALIGNED16
#define ALIGNED16 __attribute__((aligned(16)))
#else
#define ALIGNED16
#endif
// Align to 4096-byte boundary for 64-bit page requirements
#ifdef __GNUC__
#define ALIGNED4096 __attribute__((aligned(4096)))
#else
#define ALIGNED4096
#endif
// Fixed point macros
#define FTOFIX(f) ((s32) ((f) * 65536.0))
#define ITOFIX(i) ((s32) ((i) << 16))
-1
View File
@@ -1,7 +1,6 @@
#include <libultraship.h>
#ifdef _WIN32
#define bzero(b, len) (memset((b), '\0', (len)), (void) 0)
#define bcopy(b1, b2, len) (memmove((b2), (b1), (len)), (void) 0)
#endif