summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-01-15 16:52:19 +0100
committerHarald Welte <laforge@gnumonks.org>2017-01-15 19:18:38 +0100
commit2400386c25afe1af68531ca9689618bfa1365bdc (patch)
treef4b77a98b701137039b902c5e34d71bffad8508a
parentce3c88e075ee5d5e97f8497c0143aeedf3ad0f8c (diff)
Avoid redefining __{packed,aligned,unused,section}
It seems modern version of newlib define those themselves, so we should avoid re-defining them. Removes tons of compiler warnings when compiling against libnewlib 2.4.0
-rw-r--r--src/target/firmware/include/defines.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/target/firmware/include/defines.h b/src/target/firmware/include/defines.h
index 3c8732f9..e5d5436d 100644
--- a/src/target/firmware/include/defines.h
+++ b/src/target/firmware/include/defines.h
@@ -5,12 +5,22 @@
#define __attribute_const__ __attribute__((__const__))
/* type properties */
+#ifndef __packed
#define __packed __attribute__((packed))
+#endif
+
+#ifndef __aligned
#define __aligned(alignment) __attribute__((aligned(alignment)))
+#endif
+
+#ifndef __unused
#define __unused __attribute__((unused))
+#endif
/* linkage */
+#ifndef __section
#define __section(name) __attribute__((section(name)))
+#endif
/* force placement in zero-waitstate memory */
#define __ramtext __section(".ramtext")