summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/mkmf.rb1
2 files changed, 6 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index d9a82fadcb..a259f9ec5c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Feb 15 18:24:48 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * lib/mkmf.rb (MakeMakefile#try_run): bail out explicitly if cross
+ compiling, because it cannot work of course.
+
Fri Feb 15 12:34:58 2013 Tanaka Akira <akr@fsij.org>
* ext/socket/extconf.rb: test struct sockaddr_storage directly.
diff --git a/lib/mkmf.rb b/lib/mkmf.rb
index 4b6c52e3f5..a8f3143dec 100644
--- a/lib/mkmf.rb
+++ b/lib/mkmf.rb
@@ -811,6 +811,7 @@ SRC
# Returns true when the executable exits successfully, false when it fails,
# or nil when preprocessing, compilation or link fails.
def try_run(src, opt = "", &b)
+ raise "cannot run test program while cross compiling" if CROSS_COMPILING
if try_link0(src, opt, &b)
xsystem("./conftest")
else