avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-gcc-list] strtol.c undefined reference to _ldiv


From: Kang Tin LAI
Subject: Re: [avr-gcc-list] strtol.c undefined reference to _ldiv
Date: Sun, 15 Apr 2001 21:21:03 +0800

Modify include/stdlib.h:

/* _div and _ldiv from libgcc.a */
/*
extern div_t div(int, int) __asm__("_div") __ATTR_CONST__;
extern ldiv_t ldiv(long, long) __asm__("_ldiv") __ATTR_CONST__;
*/
extern div_t div(int, int) __asm__("__udivmodsi4") __ATTR_CONST__;
extern ldiv_t ldiv(long, long) __asm__("__divmodsi4") __ATTR_CONST__;

then rebuild the libraries, then rebuild your codes.

Also a note, if you are Linuxer:
src/Makefile:

ifdef win32
  RM = rm
  MD = $(subst /,\,mkdir $@)
  INSTALL = $(subst \,/,cp -v -f $^)
else
  RM = rm
  MD = mkdir -p $@                <--- $@ missing
  INSTALL = install -m644 $^/
endif


Cheers!

KTL

Jason Kyle wrote:
> 
> Just installed latest gcc (3.0 20010409) and avr-libc (20010331), came
> across the following problem - looks like a name change somewhere but I
> can't find it.
> 
> avr-libc-20010331/src/bsd/strtol.c:113: undefined reference to '_ldiv'
> 
> Similar to post regarding itoa() a few weeks back, are we likely to see
> more name change problems like these?  Marek, please assist :)
> 
> Also of note, but not critical
> make gnu=1
> fails at the moment too.
> 
> Cheers,
> 
> Jason Kyle
> 
> _______________________________________________
> avr-gcc-list mailing list
> address@hidden
> http://avr.jpk.co.nz/mailman/listinfo/avr-gcc-list



reply via email to

[Prev in Thread] Current Thread [Next in Thread]