diff options
Diffstat (limited to 'patches/Python-2.6.2/0005-use-AC_COMPILE_IFELSE-rather-than-AC_TRY_RUN.patch')
-rw-r--r-- | patches/Python-2.6.2/0005-use-AC_COMPILE_IFELSE-rather-than-AC_TRY_RUN.patch | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/patches/Python-2.6.2/0005-use-AC_COMPILE_IFELSE-rather-than-AC_TRY_RUN.patch b/patches/Python-2.6.2/0005-use-AC_COMPILE_IFELSE-rather-than-AC_TRY_RUN.patch new file mode 100644 index 000000000..d760c76d6 --- /dev/null +++ b/patches/Python-2.6.2/0005-use-AC_COMPILE_IFELSE-rather-than-AC_TRY_RUN.patch @@ -0,0 +1,75 @@ +From b03b879f2f107c3f0e55720b31fc87fb02ec2884 Mon Sep 17 00:00:00 2001 +From: Marc Kleine-Budde <mkl@pengutronix.de> +Date: Fri, 24 Apr 2009 18:35:19 +0200 +Subject: [PATCH] use AC_COMPILE_IFELSE rather than AC_TRY_RUN + +AC_TRY_RUN relys on executing the test, not working while cross +compiling. Thus a hard wired value for the cross compilation must and is +used. + +Switching to AC_COMPILE_IFELSE just tries to compile the test program +which has the save effect and works even in the cross compiling +scenario. + +This patch uses AC_COMPILE_IFELSE for these tests: +"--enable-profiling, enable C-level code profiling" +"whether $CC accepts -fno-strict-aliasing" +"whether $CC accepts -OPT:Olimit=0" +"whether $CC accepts -Olimit 1500" + +Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> +--- + configure.in | 12 ++++-------- + 1 files changed, 4 insertions(+), 8 deletions(-) + +diff --git a/configure.in b/configure.in +index b86ee74..e86b2ba 100644 +--- a/configure.in ++++ b/configure.in +@@ -658,9 +658,8 @@ AC_ARG_ENABLE(profiling, + AC_HELP_STRING(--enable-profiling, enable C-level code profiling), + [ac_save_cc="$CC" + CC="$CC -pg" +- AC_TRY_RUN([int main() { return 0; }], ++ AC_COMPILE_IFELSE([int main() { return 0; }], + ac_enable_profiling="yes", +- ac_enable_profiling="no", + ac_enable_profiling="no") + CC="$ac_save_cc"]) + AC_MSG_RESULT($ac_enable_profiling) +@@ -883,9 +882,8 @@ yes) + AC_MSG_CHECKING(whether $CC accepts -fno-strict-aliasing) + ac_save_cc="$CC" + CC="$CC -fno-strict-aliasing" +- AC_TRY_RUN([int main() { return 0; }], ++ AC_COMPILE_IFELSE([int main() { return 0; }], + ac_cv_no_strict_aliasing_ok=yes, +- ac_cv_no_strict_aliasing_ok=no, + ac_cv_no_strict_aliasing_ok=no) + CC="$ac_save_cc" + AC_MSG_RESULT($ac_cv_no_strict_aliasing_ok) +@@ -1004,9 +1002,8 @@ AC_MSG_CHECKING(whether $CC accepts -OPT:Olimit=0) + AC_CACHE_VAL(ac_cv_opt_olimit_ok, + [ac_save_cc="$CC" + CC="$CC -OPT:Olimit=0" +-AC_TRY_RUN([int main() { return 0; }], ++AC_COMPILE_IFELSE([int main() { return 0; }], + ac_cv_opt_olimit_ok=yes, +- ac_cv_opt_olimit_ok=no, + ac_cv_opt_olimit_ok=no) + CC="$ac_save_cc"]) + AC_MSG_RESULT($ac_cv_opt_olimit_ok) +@@ -1026,9 +1023,8 @@ else + AC_CACHE_VAL(ac_cv_olimit_ok, + [ac_save_cc="$CC" + CC="$CC -Olimit 1500" +- AC_TRY_RUN([int main() { return 0; }], ++ AC_COMPILE_IFELSE([int main() { return 0; }], + ac_cv_olimit_ok=yes, +- ac_cv_olimit_ok=no, + ac_cv_olimit_ok=no) + CC="$ac_save_cc"]) + AC_MSG_RESULT($ac_cv_olimit_ok) +-- +1.5.6.3 + |