started getting stuff to compile for ARM
There were lots of places where the ARM compiler is pickier about
alignment and the externals stuff had to be reworked to use the cross
compiler for everything.
The main issues left are the lack of opencv and the x86 asm.
diff --git a/aos/atom_code/ipc_lib/queue.cc b/aos/atom_code/ipc_lib/queue.cc
index 7ab7b6c..018f03a 100644
--- a/aos/atom_code/ipc_lib/queue.cc
+++ b/aos/atom_code/ipc_lib/queue.cc
@@ -39,9 +39,9 @@
int ref_count;
int index; // in pool_
static MessageHeader *Get(const void *msg) {
- return reinterpret_cast<MessageHeader *>(
- static_cast<uint8_t *>(const_cast<void *>(msg)) -
- sizeof(MessageHeader));
+ return reinterpret_cast<MessageHeader *>(__builtin_assume_aligned(
+ static_cast<uint8_t *>(const_cast<void *>(msg)) - sizeof(MessageHeader),
+ alignof(MessageHeader)));
}
void Swap(MessageHeader *other) {
MessageHeader temp;