Question about gcc/binutils relocatability

Paul Lussier p.lussier at comcast.net
Thu Dec 7 13:23:36 EST 2006


"Steven W. Orr" <steveo at syslang.net> writes:

> No, I'm not asking about whether the generated code is
> pc-relocatable. I'm asking if the arg to the --prefix option at
> configure time stops the compiler from working if the tools are
> installed in a different location. Last time I looked, that was an
> issue but now I'm wondering.
>
> If it's no longer an issue then I have to assume that gcc figures out
> where its components are by figuring out what direectory its binary is
> located in. Can someone please 'splain dis won to me? I am verstumpt.

I'm not quite sure what you're asking.  Are you trying to build
binutils, or gcc? --prefix should allow you to place something
anywhere you want it.  The compiler probably needs to be able to
*find* it once you've installed it, which means that the arg to
--prefix needs to be in your path, or provived to the compiler when it
is run so it knows where to find them.

For example, if you're going to build/install binutils like this:

  ./configure --prefix=/usr/local/random/path/put/bin/utils/here

You need to augment your $PATH with:

  PATH=$PATH:/usr/local/random/path/put/bin/utils/here/bin

Or, when calling gcc, do something like:

  PATH=$PATH:/usr/local/random/path/put/bin/utils/here/bin gcc ....

When calling gcc (which can be accomplished by setting that path in a
Makefile).

Does that help?

-- 
Seeya,
Paul
--
Key fingerprint = 1660 FECC 5D21 D286 F853  E808 BB07 9239 53F1 28EE

A: Yes.                                                               
> Q: Are you sure?                                                    
>> A: Because it reverses the logical flow of conversation.           
>>> Q: Why is top posting annoying in email?


More information about the gnhlug-discuss mailing list