This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: installing a cross compiler


David:

>   Actually, isn't it probably-ok-but-highly-dangerous when you're
> recompiling your native compiler, but pretty much suicidal when
> making a cross compiler?

I think it's "potentially suicidal" (?) :^) in all cases, but not for
the reasons you mention.  By default, gcc seems to always apply
target-specific tweaks to header and library search paths, so it can
properly discriminate between header and library file sets for
different targets (see gcc's -b option, I think).  On top of that,
with few exceptions the executables are installed with target-specific
names.

The default gcc search path is generally on the order of
${PREFIX}/${TARGET}/include and ${PREFIX}/${TARGET}/lib.

To undo this, you have to provide more options to configure, like
--prefix-local, and the options that control the names of the
executables themselves (--program-prefix and --program-suffix).  As
far as I can tell, to completely overwrite a native setup you MUST use
these options, which is why I never mention them anywhere.  :^)

So, it looks like the configure process already works the way you say
it should, except that it *will* take /usr as a prefix, but you still
have to add more options to do an oops-darn-where-is-my-install-cd
setup.  Best of both worlds, methinks.

The reason I don't like /usr as a prefix is because it implies that
the user is working as root.  Some of my scripts do rm -rf's, and
don't do enough error checking to make sure that, somehow, they haven't
ended up in /.  Where's that install cd again?  :^)

But hey, keep in mind that IANAAOT: I am not an authority on this.

A newbie user doesn't know enough to know why working as root is
dangerous, so they should take my advice.  A power user will ignore my
advice anyway.  Either way, I'm covered.

FWIW, I rarely work as root on my own machines, usually only to
flood-ping my co-lo server to see if it's up, and to run up2date.


b.g.
--
Bill Gatliff
bgat@billgatliff.com

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]