[v3] Fix / clean-up config vs crosses (5/n): avoid a TRY_RUN

Mark Mitchell mark@codesourcery.com
Mon Aug 25 17:28:00 GMT 2008


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).
A2. If you like, provide a configure option to override the default.

or:

B. Test at run-time, the first time you want to use the special file.

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713



More information about the Libstdc++ mailing list