[gccsdk] Problems building crosscompiler

Steve Fryatt lists at stevefryatt.org.uk
Sat Nov 14 15:49:09 PST 2009


On 11 Nov, Peter Naulls wrote in message
    <4AFA059D.1070304 at chocky.org>:

> Steve Fryatt wrote:

[Soft FP vs Hard FP errors at linking]

> There's very little in the Autobuilder that links against the SCL, so the
> OSLib build is default options - soft-float for use with UnixLib. DeskLib
> does however have two builds, since the SCL things in the AB actually use
> that.
> 
> You have a few options:

I've ended up building my own Hard-Float OSLib from the sources on
SourceForge.  That didn't actually solve the problem; I was still getting
errors about the mis-match of FP types (as above).

After a lot of Googling, I ended up swapping around the order of the -L and
-l flags passed to GCC: I was using

Links = -L$(GCCSDK_INSTALL_ENV)/lib -L$(GCCSDK_LIBS)/OSLib-Hard/ -lOSLib32 \
        -L$(GCCSDK_LIBS)/SFLib/ -lSFLib32 -L$(GCCSDK_LIBS)/FlexLib/
-lFlexLib32

and swapping this to

Links = -L$(GCCSDK_LIBS)/OSLib-Hard/ -lOSLib32 -L$(GCCSDK_INSTALL_ENV)/lib \
        -L$(GCCSDK_LIBS)/SFLib/ -lSFLib32 -L$(GCCSDK_LIBS)/FlexLib/
-lFlexLib32

(ie. reversing the first line) made the error go away.  I have to admit that
I don't really understand why -- can anyone explain?

Anyway, the result seems to run correctly over RISC OS (at least after a
very superficial test), so it seems to have sorted it.

Thanks for all the help thus far; I'm sure there will be more questions,
though.

-- 
Steve Fryatt - Leeds, England

http://www.stevefryatt.org.uk/




More information about the gcc mailing list