[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Patch] Fix configure test for __libc_stack_end
From: |
Matthias Koeppe |
Subject: |
[Patch] Fix configure test for __libc_stack_end |
Date: |
Wed, 18 Jun 2003 11:18:08 +0200 |
The test for `guile_cv_have_libc_stack_end' does not work reliably
because the compiler can optimize away the use of the variable in the
test program. This happened to me on Solaris with the Sun Forte C
compiler.
Here is a patch.
--- configure.in.~1.220.~ Mon Jun 16 16:49:24 2003
+++ configure.in Wed Jun 18 10:49:17 2003
@@ -603,8 +603,9 @@
AC_MSG_CHECKING(for __libc_stack_end)
AC_CACHE_VAL(guile_cv_have_libc_stack_end,
-[AC_TRY_LINK([extern char *__libc_stack_end;],
- [char *p = __libc_stack_end;],
+[AC_TRY_LINK([#include <stdio.h>
+extern char *__libc_stack_end;],
+ [printf("%s", (char*) __libc_stack_end);],
guile_cv_have_libc_stack_end=yes,
guile_cv_have_libc_stack_end=no)])
AC_MSG_RESULT($guile_cv_have_libc_stack_end)
--
Matthias Koeppe -- http://www.math.uni-magdeburg.de/~mkoeppe
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Patch] Fix configure test for __libc_stack_end,
Matthias Koeppe <=