# DP: Build libitm with -U_FORTIFY_SOURCE on x86 and x86_64.

--- a/src/libitm/configure.tgt
+++ b/src/libitm/configure.tgt
@@ -123,6 +123,12 @@ case "${target_cpu}" in
 	;;
 esac
 
+# FIXME: ftbfs with -D_FORTIFY_SOURCE (error: invalid use of '__builtin_va_arg_pack ())
+case "${target}" in
+  *-*-linux*)
+	XCFLAGS="${XCFLAGS} -U_FORTIFY_SOURCE"
+esac
+
 # For the benefit of top-level configure, determine if the cpu is supported.
 test -d ${srcdir}/config/$ARCH || UNSUPPORTED=1
 
