summaryrefslogtreecommitdiff
path: root/patches/eglibc
diff options
context:
space:
mode:
authorMatthieu Crapet <mcrapet@gmail.com>2012-06-06 10:03:12 (GMT)
committerMatthieu Crapet <mcrapet@gmail.com>2012-06-06 10:03:12 (GMT)
commitfdceb40d84389851f74293524678bee003d3c640 (patch)
treee462b26fc6df1f2552d8886abfda3f3df80d22da /patches/eglibc
parent40bed13ba6ff595ebc6db85e6326966d98b14e9b (diff)
libc/eglibc: fix missing LIBC_TRY_CC_OPTION definition (eglibc 2.15)
Upstream SVN is currently broken: http://www.eglibc.org/svn/branches/eglibc-2_15/libc/ LIBC_TRY_CC_OPTION macro is not defined in aclocal.m4. This patch fix the configure script. Once upstream branch will be fixed this patch could be reverted. Related patch (committed to eglibc trunk): Use autoconf macro for testing compiler options with empty input http://sourceware.org/ml/libc-alpha/2012-03/msg00816.html Signed-off-by: Matthieu Crapet <mcrapet@gmail.com> diff -r 1f6c8e4b2b92 -r d10afc5bcc25 patches/eglibc/2_15/110-aclocal-LIBC_TRY_CC_OPTION.patch
Diffstat (limited to 'patches/eglibc')
-rw-r--r--patches/eglibc/2_15/110-aclocal-LIBC_TRY_CC_OPTION.patch56
1 files changed, 56 insertions, 0 deletions
diff --git a/patches/eglibc/2_15/110-aclocal-LIBC_TRY_CC_OPTION.patch b/patches/eglibc/2_15/110-aclocal-LIBC_TRY_CC_OPTION.patch
new file mode 100644
index 0000000..1b0cccf
--- /dev/null
+++ b/patches/eglibc/2_15/110-aclocal-LIBC_TRY_CC_OPTION.patch
@@ -0,0 +1,56 @@
+Define missing LIBC_TRY_CC_OPTION macro
+
+diff --git a/aclocal.m4 b/aclocal.m4
+index 86c07f7..32e9266 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -88,6 +88,12 @@ else
+ fi
+ rm -fr contest*])
+
++dnl Test a compiler option or options with an empty input file.
++dnl LIBC_TRY_CC_OPTION([options], [action-if-true], [action-if-false])
++AC_DEFUN([LIBC_TRY_CC_OPTION],
++[AS_IF([AC_TRY_COMMAND([${CC-cc} $1 -xc /dev/null -S -o /dev/null])],
++ [$2], [$3])])
++
+ AC_DEFUN([LIBC_PROG_BINUTILS],
+ [# Was a --with-binutils option given?
+ if test -n "$path_binutils"; then
+diff --git a/configure b/configure
+index fc6abe6..196a214 100755
+--- a/configure
++++ b/configure
+@@ -7698,7 +7698,14 @@ if test "${libc_cv_cc_nofma+set}" = set; then
+ else
+ libc_cv_cc_nofma=
+ for opt in -ffp-contract=off -mno-fused-madd; do
+- LIBC_TRY_CC_OPTION($opt, libc_cv_cc_nofma=$opt; break)
++ if { ac_try='${CC-cc} $opt -xc /dev/null -S -o /dev/null'
++ { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
++ (eval $ac_try) 2>&5
++ ac_status=$?
++ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
++ test $ac_status = 0; }; }; then :
++ libc_cv_cc_nofma=$opt; break
++fi
+ done
+ fi
+ { $as_echo "$as_me:$LINENO: result: $libc_cv_cc_nofma" >&5
+diff --git a/configure.in b/configure.in
+index 09cbeea..7ccc802 100644
+--- a/configure.in
++++ b/configure.in
+@@ -2216,10 +2216,9 @@ if test -n "$submachine"; then
+ libc_cv_cc_submachine, [dnl
+ libc_cv_cc_submachine=no
+ for opt in "-march=$submachine" "-mcpu=$submachine"; do
+- if AC_TRY_COMMAND([${CC-cc} $opt -xc /dev/null -S -o /dev/null]); then
++ LIBC_TRY_CC_OPTION([$opt], [
+ libc_cv_cc_submachine="$opt"
+- break
+- fi
++ break], [])
+ done])
+ if test "x$libc_cv_cc_submachine" = xno; then
+ AC_MSG_ERROR([${CC-cc} does not support $submachine])