unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* [Patch] Fix configure test for __libc_stack_end
@ 2003-06-18  9:18 Matthias Koeppe
  2003-07-27 14:03 ` Marius Vollmer
  0 siblings, 1 reply; 2+ messages in thread
From: Matthias Koeppe @ 2003-06-18  9:18 UTC (permalink / raw)


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


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-07-27 14:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-18  9:18 [Patch] Fix configure test for __libc_stack_end Matthias Koeppe
2003-07-27 14:03 ` Marius Vollmer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).