This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Version 1.126 of libstdc++-v3/ broke pre-installednewlib builds

On Wed, 4 Jun 2003, Benjamin Kosnik wrote:
> >Suggestion for a fix?  What was wrong with assuming newlib for
> >the default case of a cross-build (as in not matched by the
> >other cases in that switch-statement)?  The PR doesn't seem to
> >be opposed to that.
> What about this part:
> Additionally, when --with-cross-host is defined, libstdc++-v3 assumes
> that unless you declare the target as *-*-linux* you are using newlib
> and overrides...

That part isn't really correct (there are other non-newlib
matches besides *-*-linux*) but your point is taken, sorry about
the blindness.

> >matching *-*-elf*.  Or if these simple solutions aren't to
> >taste, I could cook up an autoconf test for an installed newlib.
> Can't you just configure --with-newlib?

You don't want to fix what you broke?  Requiring --with-newlib
means unsupporting pre-installed newlib, because --with-newlib
means compiling newlib from the source tree.

> What does libiberty do?

Don't you have the source there? ;-}  Hint: it doesn't fail
without --with-newlib.  It *does* check with_newlib, but only to
provide fallbacks in case AC_REPLACE_FUNCS doesn't work, which
it does since libraries and startup files are installed.

Ah, that seems a vital clue: if there's no better match than
*-*-* and $with_newlib != yes, then require that programs can be
linked, i.e. that standard autoconf functions can be used, like
in the case for libiberty (but not libstdc++), AC_REPLACE_FUNCS.

> I'm not quite sure what to do, and kind of think
> that the current configure is mostly correct (but there should be a way
> for you to get a cross compiler with an installed newlib working. (Maybe
> --with-sysroot=foo would work.)
> It would be nice if libiberty and libstdc++ did the same thing, wouldn't
> it?

Well, they have slightly different requirements.  But I give you
that: libstdc++ shouldn't break with pre-installed newlib, since
libiberty doesn't. ;-)  (And libiberty has the clue, require
linkability then).

brgds, H-P

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