The next program is not linked (-Os option): int ffs (int); int main (int argc, char *argv[]) { (void)argv; return ffs (argc); } with undefined link to '__ffshi2'. The used libc library (Avr-libc project) contains the ffs() funcion.
This is same bug as: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34210 working on fix - to be posted soon.
Patch posted http://gcc.gnu.org/ml/gcc-patches/2008-03/msg01341.html
*** This bug has been marked as a duplicate of 34210 ***
Subject: Bug 35508 Author: hutchinsonandy Date: Mon Apr 7 23:15:35 2008 New Revision: 133993 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133993 Log: PR target/34210 PR target/35508 * config.host (avr-*-*): Add avr cpu_type and avr tmake_file. * config/t-avr: New file. Build 16bit libgcc functions. Added: trunk/libgcc/config/avr/ trunk/libgcc/config/avr/t-avr Modified: trunk/libgcc/ChangeLog trunk/libgcc/config.host