+2012-02-13 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.c (LINK_COMMAND_SPEC): Deal with -fgnu-tm.
+ (GTM_SELF_SPECS): Define if not already defined.
+ (driver_self_specs): Add GTM_SELF_SPECS.
+ * config/darwin.h (LINK_COMMAND_SPEC_A): Deal with -fgnu-tm.
+ (GTM_SELF_SPECS): Define.
+ * config/i386/cygwin.h (GTM_SELF_SPECS): Likewise.
+ * config/i386/mingw32.h (GTM_SELF_SPECS): Likewise.
+
2012-02-13 Jakub Jelinek <jakub@redhat.com>
* cselib.c (expand_loc): Return sp, fp, hfp or cfa base reg right
%{L*} %(link_libgcc) %o %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} \
%{fopenmp|ftree-parallelize-loops=*: \
%{static|static-libgcc|static-libstdc++|static-libgfortran: libgomp.a%s; : -lgomp } } \
+ %{fgnu-tm: \
+ %{static|static-libgcc|static-libstdc++|static-libgfortran: libitm.a%s; : -litm } } \
%{!nostdlib:%{!nodefaultlibs:\
%(link_ssp) %(link_gcc_c_sequence)\
}}\
#undef GOMP_SELF_SPECS
#define GOMP_SELF_SPECS ""
+#undef GTM_SELF_SPECS
+#define GTM_SELF_SPECS ""
/* Darwin disables section anchors by default.
They should be enabled per arch where support exists in that arch. */
and the -pthread flag is not recognized. */
#undef GOMP_SELF_SPECS
#define GOMP_SELF_SPECS ""
+#undef GTM_SELF_SPECS
+#define GTM_SELF_SPECS ""
/* This matches SHLIB_SONAME and SHLIB_SOVERSION in t-cygwin. */
#if DWARF2_UNWIND_INFO
#undef GOMP_SELF_SPECS
#define GOMP_SELF_SPECS "%{fopenmp|ftree-parallelize-loops=*: " \
"-mthreads -pthread}"
+#undef GTM_SELF_SPECS
+#define GTM_SELF_SPECS "%{fgnu-tm:-mthreads -pthread}"
/* mingw32 atexit function is safe to use in shared libraries. Use it
to register C++ static destructors. */
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}}\
%{static:} %{L*} %(mfwrap) %(link_libgcc) %o\
%{fopenmp|ftree-parallelize-loops=*:%:include(libgomp.spec)%(link_gomp)}\
+ %{fgnu-tm:%:include(libitm.spec)%(link_itm)}\
%(mflib) " STACK_SPLIT_SPEC "\
%{fprofile-arcs|fprofile-generate*|coverage:-lgcov}\
%{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}\
#define GOMP_SELF_SPECS "%{fopenmp|ftree-parallelize-loops=*: -pthread}"
#endif
+/* Likewise for -fgnu-tm. */
+#ifndef GTM_SELF_SPECS
+#define GTM_SELF_SPECS "%{fgnu-tm: -pthread}"
+#endif
+
static const char *const driver_self_specs[] = {
"%{fdump-final-insns:-fdump-final-insns=.} %<fdump-final-insns",
- DRIVER_SELF_SPECS, CONFIGURE_SPECS, GOMP_SELF_SPECS
+ DRIVER_SELF_SPECS, CONFIGURE_SPECS, GOMP_SELF_SPECS, GTM_SELF_SPECS
};
#ifndef OPTION_DEFAULT_SPECS
+2012-02-11 Eric Botcazou <ebotcazou@adacore.com>
+
+ * configure.ac (link_itm): Fix comment.
+ * configure: Regenerate.
+ * testsuite/lib/libitm.exp: Do not pass -litm for the link.
+
2012-01-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR libitm/51822
fi
# Set up the set of libraries that we need to link against for libitm.
-# Note that the GOMP_SELF_SPEC in gcc.c will force -pthread for -fopenmp,
+# Note that the GTM_SELF_SPECS in gcc.c will force -pthread for -fgnu-tm,
# which will force linkage against -lpthread (or equivalent for the system).
# That's not 100% ideal, but about the best we can do easily.
if test $enable_shared = yes; then
fi
# Set up the set of libraries that we need to link against for libitm.
-# Note that the GOMP_SELF_SPEC in gcc.c will force -pthread for -fopenmp,
+# Note that the GTM_SELF_SPECS in gcc.c will force -pthread for -fgnu-tm,
# which will force linkage against -lpthread (or equivalent for the system).
# That's not 100% ideal, but about the best we can do easily.
if test $enable_shared = yes; then
lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/.libs"
}
lappend ALWAYS_CFLAGS "additional_flags=-I${srcdir}/.."
- lappend ALWAYS_CFLAGS "ldflags=-litm"
# We use atomic operations in the testcases to validate results.
if { ([istarget i?86-*-*] || [istarget x86_64-*-*])