I'm compiling from within CCS using TI's ARM compiler version v5.1.8 with optimisation level 4 (whole program optimisation) and --opt_for_speed 5.
This worked well for a longer time and until I added some new source files. Now I get a linker error (failed linktime optimisation) complaining about some incompatible redefinitions. The funny thing: the linker error message gives me the original definition and the redefinition - and both are completely identical! That looks like this for a lot of definitions:
error: symbol "ufb_empty" redeclared with incompatible type: "unsigned char(struct ufb_data *)" in "../buffer.c" at line 12 and: "unsigned char(struct ufb_data *)" in "../buffer.h" at line 53) error: symbol "ufb_push" redeclared with incompatible type: "unsigned char(struct ufb_data *, struct uframe *)" in "../buffer.c" at line 18 and: "unsigned char(struct ufb_data *, struct uframe *)" in "../buffer.h" at line 54) error: symbol "uFrameBuffer" redeclared with incompatible type: "struct ufb_data head off: 0 (uint_fast32_t) tail off: 32 (uint_fast32_t) buffer off: 64 (struct uframe *) size off: 96 (uint_fast32_t)" in "../buffer.c" at line 8 and: "struct ufb_data head off: 0 (uint_fast32_t) tail off: 32 (uint_fast32_t) buffer off: 64 (struct uframe *) size off: 96 (uint_fast32_t)" in "../buffer.h" at line 61) error: symbol "tcp_setprio" redeclared with incompatible type: "void(struct tcp_pcb *, u8_t)" in "/home/universe/AM335X_StarterWare_02_00_01_01/third_party/lwip-1.4.0/src/co re/tcp.c" at line 1066 and: "void(struct tcp_pcb *, u8_t)" in "../../../../../../../third_party/lwip-1.4.0/src/include/lwip/tcp.h" at line 362)
So...anybody an idea what could cause these wrong error messages and how to solve this problem?
Thanks!