summaryrefslogtreecommitdiffstats
path: root/src/target
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 16:52:19 +0100
commitf04442d75f661ad37c5d0c734b64a34038ad4183 (patch)
tree4fdc1620439208c80a035f77b4a0464fc3228595 /src/target
parent4de980b32c09dc0697f8f84302b646d48cdbef28 (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
Diffstat (limited to 'src/target')
-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")