Code size regression when using localtime
Bug #1503325 reported by
Sebi
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
GNU Arm Embedded Toolchain |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
I noticed a huge code size regression in newer ARM GCC versions when using the localtime function. The regression first occurred with 4.9 2015q2. I've attached sample code which I compiled using "arm-none-eabi-gcc test.c -O3 --specs=nano.specs -o test.elf". I get the following object sizes:
4.9 2015q1:
text data bss dec hex filename
4076 188 48 4312 10d8 test.elf
4.9 2015q2:
text data bss dec hex filename
13408 196 80 13684 3574 test.elf
Looking at the assembly I belive the size increase is due to a new call to _tzset_unlocked which then drags in a whole lot of other functions.
Changed in gcc-arm-embedded: | |
status: | New → Won't Fix |
To post a comment you must log in.
Hi Sebi,
This is due to commit to better support changing the TZ environment variable. See my last comment on [1] for a workaround.
[1] https:/ /answers. launchpad. net/gcc- arm-embedded/ +question/ 269029
Best regards.