Bug 35508

Summary: [avr] 4.3.0: undefined reference to `__ffshi2'
Product: gcc Reporter: Dmitry K. <dmixm>
Component: targetAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED DUPLICATE    
Severity: normal CC: dmixm, eric.weddington, gcc-bugs, hutchinsonandy, pmarques, sjackman
Priority: P3    
Version: 4.3.0   
Target Milestone: ---   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed:

Description Dmitry K. 2008-03-08 09:24:36 UTC
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.
Comment 1 Andy Hutchinson 2008-03-22 23:51:00 UTC
This is same bug as:

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

working on fix - to be posted soon.
Comment 2 Andy Hutchinson 2008-03-23 00:24:55 UTC
Patch posted

http://gcc.gnu.org/ml/gcc-patches/2008-03/msg01341.html
Comment 3 Eric Weddington 2008-03-23 03:04:22 UTC

*** This bug has been marked as a duplicate of 34210 ***
Comment 4 Andy Hutchinson 2008-04-07 23:16:23 UTC
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