eglibc: add version 2.15
[openwrt/openwrt.git] / toolchain / eglibc / patches / 2.15 / 001-fix_autoconf_macro.patch
1 --- a/libc/aclocal.m4
2 +++ b/libc/aclocal.m4
3 @@ -88,6 +88,12 @@
4 fi
5 rm -fr contest*])
6
7 +dnl Test a compiler option or options with an empty input file.
8 +dnl LIBC_TRY_CC_OPTION([options], [action-if-true], [action-if-false])
9 +AC_DEFUN([LIBC_TRY_CC_OPTION],
10 +[AS_IF([AC_TRY_COMMAND([${CC-cc} $1 -xc /dev/null -S -o /dev/null])],
11 + [$2], [$3])])
12 +
13 AC_DEFUN([LIBC_PROG_BINUTILS],
14 [# Was a --with-binutils option given?
15 if test -n "$path_binutils"; then
16 --- a/libc/configure
17 +++ b/libc/configure
18 @@ -7404,7 +7404,14 @@
19 else
20 libc_cv_cc_nofma=
21 for opt in -ffp-contract=off -mno-fused-madd; do
22 - LIBC_TRY_CC_OPTION($opt, libc_cv_cc_nofma=$opt; break)
23 + if { ac_try='${CC-cc} $opt -xc /dev/null -S -o /dev/null'
24 + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
25 + (eval $ac_try) 2>&5
26 + ac_status=$?
27 + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28 + test $ac_status = 0; }; }; then :
29 + libc_cv_cc_nofma=$opt; break
30 +fi
31 done
32 fi
33 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_nofma" >&5
34 --- a/libc/configure.in
35 +++ b/libc/configure.in
36 @@ -2238,10 +2238,9 @@
37 libc_cv_cc_submachine, [dnl
38 libc_cv_cc_submachine=no
39 for opt in "-march=$submachine" "-mcpu=$submachine"; do
40 - if AC_TRY_COMMAND([${CC-cc} $opt -xc /dev/null -S -o /dev/null]); then
41 + LIBC_TRY_CC_OPTION([$opt], [
42 libc_cv_cc_submachine="$opt"
43 - break
44 - fi
45 + break], [])
46 done])
47 if test "x$libc_cv_cc_submachine" = xno; then
48 AC_MSG_ERROR([${CC-cc} does not support $submachine])