From 2400386c25afe1af68531ca9689618bfa1365bdc Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 15 Jan 2017 16:52:19 +0100 Subject: 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 --- src/target/firmware/include/defines.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/target/firmware/include') 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") -- cgit v1.2.3