On 11/7/19 2:41 PM, Jozef Lawrynowicz wrote: > Support for the MSP430 -minrt option has been removed from Newlib, since all > the > associated behaviour is now dynamic. Initialization code run before main is > only > included when needed. > > This patch removes the final traces of -minrt from GCC. > > -minrt used to modify the linking process in the following ways: > * Removing .init and .fini sections, by using a reduced crt0 and excluding > crtn. > * Removing crtbegin and crtend (thereby not using crtstuff.c at all). > + This meant that even if the program had constructors for global or > static objects which must run before main, it would blindly remove them. > > These causes of code bloat have been addressed by: > * switching to .{init,fini}_array instead of using .{init,fini} sections > "Lean" code to run through constructors before main is only included if > .init_array has contents. > * removing bloat (frame_dummy, *tm_clones*, *do_global_dtors*) from the > crtstuff.c with the changes in the previous patches > > Here are some examples of the total size of different "barebones" C programs > to > show that the size previously achieved by -minrt is now matched by default: > > program |old (with -minrt) |new (without -minrt) > --------------------------------------------------------------------- > Empty main |20 |20 > Looping main |14 |14 > Looping main with data |94 |94 > Looping main with bss |56 |56 > > > 0004-MSP430-Remove-minrt-option.patch > > From 6e561b45c118540f06d5828ec386d2dd79c13b62 Mon Sep 17 00:00:00 2001 > From: Jozef Lawrynowicz <joze...@mittosystems.com> > Date: Wed, 6 Nov 2019 18:12:45 +0000 > Subject: [PATCH 4/4] MSP430: Remove -minrt option > > gcc/ChangeLog: > > 2019-11-07 Jozef Lawrynowicz <joze...@mittosystems.com> > > * config/msp430/msp430.h (STARTFILE_SPEC): Remove -minrt rules. > Use "if, then, else" syntax for specs. > (ENDFILE_SPEC): Likewise. > * config/msp430/msp430.opt: Mark -minrt as deprecated. > * doc/invoke.texi: Remove -minrt documentation. This is fine. I leave the decision whether or not to install now or wait for resolution on the other changes in this space as your decision.
jeff