On Tue, 27 Nov 2007, Mark Mitchell wrote:

> Yes, that makes sense to me.  Bare metal systems are of course somewhat
> different.  What do you think about that?

I think it's well established that at least some bare-metal systems 
default to not linking with any particular start-files (etc.).

> > If only static libraries are being built, it may be possible to build them 
> > without linking, and in such cases it may be possible to define a generic 
> > set of libc symbols considered to be present, as libstdc++-v3/configure.ac 
> > does with newlib.
> 
> Do you understand how MIPS/Power works?  I'd really like to know what
> the difference is.  It might be an easy difference to resolve, or there
> might be something more fundamental, but before we do anything I'd like
> to know why one works and the other doesn't.

* They only build static libstdc++.

* --with-newlib is used, either explicitly or implicitly if newlib is 
built in a combined tree.  (I do not know if it works with --with-newlib 
is not used and it's not a combined tree.)

* configure.ac then checks for --with-newlib and handles it specially by 
hardcoding information about the functions present.

* With --disable-shared, GLIBCXX_ENABLE_SYMVERS disables symbol versioning 
instead of trying to do certain link tests it would do if shared libraries 
are being built; it also does so if unable to link.

* Each other configure test that might wish to link also needs special 
handling or to be appropriately conditional.

* Such special handling is also needed in other target libraries that 
support bare-metal systems (some libraries such as libgomp and libmudflap 
may well not do so at all).


So make sure the build is using --disable-shared if you can't link; if 
that still doesn't help, some configure test somewhere may need disabling, 
either if unable to link, or if not building shared libraries, or some 
other condition.

-- 
Joseph S. Myers
[EMAIL PROTECTED]

Reply via email to