[riot-notifications] [RIOT-OS/RIOT] pkg/libb2: rename config.h to avoid conflicts in the global namespace, set HAVE_ALIGNED_ACCESS_REQUIRED based on CPU (fixes build on esp8266) (#12135)

benpicco notifications at github.com
Mon Sep 2 12:17:17 CEST 2019


benpicco commented on this pull request.



> +
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Add no suffix to the functions */
+#define SUFFIX
+
+/* Test for a little-endian machine */
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+#define NATIVE_LITTLE_ENDIAN
+#endif
+
+/* CPUs that don't support unaligned access, taken from GStreamer */
+#if defined(__alpha__) || defined(__arc__) || defined(__arm__) || defined(__aarch64__) || defined(__bfin) || defined(__hppa__) || defined(__nios2__) || defined(__MICROBLAZE__) || defined(__mips__) || defined(__or1k__) || defined(__sh__) || defined(__SH4__) || defined(__sparc__) || defined(__sparc) || defined(__ia64__) || defined(_M_ALPHA) || defined(_M_ARM) || defined(_M_ARM64) || defined(_M_IA64) || defined(__xtensa__) || defined(__e2k__) || defined(__riscv)
+#define HAVE_ALIGNED_ACCESS_REQUIRED

I think this belongs to `cpu/` where CPUs that support it can define `CPU_HAVE_UNALIGNED_ACCESS`, but this is for another PR.

(thinking about it, the only architecture we support that actually can do unaligned load would be `native` on x86. Well, also ARM, but that is with a little help from the kernel.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/12135#discussion_r319896071
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190902/01c99753/attachment.htm>


More information about the notifications mailing list