patches/mpfr/2.3.1/100-thread-safe-configure.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Jul 17 17:54:21 2011 +0200 (2011-07-17)
changeset 2888 dd71df95903a
permissions -rw-r--r--
cc/gcc: pass the companion libs prefix to cc_core

In case of canadian-cross, the companion libraries are not the same for
the core cc (they run on 'build') as they are for the final cc (they run
on 'host').

Prepare for this differentiation (coming later), while retaining the
current behavior (to use the same compblibs).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     1 diff -Naurd mpfr-2.3.1-a/acinclude.m4 mpfr-2.3.1-b/acinclude.m4
     2 --- mpfr-2.3.1-a/acinclude.m4	2008-01-23 13:36:46.000000000 +0000
     3 +++ mpfr-2.3.1-b/acinclude.m4	2008-01-23 13:36:46.000000000 +0000
     4 @@ -286,6 +286,9 @@
     5  dnl    important to run the test below.
     6  if test "$enable_thread_safe" = yes; then
     7  AC_CACHE_CHECK([for TLS support], mpfr_cv_working_tls, [
     8 +saved_CPPFLAGS="$CPPFLAGS"
     9 +# The -I$srcdir is necessary when objdir is different from srcdir.
    10 +CPPFLAGS="$CPPFLAGS -I$srcdir"
    11  AC_RUN_IFELSE([
    12  #define MPFR_USE_THREAD_SAFE 1
    13  #include "mpfr-thread.h"
    14 @@ -297,6 +300,7 @@
    15       [AC_MSG_RESULT(no)
    16        AC_MSG_ERROR([please configure with --disable-thread-safe])],
    17       [mpfr_cv_working_tls="cannot test, assume yes"])
    18 +CPPFLAGS="$saved_CPPFLAGS"
    19  ])
    20  fi
    21  ])
    22 diff -Naurd mpfr-2.3.1-a/configure mpfr-2.3.1-b/configure
    23 --- mpfr-2.3.1-a/configure	2008-01-29 08:51:07.000000000 +0000
    24 +++ mpfr-2.3.1-b/configure	2008-05-10 23:49:37.000000000 +0000
    25 @@ -7528,6 +7528,9 @@
    26    echo $ECHO_N "(cached) $ECHO_C" >&6
    27  else
    28  
    29 +saved_CPPFLAGS="$CPPFLAGS"
    30 +# The -I$srcdir is necessary when objdir is different from srcdir.
    31 +CPPFLAGS="$CPPFLAGS -I$srcdir"
    32  if test "$cross_compiling" = yes; then
    33    mpfr_cv_working_tls="cannot test, assume yes"
    34  else
    35 @@ -7578,6 +7581,7 @@
    36  fi
    37  
    38  
    39 +CPPFLAGS="$saved_CPPFLAGS"
    40  
    41  fi
    42  { echo "$as_me:$LINENO: result: $mpfr_cv_working_tls" >&5
    43 @@ -9278,7 +9282,7 @@
    44    ;;
    45  *-*-irix6*)
    46    # Find out which ABI we are using.
    47 -  echo '#line 9281 "configure"' > conftest.$ac_ext
    48 +  echo '#line 9285 "configure"' > conftest.$ac_ext
    49    if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
    50    (eval $ac_compile) 2>&5
    51    ac_status=$?
    52 @@ -11103,11 +11107,11 @@
    53     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    54     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    55     -e 's:$: $lt_compiler_flag:'`
    56 -   (eval echo "\"\$as_me:11106: $lt_compile\"" >&5)
    57 +   (eval echo "\"\$as_me:11110: $lt_compile\"" >&5)
    58     (eval "$lt_compile" 2>conftest.err)
    59     ac_status=$?
    60     cat conftest.err >&5
    61 -   echo "$as_me:11110: \$? = $ac_status" >&5
    62 +   echo "$as_me:11114: \$? = $ac_status" >&5
    63     if (exit $ac_status) && test -s "$ac_outfile"; then
    64       # The compiler can only warn and ignore the option if not recognized
    65       # So say no if there are warnings other than the usual output.
    66 @@ -11393,11 +11397,11 @@
    67     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    68     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    69     -e 's:$: $lt_compiler_flag:'`
    70 -   (eval echo "\"\$as_me:11396: $lt_compile\"" >&5)
    71 +   (eval echo "\"\$as_me:11400: $lt_compile\"" >&5)
    72     (eval "$lt_compile" 2>conftest.err)
    73     ac_status=$?
    74     cat conftest.err >&5
    75 -   echo "$as_me:11400: \$? = $ac_status" >&5
    76 +   echo "$as_me:11404: \$? = $ac_status" >&5
    77     if (exit $ac_status) && test -s "$ac_outfile"; then
    78       # The compiler can only warn and ignore the option if not recognized
    79       # So say no if there are warnings other than the usual output.
    80 @@ -11497,11 +11501,11 @@
    81     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    82     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    83     -e 's:$: $lt_compiler_flag:'`
    84 -   (eval echo "\"\$as_me:11500: $lt_compile\"" >&5)
    85 +   (eval echo "\"\$as_me:11504: $lt_compile\"" >&5)
    86     (eval "$lt_compile" 2>out/conftest.err)
    87     ac_status=$?
    88     cat out/conftest.err >&5
    89 -   echo "$as_me:11504: \$? = $ac_status" >&5
    90 +   echo "$as_me:11508: \$? = $ac_status" >&5
    91     if (exit $ac_status) && test -s out/conftest2.$ac_objext
    92     then
    93       # The compiler can only warn and ignore the option if not recognized
    94 @@ -13859,7 +13863,7 @@
    95    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
    96    lt_status=$lt_dlunknown
    97    cat > conftest.$ac_ext <<EOF
    98 -#line 13862 "configure"
    99 +#line 13866 "configure"
   100  #include "confdefs.h"
   101  
   102  #if HAVE_DLFCN_H
   103 @@ -13959,7 +13963,7 @@
   104    lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   105    lt_status=$lt_dlunknown
   106    cat > conftest.$ac_ext <<EOF
   107 -#line 13962 "configure"
   108 +#line 13966 "configure"
   109  #include "confdefs.h"
   110  
   111  #if HAVE_DLFCN_H
   112 @@ -16379,11 +16383,11 @@
   113     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   114     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   115     -e 's:$: $lt_compiler_flag:'`
   116 -   (eval echo "\"\$as_me:16382: $lt_compile\"" >&5)
   117 +   (eval echo "\"\$as_me:16386: $lt_compile\"" >&5)
   118     (eval "$lt_compile" 2>conftest.err)
   119     ac_status=$?
   120     cat conftest.err >&5
   121 -   echo "$as_me:16386: \$? = $ac_status" >&5
   122 +   echo "$as_me:16390: \$? = $ac_status" >&5
   123     if (exit $ac_status) && test -s "$ac_outfile"; then
   124       # The compiler can only warn and ignore the option if not recognized
   125       # So say no if there are warnings other than the usual output.
   126 @@ -16483,11 +16487,11 @@
   127     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   128     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   129     -e 's:$: $lt_compiler_flag:'`
   130 -   (eval echo "\"\$as_me:16486: $lt_compile\"" >&5)
   131 +   (eval echo "\"\$as_me:16490: $lt_compile\"" >&5)
   132     (eval "$lt_compile" 2>out/conftest.err)
   133     ac_status=$?
   134     cat out/conftest.err >&5
   135 -   echo "$as_me:16490: \$? = $ac_status" >&5
   136 +   echo "$as_me:16494: \$? = $ac_status" >&5
   137     if (exit $ac_status) && test -s out/conftest2.$ac_objext
   138     then
   139       # The compiler can only warn and ignore the option if not recognized
   140 @@ -18060,11 +18064,11 @@
   141     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   142     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   143     -e 's:$: $lt_compiler_flag:'`
   144 -   (eval echo "\"\$as_me:18063: $lt_compile\"" >&5)
   145 +   (eval echo "\"\$as_me:18067: $lt_compile\"" >&5)
   146     (eval "$lt_compile" 2>conftest.err)
   147     ac_status=$?
   148     cat conftest.err >&5
   149 -   echo "$as_me:18067: \$? = $ac_status" >&5
   150 +   echo "$as_me:18071: \$? = $ac_status" >&5
   151     if (exit $ac_status) && test -s "$ac_outfile"; then
   152       # The compiler can only warn and ignore the option if not recognized
   153       # So say no if there are warnings other than the usual output.
   154 @@ -18164,11 +18168,11 @@
   155     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   156     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   157     -e 's:$: $lt_compiler_flag:'`
   158 -   (eval echo "\"\$as_me:18167: $lt_compile\"" >&5)
   159 +   (eval echo "\"\$as_me:18171: $lt_compile\"" >&5)
   160     (eval "$lt_compile" 2>out/conftest.err)
   161     ac_status=$?
   162     cat out/conftest.err >&5
   163 -   echo "$as_me:18171: \$? = $ac_status" >&5
   164 +   echo "$as_me:18175: \$? = $ac_status" >&5
   165     if (exit $ac_status) && test -s out/conftest2.$ac_objext
   166     then
   167       # The compiler can only warn and ignore the option if not recognized
   168 @@ -20364,11 +20368,11 @@
   169     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   170     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   171     -e 's:$: $lt_compiler_flag:'`
   172 -   (eval echo "\"\$as_me:20367: $lt_compile\"" >&5)
   173 +   (eval echo "\"\$as_me:20371: $lt_compile\"" >&5)
   174     (eval "$lt_compile" 2>conftest.err)
   175     ac_status=$?
   176     cat conftest.err >&5
   177 -   echo "$as_me:20371: \$? = $ac_status" >&5
   178 +   echo "$as_me:20375: \$? = $ac_status" >&5
   179     if (exit $ac_status) && test -s "$ac_outfile"; then
   180       # The compiler can only warn and ignore the option if not recognized
   181       # So say no if there are warnings other than the usual output.
   182 @@ -20654,11 +20658,11 @@
   183     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   184     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   185     -e 's:$: $lt_compiler_flag:'`
   186 -   (eval echo "\"\$as_me:20657: $lt_compile\"" >&5)
   187 +   (eval echo "\"\$as_me:20661: $lt_compile\"" >&5)
   188     (eval "$lt_compile" 2>conftest.err)
   189     ac_status=$?
   190     cat conftest.err >&5
   191 -   echo "$as_me:20661: \$? = $ac_status" >&5
   192 +   echo "$as_me:20665: \$? = $ac_status" >&5
   193     if (exit $ac_status) && test -s "$ac_outfile"; then
   194       # The compiler can only warn and ignore the option if not recognized
   195       # So say no if there are warnings other than the usual output.
   196 @@ -20758,11 +20762,11 @@
   197     -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
   198     -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
   199     -e 's:$: $lt_compiler_flag:'`
   200 -   (eval echo "\"\$as_me:20761: $lt_compile\"" >&5)
   201 +   (eval echo "\"\$as_me:20765: $lt_compile\"" >&5)
   202     (eval "$lt_compile" 2>out/conftest.err)
   203     ac_status=$?
   204     cat out/conftest.err >&5
   205 -   echo "$as_me:20765: \$? = $ac_status" >&5
   206 +   echo "$as_me:20769: \$? = $ac_status" >&5
   207     if (exit $ac_status) && test -s out/conftest2.$ac_objext
   208     then
   209       # The compiler can only warn and ignore the option if not recognized