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

See the CrossGCC FAQ for lots more infromation.


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

Re: Error: CC not set to working compiler


Kai Ruottu writes:
 >  But people should also know that there are standards (recommendations) for
 > the installation. The defaults for GCC are using one recommendation (/usr/local).

I don't think it's that big a deal.  If there are standards, who cares
whether the CrossGCC FAQ uses some particular standard installation
dir in an example.  [yes, I'm sure some care [though I wonder why].  I don't.]

 >  I assume the sysadmins doing the compiler builds and installs. But when the
 > sysadmin leaves, a 'creative' person may leave behind quite a mess. If the
 > GCC builder just installs the stuff into his/hers own computer, there aren't
 > so much need for any 'default' places... Installing for others and remembering
 > that someone else may need to maintain the system afterwards, includes some
 > responsibility...

Or maybe /usr/local is only writable by root and the user wants to do
the installation himself into some other place.  That is an example of
what I was refering to.

 >  Another cause for a mess is when all GCCs come prebuilt and from different
 > vendors. I could imagine someone trying to install the Symbian EPOC SDK, the
 > Motorola's M.CORE, the Algoritmics MIPS-SDE and some other prebuilt GCC for
 > one's PC and then finding them all using different prefix'es (the vendors
 > had all quite a lot creativity...). For these cases one only wish that there
 > WOULD be a standard for the GCC installations... Normally the GCC-builders
 > are somehow blind and don't remember that there could be a need for other
 > GCCs from other vendors (so they choose some unstandard prefix for their
 > tools).

But any choice is arguably wrong.  Suppose Symbian, Motorola, and Algorithmics
_did_ use /usr/local, _and_ each version of gcc was different [which
no doubt they are].  Now suppose this difference is sufficient that
blindly installing them all on top of each other caused something
to stop working.  The target specific parts can't collide, but the
non-target specific parts CAN.  Whichever the user installed last
is what the user would get, and it won't be what the previously
installed toolchains expected.  Imagine Symbian trying to debug
a user's problem with, I dunno, gcov (*1), and the Algorithmics
toolchain was installed last and something changed in gcov between them.

(*1): If gcov doesn't suit you, pick another.

 >  The 'creative' people probably would want to move the '/bin', 'lib' and 
 > '/usr/lib' stuff to some more nicer places, but some 'evil persons'
 > unfortunately have made it too hard...

As worded, I don't understand this.  Can you elaborate?

 >  The host name in the prefix will be nice when installing 'somewhere in the net',
 > but a home-user doesn't have much use for it. The Cygwin etc. binaries have had
 > it because of the build environment in Cygnus -- the executables perhaps aren't
 > in the right host at all.

As worded, I don't understand the last sentence.  Can you elaborate?

 >  I have seen the "Options for Debugging Your Program or GCC", like the
 > '-print-search-dirs' being totally unknown for quite a lot GCC-owners.
 > Probably even the '--help' will too be unknown (it appeared with egcs and so
 > wasn't available with gcc-2.7.2, which some older Linux'es may still have).
 > 
 >  Teaching these two options in the beginning of any FAQ handling GCC should be
 > obligatory.

I'm sure the CrossGCC FAQ maintainer will accept submissions of this kind ...

 >  And of course reading the "Installation/Cross-Compiler" from the GCC manual
 > should be a prerequisite before opening the embedded oriented Cross-GCC FAQ.
 > When I see a guy trying to use the Cygnus newlib in his Solaris2- or Linux-
 > targeted cross-compiler and not using the target libs and headers, because
 > "the Cross-GCC FAQ said that one must use newlib", I always think there being
 > something wrong with the FAQ...

Oh?  The CrossGCC FAQ has this to say on newlib vs glibc.
[bad formatting due to cut-n-pasting problems]

6.3 Why would I choose glibc over newlib (or vice versa)? 

There are currently two sources for a C library: Glibc and
Newlib. Both have their pluses and minuses. 

Intent

Glibc is the GNU libc maintained by the FSF. It is intended to be a
complete replacement library for native systems. It includes the
routines required by C Standards as well as Posix and other routines. 

Newlib is a collection of software from several sources, and was put
together by Cygnus for embedded systems. It contains the routines
required by the C Standard
as well as a math library and misc. other routines. It is not intended
to be a complete replacement library for Unix systems (however, newlib
is the native library for
go32 and cygwin32 systems). 

Licensing

Glibc is covered by the LGPL (the GNU Library General Public
License). Newlib is a collection of software from several sources,
each with their own copyrights,
but basically it's a Berkeley style copyright. 

Resource Utilization

Glibc, being intended for native Unix environments, does not need to
worry about memory usage as much. It is designed to work most
efficiently in
demand-page-loaded shared library situations. Newlib, being intended
for embedded systems, does worry about memory usage (and is more
memory-efficient than
glibc). 

[N.B. As always, I'm sure the FAQ maintainer would gladly accept
enhancements to this or error corrections ...]

------
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]