~ubuntu-branches/ubuntu/raring/tcl8.5/raring

« back to all changes in this revision

Viewing changes to debian/patches/tclstackcheck.diff

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2011-05-01 16:00:58 UTC
  • Revision ID: james.westby@ubuntu.com-20110501160058-rrnpaic7dqq4qz5o
Tags: 8.5.9-2ubuntu1
Fix stack grow check. Closes: #617628. LP: #765916.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--- tcl8.5-8.5.9.orig/unix/configure.in
 
2
+++ tcl8.5-8.5.9/unix/configure.in
 
3
@@ -703,6 +703,8 @@
 
4
 #  Does the C stack grow upwards or downwards? Or cross-compiling?
 
5
 #--------------------------------------------------------------------
 
6
 
 
7
+hold_cflags=$CFLAGS
 
8
+CFLAGS="$CFLAGS -O0"
 
9
 AC_CACHE_CHECK([if the C stack grows upwards in memory], tcl_cv_stack_grows_up, [
 
10
     AC_TRY_RUN([
 
11
        int StackGrowsUp(int *parent) {
 
12
@@ -715,6 +717,7 @@
 
13
        }
 
14
     ], tcl_cv_stack_grows_up=yes, tcl_cv_stack_grows_up=no,
 
15
     tcl_cv_stack_grows_up=unknown)])
 
16
+CFLAGS=$hold_cflags
 
17
 if test $tcl_cv_stack_grows_up = unknown; then
 
18
     AC_DEFINE(TCL_CROSS_COMPILE, 1, [Are we cross-compiling?])
 
19
 elif test $tcl_cv_stack_grows_up = yes; then
 
20
--- tcl8.5-8.5.9.orig/unix/configure
 
21
+++ tcl8.5-8.5.9/unix/configure
 
22
@@ -18660,6 +18660,8 @@
 
23
 #  Does the C stack grow upwards or downwards? Or cross-compiling?
 
24
 #--------------------------------------------------------------------
 
25
 
 
26
+hold_CFLAGS=$CFLAGS
 
27
+CFLAGS="$CFLAGS -O0"
 
28
 echo "$as_me:$LINENO: checking if the C stack grows upwards in memory" >&5
 
29
 echo $ECHO_N "checking if the C stack grows upwards in memory... $ECHO_C" >&6
 
30
 if test "${tcl_cv_stack_grows_up+set}" = set; then
 
31
@@ -18711,6 +18713,7 @@
 
32
 fi
 
33
 echo "$as_me:$LINENO: result: $tcl_cv_stack_grows_up" >&5
 
34
 echo "${ECHO_T}$tcl_cv_stack_grows_up" >&6
 
35
+CFLAGS=$hold_CFLAGS
 
36
 if test $tcl_cv_stack_grows_up = unknown; then
 
37
 
 
38
 cat >>confdefs.h <<\_ACEOF