[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] correct way to specify search path for avr's?
From: |
Joerg Wunsch |
Subject: |
Re: [avr-libc-dev] correct way to specify search path for avr's? |
Date: |
Tue, 11 May 2010 06:23:20 +0200 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
As Steve Franks wrote:
> Anyway, I've figured out my problem - set the library search path,
> so I could find my libs, but now avr-gcc can't find the libs for the
> m128. How do I go about merging those two concepts?
Normally, you don't have to hack those, they are supposed to be
derived from the --prefix setting at configure/compile time.
You can use
avr-gcc -print-search-dirs
and it should tell you where it's going to search by default.
> Is the m128 really an avr2 architecture?
It's avr5. Somehow, your setup appears to be messed up, for whatever
reason.
> -Wl,-Map=.map,-u,vfprintf,-lprintf_flt,-u,asin,-lm,-lgcc,-L/usr/local/avr/lib
That's a lot of stuff in a single option. Why's that? Why are you
forcing "asin" as an undefined symbol? Why are you trying to place
libm.a and libgcc.a manually there?
Normally, you should be able to get away with just
-Wl,-uvfprintf,-lprintf_flt -L./../lib/ -lm
(I doubt you really have libraries around in your "include"
directories, do you?)
> /work/a/ports/devel/avr-libc/work/avr-libc-1.6.8/avr/lib/avr2/../../../libc/stdio/vfprintf.c:338:
> undefined reference to `__mulhi3'
That's because you managed it to link an avr2-architecture file. avr5
doesn't have __mulhi3 in its library because the compiler can use the
hardware multiplier instead.
--
cheers, J"org .-.-. --... ...-- -.. . DL8DTL
http://www.sax.de/~joerg/ NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)