Cortex-M3 low level assert issue.

Mike Franklin slavo5150 at yahoo.com
Sat May 4 00:51:16 UTC 2019


On Friday, 3 May 2019 at 16:31:34 UTC, kinke wrote:
> On Friday, 3 May 2019 at 03:18:00 UTC, Mike Franklin wrote:
>>> Question for LDC developers:  Are the above compiler flags 
>>> enabled by default?  How can one confirm?
>>
>> This looks relevant:  
>> https://github.com/ldc-developers/ldc/blob/c81a0c94e535c3d670a4fab7aca9b1de22c3778c/driver/targetmachine.cpp#L472-L481
>
> Yep, and this for the linker cmdline:
> https://github.com/ldc-developers/ldc/blob/13cc3c4ed2f4e77096313916e55ce460f9dd1ddc/driver/linker-gcc.cpp#L535-L543
>
> So yes, these are the default settings for Linux targets (the 
> linker-strip-dead option is enabled by default), even for debug 
> builds. For non-Linux targets, we rely on the LLVM defaults 
> wrt. func/data sections; --gc-section is definitely only used 
> for Linux targets though (use `-v` in the LDC cmdline to print 
> the linker cmdline).

What about `arm-none-eabi`?  There's no "linux" in that triple.  
Is there any way to pass the equivalent of `-ffunction-sections` 
and `-fdata-sections` on the ldc2 command line?


More information about the digitalmars-d-ldc mailing list