diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 091bda2132d218e4c51143111b860e36822435af..eeec49d4022d3f9a52261e2c73e9a902017a6a42 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2012-07-05  Andreas Krebbel  <Andreas.Krebbel@de.ibm.com>
+
+	* config.gcc: Enable ifunc attribute by default on s390 and s390x.
+
 2012-07-05  Steven Bosscher  <steven@gcc.gnu.org>
 
 	* expr.c (try_casesi): Remove bogus ATTRIBUTE_UNUSED markers.
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 40d513f9d25ba1204d53694d5d9be01b1d12b390..7768917f914bcff62c8338b873c7ca7d42f43567 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -2096,12 +2096,14 @@ rx-*-elf*)
 	tmake_file="${tmake_file} rx/t-rx"
 	;;
 s390-*-linux*)
+	default_gnu_indirect_function=yes
 	tm_file="s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
 	if test x$enable_targets = xall; then
 		tmake_file="${tmake_file} s390/t-linux64"
 	fi
 	;;
 s390x-*-linux*)
+	default_gnu_indirect_function=yes
 	tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h gnu-user.h linux.h glibc-stdint.h s390/linux.h"
 	tm_p_file=s390/s390-protos.h
 	md_file=s390/s390.md