This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/29524] [4.2/4.3 Regression] Too much RAM used: __clz_tab[] linked
- From: "pmarques at grupopie dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Jan 2008 17:30:41 -0000
- Subject: [Bug target/29524] [4.2/4.3 Regression] Too much RAM used: __clz_tab[] linked
- References: <bug-29524-10671@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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