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


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


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