Backport #654 from trunk: 1.1
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat May 31 16:46:45 2008 +0000 (2008-05-31)
branch1.1
changeset 54056f03a07597a
parent 537 be311cf821ed
child 585 d2e5dc1b341c
Backport #654 from trunk:
Add a security patch for MPFR-2.3.1.

needed to complete #657 from trunk (already backported as #658):
Build a thread-safe MPFR library.
patches/mpfr/2.3.1/100-thread-safe-configure.patch
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/mpfr/2.3.1/100-thread-safe-configure.patch	Sat May 31 16:46:45 2008 +0000
     1.3 @@ -0,0 +1,209 @@
     1.4 +diff -Naurd mpfr-2.3.1-a/acinclude.m4 mpfr-2.3.1-b/acinclude.m4
     1.5 +--- mpfr-2.3.1-a/acinclude.m4	2008-01-23 13:36:46.000000000 +0000
     1.6 ++++ mpfr-2.3.1-b/acinclude.m4	2008-01-23 13:36:46.000000000 +0000
     1.7 +@@ -286,6 +286,9 @@
     1.8 + dnl    important to run the test below.
     1.9 + if test "$enable_thread_safe" = yes; then
    1.10 + AC_CACHE_CHECK([for TLS support], mpfr_cv_working_tls, [
    1.11 ++saved_CPPFLAGS="$CPPFLAGS"
    1.12 ++# The -I$srcdir is necessary when objdir is different from srcdir.
    1.13 ++CPPFLAGS="$CPPFLAGS -I$srcdir"
    1.14 + AC_RUN_IFELSE([
    1.15 + #define MPFR_USE_THREAD_SAFE 1
    1.16 + #include "mpfr-thread.h"
    1.17 +@@ -297,6 +300,7 @@
    1.18 +      [AC_MSG_RESULT(no)
    1.19 +       AC_MSG_ERROR([please configure with --disable-thread-safe])],
    1.20 +      [mpfr_cv_working_tls="cannot test, assume yes"])
    1.21 ++CPPFLAGS="$saved_CPPFLAGS"
    1.22 + ])
    1.23 + fi
    1.24 + ])
    1.25 +diff -Naurd mpfr-2.3.1-a/configure mpfr-2.3.1-b/configure
    1.26 +--- mpfr-2.3.1-a/configure	2008-01-29 08:51:07.000000000 +0000
    1.27 ++++ mpfr-2.3.1-b/configure	2008-05-10 23:49:37.000000000 +0000
    1.28 +@@ -7528,6 +7528,9 @@
    1.29 +   echo $ECHO_N "(cached) $ECHO_C" >&6
    1.30 + else
    1.31 + 
    1.32 ++saved_CPPFLAGS="$CPPFLAGS"
    1.33 ++# The -I$srcdir is necessary when objdir is different from srcdir.
    1.34 ++CPPFLAGS="$CPPFLAGS -I$srcdir"
    1.35 + if test "$cross_compiling" = yes; then
    1.36 +   mpfr_cv_working_tls="cannot test, assume yes"
    1.37 + else
    1.38 +@@ -7578,6 +7581,7 @@
    1.39 + fi
    1.40 + 
    1.41 + 
    1.42 ++CPPFLAGS="$saved_CPPFLAGS"
    1.43 + 
    1.44 + fi
    1.45 + { echo "$as_me:$LINENO: result: $mpfr_cv_working_tls" >&5
    1.46 +@@ -9278,7 +9282,7 @@
    1.47 +   ;;
    1.48 + *-*-irix6*)
    1.49 +   # Find out which ABI we are using.
    1.50 +-  echo '#line 9281 "configure"' > conftest.$ac_ext
    1.51 ++  echo '#line 9285 "configure"' > conftest.$ac_ext
    1.52 +   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    1.53 +   (eval $ac_compile) 2>&5
    1.54 +   ac_status=$?
    1.55 +@@ -11103,11 +11107,11 @@
    1.56 +    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    1.57 +    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1.58 +    -e 's:$: $lt_compiler_flag:'`
    1.59 +-   (eval echo "\"\$as_me:11106: $lt_compile\"" >&5)
    1.60 ++   (eval echo "\"\$as_me:11110: $lt_compile\"" >&5)
    1.61 +    (eval "$lt_compile" 2>conftest.err)
    1.62 +    ac_status=$?
    1.63 +    cat conftest.err >&5
    1.64 +-   echo "$as_me:11110: \$? = $ac_status" >&5
    1.65 ++   echo "$as_me:11114: \$? = $ac_status" >&5
    1.66 +    if (exit $ac_status) && test -s "$ac_outfile"; then
    1.67 +      # The compiler can only warn and ignore the option if not recognized
    1.68 +      # So say no if there are warnings other than the usual output.
    1.69 +@@ -11393,11 +11397,11 @@
    1.70 +    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    1.71 +    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1.72 +    -e 's:$: $lt_compiler_flag:'`
    1.73 +-   (eval echo "\"\$as_me:11396: $lt_compile\"" >&5)
    1.74 ++   (eval echo "\"\$as_me:11400: $lt_compile\"" >&5)
    1.75 +    (eval "$lt_compile" 2>conftest.err)
    1.76 +    ac_status=$?
    1.77 +    cat conftest.err >&5
    1.78 +-   echo "$as_me:11400: \$? = $ac_status" >&5
    1.79 ++   echo "$as_me:11404: \$? = $ac_status" >&5
    1.80 +    if (exit $ac_status) && test -s "$ac_outfile"; then
    1.81 +      # The compiler can only warn and ignore the option if not recognized
    1.82 +      # So say no if there are warnings other than the usual output.
    1.83 +@@ -11497,11 +11501,11 @@
    1.84 +    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    1.85 +    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    1.86 +    -e 's:$: $lt_compiler_flag:'`
    1.87 +-   (eval echo "\"\$as_me:11500: $lt_compile\"" >&5)
    1.88 ++   (eval echo "\"\$as_me:11504: $lt_compile\"" >&5)
    1.89 +    (eval "$lt_compile" 2>out/conftest.err)
    1.90 +    ac_status=$?
    1.91 +    cat out/conftest.err >&5
    1.92 +-   echo "$as_me:11504: \$? = $ac_status" >&5
    1.93 ++   echo "$as_me:11508: \$? = $ac_status" >&5
    1.94 +    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    1.95 +    then
    1.96 +      # The compiler can only warn and ignore the option if not recognized
    1.97 +@@ -13859,7 +13863,7 @@
    1.98 +   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    1.99 +   lt_status=$lt_dlunknown
   1.100 +   cat > conftest.$ac_ext <<EOF
   1.101 +-#line 13862 "configure"
   1.102 ++#line 13866 "configure"
   1.103 + #include "confdefs.h"
   1.104 + 
   1.105 + #if HAVE_DLFCN_H
   1.106 +@@ -13959,7 +13963,7 @@
   1.107 +   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   1.108 +   lt_status=$lt_dlunknown
   1.109 +   cat > conftest.$ac_ext <<EOF
   1.110 +-#line 13962 "configure"
   1.111 ++#line 13966 "configure"
   1.112 + #include "confdefs.h"
   1.113 + 
   1.114 + #if HAVE_DLFCN_H
   1.115 +@@ -16379,11 +16383,11 @@
   1.116 +    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   1.117 +    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   1.118 +    -e 's:$: $lt_compiler_flag:'`
   1.119 +-   (eval echo "\"\$as_me:16382: $lt_compile\"" >&5)
   1.120 ++   (eval echo "\"\$as_me:16386: $lt_compile\"" >&5)
   1.121 +    (eval "$lt_compile" 2>conftest.err)
   1.122 +    ac_status=$?
   1.123 +    cat conftest.err >&5
   1.124 +-   echo "$as_me:16386: \$? = $ac_status" >&5
   1.125 ++   echo "$as_me:16390: \$? = $ac_status" >&5
   1.126 +    if (exit $ac_status) && test -s "$ac_outfile"; then
   1.127 +      # The compiler can only warn and ignore the option if not recognized
   1.128 +      # So say no if there are warnings other than the usual output.
   1.129 +@@ -16483,11 +16487,11 @@
   1.130 +    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   1.131 +    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   1.132 +    -e 's:$: $lt_compiler_flag:'`
   1.133 +-   (eval echo "\"\$as_me:16486: $lt_compile\"" >&5)
   1.134 ++   (eval echo "\"\$as_me:16490: $lt_compile\"" >&5)
   1.135 +    (eval "$lt_compile" 2>out/conftest.err)
   1.136 +    ac_status=$?
   1.137 +    cat out/conftest.err >&5
   1.138 +-   echo "$as_me:16490: \$? = $ac_status" >&5
   1.139 ++   echo "$as_me:16494: \$? = $ac_status" >&5
   1.140 +    if (exit $ac_status) && test -s out/conftest2.$ac_objext
   1.141 +    then
   1.142 +      # The compiler can only warn and ignore the option if not recognized
   1.143 +@@ -18060,11 +18064,11 @@
   1.144 +    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   1.145 +    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   1.146 +    -e 's:$: $lt_compiler_flag:'`
   1.147 +-   (eval echo "\"\$as_me:18063: $lt_compile\"" >&5)
   1.148 ++   (eval echo "\"\$as_me:18067: $lt_compile\"" >&5)
   1.149 +    (eval "$lt_compile" 2>conftest.err)
   1.150 +    ac_status=$?
   1.151 +    cat conftest.err >&5
   1.152 +-   echo "$as_me:18067: \$? = $ac_status" >&5
   1.153 ++   echo "$as_me:18071: \$? = $ac_status" >&5
   1.154 +    if (exit $ac_status) && test -s "$ac_outfile"; then
   1.155 +      # The compiler can only warn and ignore the option if not recognized
   1.156 +      # So say no if there are warnings other than the usual output.
   1.157 +@@ -18164,11 +18168,11 @@
   1.158 +    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   1.159 +    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   1.160 +    -e 's:$: $lt_compiler_flag:'`
   1.161 +-   (eval echo "\"\$as_me:18167: $lt_compile\"" >&5)
   1.162 ++   (eval echo "\"\$as_me:18171: $lt_compile\"" >&5)
   1.163 +    (eval "$lt_compile" 2>out/conftest.err)
   1.164 +    ac_status=$?
   1.165 +    cat out/conftest.err >&5
   1.166 +-   echo "$as_me:18171: \$? = $ac_status" >&5
   1.167 ++   echo "$as_me:18175: \$? = $ac_status" >&5
   1.168 +    if (exit $ac_status) && test -s out/conftest2.$ac_objext
   1.169 +    then
   1.170 +      # The compiler can only warn and ignore the option if not recognized
   1.171 +@@ -20364,11 +20368,11 @@
   1.172 +    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   1.173 +    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   1.174 +    -e 's:$: $lt_compiler_flag:'`
   1.175 +-   (eval echo "\"\$as_me:20367: $lt_compile\"" >&5)
   1.176 ++   (eval echo "\"\$as_me:20371: $lt_compile\"" >&5)
   1.177 +    (eval "$lt_compile" 2>conftest.err)
   1.178 +    ac_status=$?
   1.179 +    cat conftest.err >&5
   1.180 +-   echo "$as_me:20371: \$? = $ac_status" >&5
   1.181 ++   echo "$as_me:20375: \$? = $ac_status" >&5
   1.182 +    if (exit $ac_status) && test -s "$ac_outfile"; then
   1.183 +      # The compiler can only warn and ignore the option if not recognized
   1.184 +      # So say no if there are warnings other than the usual output.
   1.185 +@@ -20654,11 +20658,11 @@
   1.186 +    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   1.187 +    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   1.188 +    -e 's:$: $lt_compiler_flag:'`
   1.189 +-   (eval echo "\"\$as_me:20657: $lt_compile\"" >&5)
   1.190 ++   (eval echo "\"\$as_me:20661: $lt_compile\"" >&5)
   1.191 +    (eval "$lt_compile" 2>conftest.err)
   1.192 +    ac_status=$?
   1.193 +    cat conftest.err >&5
   1.194 +-   echo "$as_me:20661: \$? = $ac_status" >&5
   1.195 ++   echo "$as_me:20665: \$? = $ac_status" >&5
   1.196 +    if (exit $ac_status) && test -s "$ac_outfile"; then
   1.197 +      # The compiler can only warn and ignore the option if not recognized
   1.198 +      # So say no if there are warnings other than the usual output.
   1.199 +@@ -20758,11 +20762,11 @@
   1.200 +    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   1.201 +    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   1.202 +    -e 's:$: $lt_compiler_flag:'`
   1.203 +-   (eval echo "\"\$as_me:20761: $lt_compile\"" >&5)
   1.204 ++   (eval echo "\"\$as_me:20765: $lt_compile\"" >&5)
   1.205 +    (eval "$lt_compile" 2>out/conftest.err)
   1.206 +    ac_status=$?
   1.207 +    cat out/conftest.err >&5
   1.208 +-   echo "$as_me:20765: \$? = $ac_status" >&5
   1.209 ++   echo "$as_me:20769: \$? = $ac_status" >&5
   1.210 +    if (exit $ac_status) && test -s out/conftest2.$ac_objext
   1.211 +    then
   1.212 +      # The compiler can only warn and ignore the option if not recognized