summaryrefslogtreecommitdiffstats
path: root/endiantest.c
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2017-12-01 18:33:02 +0000
committerNico Huber <nico.h@gmx.de>2017-12-19 12:36:38 +0000
commit095522cceca4aede4b4a5e8cd74cbbd8f63e1116 (patch)
treedacb6975b940eec5772060afe2af35bfc9adc090 /endiantest.c
parent19eb0792b8439198d7ef0077b8f79f275fa39a9d (diff)
downloadflashrom-095522cceca4aede4b4a5e8cd74cbbd8f63e1116.tar.gz
flashrom-095522cceca4aede4b4a5e8cd74cbbd8f63e1116.tar.bz2
flashrom-095522cceca4aede4b4a5e8cd74cbbd8f63e1116.zip
Move endianness definitions and provide it inside Makefile
Add an `endiantest.c` similar to `archtest.c` to provide the endianness inside the Makefile. The __FLASHROM_(LITTLE|BIG)_ENDIAN__ definitions had to move from `hwaccess.h` into `platform.h`, therefor. This will be used to decide whether to build the internal programmer in a follow- up. Change-Id: I55dcf5a88da48f885cda9ad89ab87395d895a891 Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/22670 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Diffstat (limited to 'endiantest.c')
-rw-r--r--endiantest.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/endiantest.c b/endiantest.c
new file mode 100644
index 000000000..de44ec5b0
--- /dev/null
+++ b/endiantest.c
@@ -0,0 +1,6 @@
+#include "platform.h"
+#if __FLASHROM_LITTLE_ENDIAN__
+little
+#else
+big
+#endif