This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: [v3] Fix / clean-up config vs crosses (5/n): avoid a TRY_RUN


On Mon, 25 Aug 2008, Mark Mitchell wrote:

> Paolo Carlini wrote:
> > HI Mark,
> >> checking a property of the build machine, unrelated to the target
> >> machine?
> >>   
> > Right. That kind of consideration led me to **not** move it outside the
> > IS_NATIVE block, where I introduced it originally. Can be considered in
> > that case approximately correct? Or we need something entirely different?
> 
> We need something different.  The current mechanism (test -r) means that
> a cross to (say) x86 GNU/Linux may yield different results than a native
> build, since in the cross case the answer (whatever it is) will be
> determined in some different way.  That's exactly the situation we need
> to avoid.  To a first approximation, as long as there are IS_NATIVE
> checks, we've not yet solved the cross-compilation problem.
> 
> I would suggest either:
> 
> A1. Hard-code the answer based on the target OS (e.g., GNU/Linux has
> /dev/urandom).

The cross case already hardcodes the result of this particular configure 
test for GNU/Linux targets, since:

2008-06-06  Joseph Myers  <joseph@codesourcery.com>

        * configure.ac: Do not check for gconv.h.
        * crossconfig.m4 (GLIBCXX_CROSSCONFIG): Do not test for gconv.h or
        gconf.h.  For glibc and uClibc systems, define
        _GLIBCXX_USE_RANDOM_TR1 and HAVE_MMAP and use AC_LC_MESSAGES and
        AM_ICONV.
        * configure, config.h.in: Regenerate.

-- 
Joseph S. Myers
joseph@codesourcery.com


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