[Skiboot] [PATCH] Add support for GLIBC style endianess check Add GLIBC style endianess check in $(SRC)/include/endian.h On doing so, extract-gcov.c fails to build. Problem : extract-gcov.c is built using HOSTCC , but Makefile.check generically adds $(SRC)/include to include path causing the issue.
Akshay Adiga
akshay.adiga at linux.vnet.ibm.com
Fri May 5 03:21:19 AEST 2017
---
core/test/Makefile.check | 2 +-
include/endian.h | 13 +++++++++++++
libstb/test/Makefile.check | 2 +-
3 files changed, 15 insertions(+), 2 deletions(-)
create mode 100644 include/endian.h
diff --git a/core/test/Makefile.check b/core/test/Makefile.check
index 3554050..fdfed06 100644
--- a/core/test/Makefile.check
+++ b/core/test/Makefile.check
@@ -21,7 +21,7 @@ CORE_TEST := \
core/test/run-timer \
core/test/run-buddy
-HOSTCFLAGS+=-I . -I include
+HOSTCFLAGS+=-I .
CORE_TEST_NOSTUB := core/test/run-console-log
CORE_TEST_NOSTUB += core/test/run-console-log-buf-overrun
diff --git a/include/endian.h b/include/endian.h
new file mode 100644
index 0000000..63e0763
--- /dev/null
+++ b/include/endian.h
@@ -0,0 +1,13 @@
+#include <ccan/endian/endian.h>
+
+
+#define __LITTLE_ENDIAN 1234
+#define __BIG_ENDIAN 4321
+
+#ifdef HAVE_LITTLE_ENDIAN
+ #define __BYTE_ORDER __LITTLE_ENDIAN
+#elif HAVE_BIG_ENDIAN
+ #define __BYTE_ORDER __BIG_ENDIAN
+#else
+ #error
+#endif
diff --git a/libstb/test/Makefile.check b/libstb/test/Makefile.check
index 00e1397..5f5f6ac 100644
--- a/libstb/test/Makefile.check
+++ b/libstb/test/Makefile.check
@@ -2,7 +2,7 @@
LIBSTB_TEST := libstb/test/run-stb-container \
libstb/test/print-stb-container
-HOSTCFLAGS+=-I . -I include
+HOSTCFLAGS+=-I .
libstb/test/print-stb-container-check: libstb/test/print-stb-container-q
--
2.5.5
More information about the Skiboot
mailing list