[Bug target/29524] [4.2/4.3 Regression] Too much RAM used: __clz_tab[] linked

pmarques at grupopie dot com gcc-bugzilla@gcc.gnu.org
Fri Jan 18 18:16:00 GMT 2008



------- Comment #17 from pmarques at grupopie dot com  2008-01-18 17:30 -------
I just found out what's causing this confusion. If you compile your program
like this:

avr-gcc -Os -mmcu=atmega168 -lm main.c -o main.elf

__clz_tab gets included. But if you compile like this:

avr-gcc -Os -mmcu=atmega168 main.c -lm -o main.elf

it doesn't!!!

So, the order you pass -lm matters to the final outcome.

Tested with gcc 4.2.2, libc 1.4.6 and libc 1.6.1.


-- 

pmarques at grupopie dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pmarques at grupopie dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29524



More information about the Gcc-bugs mailing list