[Bug libstdc++/56475] Incorrect result of configure test for /dev/random (_GLIBCXX_USE_RANDOM_TR1) for MinGW platform (and others?)
ktietz at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 27 19:46:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56475
--- Comment #3 from Kai Tietz <ktietz at gcc dot gnu.org> 2013-02-27 19:45:53 UTC ---
(In reply to comment #1)
> We had an AC_TRY_RUN test, but such kind of test give a lot of problems and we
> removed it. We had:
>
> AC_TRY_RUN([#include <stdio.h>
> int main()
> {
> return !(fopen("/dev/random", "r")
> && fopen("/dev/urandom", "r"));
> }
> ],
> [ac_random_tr1=yes], [ac_random_tr1=no],
> [ac_random_tr1=no])
> ])
>
> Kai, can you suggest something working on MinGW and not using an AC_TRY_RUN? Or
> you can just special case MinGW. I have no way of testing such fixes, sorry.
Well, AC_TRY_RUN is for sure the wrong approach here. As such tests are
failing badly on cross-compilers.
I think sanest way to solve this is by special-casing mingw targets.
More information about the Gcc-bugs
mailing list