http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56475
Bug #: 56475
Summary: Incorrect result of configure test for /dev/random
(_GLIBCXX_USE_RANDOM_TR1) for MinGW platform (and
others?)
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: [email protected]
ReportedBy: [email protected]
Host: mingw32
Target: mingw32, mingw32-w64
When building native compiler for MinGW/MinGW-w64 'configure' checks for
/dev/random simply by
if test -r /dev/random && test -r /dev/urandom; then
glibcxx_cv_random_tr1=yes;
else
glibcxx_cv_random_tr1=no;
fi
Result of this test is incorrect at least for MinGW. MinGW shell is executed in
MSYS subsystem, so those devices is available for shell, but MinGW compiled
programs will have no access to /dev/random.
For some other platforms situation can be the same (/dev/random available for
shell, but not for compiled program).
I suggest to do a real compile-link-execute test instead of weak shell
emulation.