This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/56475] Incorrect result of configure test for /dev/random (_GLIBCXX_USE_RANDOM_TR1) for MinGW platform (and others?)
- From: "ktietz at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 27 Feb 2013 19:45:53 +0000
- Subject: [Bug libstdc++/56475] Incorrect result of configure test for /dev/random (_GLIBCXX_USE_RANDOM_TR1) for MinGW platform (and others?)
- Auto-submitted: auto-generated
- References: <bug-56475-4@http.gcc.gnu.org/bugzilla/>
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.