Standalone bsp os fails to build under mb-g++
When the os compiler option is set to "mb-g++", Standalone OS will fail to build with following errors:
xil_mem.c: In function 'void Xil_MemCpy(void*, const void*, u32)': xil_mem.c:50:25: error: invalid conversion from 'const void*' to 'const char*' [-fpermissive] 50 | const char s = src; | ^~~ | | | const void
xil_sutil.c:880:24: error: invalid conversion from 'void*' to 'u8*' {aka 'unsigned char*'} [-fpermissive] 880 | u8 DestTemp = Dest; | ^~~~ | | | void xil_sutil.c:881:29: error: invalid conversion from 'const void*' to 'const u8*' {aka 'const unsigned char*'} [-fpermissive] 881 | const u8 SrcTemp = Src; | ^~~ | | | const void
xil_util.c:554:26: error: invalid conversion from 'const void*' to 'const u8*' {aka 'const unsigned char*'} [-fpermissive] 554 | const u8 Buf1 = Buf1Ptr; | ^~~~~~~ | | | const void xil_util.c:555:26: error: invalid conversion from 'const void*' to 'const u8*' {aka 'const unsigned char*'} [-fpermissive] 555 | const u8 Buf2 = Buf2Ptr; | ^~~~~~~ | | | const void
This was tested with v9.2 of the Standalone OS. It is highly expected that older versions are also affected by this.
All the flagged bugs above require explicit casting from void* to target type.
@smartinou Thanks for reporting, we will look into and fix as needed.