This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: r201440 - in /branches/gcc-4_8-branch: gcc/Chan...
- From: Andreas Krebbel <krebbel at linux dot vnet dot ibm dot com>
- To: Harald van Dijk <harald at gigawatt dot nl>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 14 Apr 2014 15:45:26 +0200
- Subject: Re: r201440 - in /branches/gcc-4_8-branch: gcc/Chan...
- Authentication-results: sourceware.org; auth=none
- References: <20130802154110 dot 5390 dot qmail at sourceware dot org> <53484856 dot 1080907 at gigawatt dot nl>
On Fri, Apr 11, 2014 at 09:53:58PM +0200, Harald van Dijk wrote:
> Hi,
>
> This commit added LIBITM_CHECK_AS_HTM to libitm/configure.ac, but did
> not add it to acinclude.m4, so configure complains about an unrecognised
> command (4.8 only). I don't know if LIBITM_CHECK_AS_HTM is supposed to
> check anything that needs checking on 4.8, I just got confused by the
> message.
Hi,
when applying the backport the s390 case apparently went to the wrong
switch statement. It became part of the RTM check for x86 instead of
the HTM check.
I've applied the attached patch to fix this.
Thanks for reporting it!
Bye,
-Andreas-
2014-04-14 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
* acinclude.m4: Move s390* case from RTM to HTM check.
* configure: Regenerate.
Index: libitm/configure
===================================================================
--- libitm/configure (revision 209369)
+++ libitm/configure (working copy)
@@ -17368,22 +17368,23 @@
fi
;;
-s390*)
+esac
+
+case "${target_cpu}" in
+powerpc*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler supports HTM" >&5
$as_echo_n "checking if the assembler supports HTM... " >&6; }
if test "${libitm_cv_as_htm+set}" = set; then :
$as_echo_n "(cached) " >&6
else
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -march=zEC12"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
-asm("tbegin 0,0; tend");
+asm("tbegin. 0; tend. 0");
;
return 0;
}
@@ -17394,7 +17395,7 @@
libitm_cv_as_htm=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- CFLAGS="$save_CFLAGS"
+
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libitm_cv_as_htm" >&5
$as_echo "$libitm_cv_as_htm" >&6; }
@@ -17404,24 +17405,22 @@
fi
;;
-esac
-LIBITM_CHECK_AS_HTM
-
-case "${target_cpu}" in
-powerpc*)
+s390*)
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler supports HTM" >&5
$as_echo_n "checking if the assembler supports HTM... " >&6; }
if test "${libitm_cv_as_htm+set}" = set; then :
$as_echo_n "(cached) " >&6
else
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -march=zEC12"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int
main ()
{
-asm("tbegin. 0; tend. 0");
+asm("tbegin 0,0; tend");
;
return 0;
}
@@ -17432,7 +17431,7 @@
libitm_cv_as_htm=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-
+ CFLAGS="$save_CFLAGS"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libitm_cv_as_htm" >&5
$as_echo "$libitm_cv_as_htm" >&6; }
Index: libitm/acinclude.m4
===================================================================
--- libitm/acinclude.m4 (revision 209369)
+++ libitm/acinclude.m4 (working copy)
@@ -121,17 +121,6 @@
AC_DEFINE(HAVE_AS_RTM, 1, [Define to 1 if the assembler supports RTM.])
fi
;;
-s390*)
- AC_CACHE_CHECK([if the assembler supports HTM], libitm_cv_as_htm, [
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -march=zEC12"
- AC_TRY_COMPILE([], [asm("tbegin 0,0; tend");],
- [libitm_cv_as_htm=yes], [libitm_cv_as_htm=no])
- CFLAGS="$save_CFLAGS"])
- if test x$libitm_cv_as_htm = xyes; then
- AC_DEFINE(HAVE_AS_HTM, 1, [Define to 1 if the assembler supports HTM.])
- fi
- ;;
esac])
dnl Check if as supports HTM instructions.
@@ -146,6 +135,17 @@
AC_DEFINE(HAVE_AS_HTM, 1, [Define to 1 if the assembler supports HTM.])
fi
;;
+s390*)
+ AC_CACHE_CHECK([if the assembler supports HTM], libitm_cv_as_htm, [
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -march=zEC12"
+ AC_TRY_COMPILE([], [asm("tbegin 0,0; tend");],
+ [libitm_cv_as_htm=yes], [libitm_cv_as_htm=no])
+ CFLAGS="$save_CFLAGS"])
+ if test x$libitm_cv_as_htm = xyes; then
+ AC_DEFINE(HAVE_AS_HTM, 1, [Define to 1 if the assembler supports HTM.])
+ fi
+ ;;
esac])
sinclude(../libtool.m4)