Don't enable IFUNC by default for Android and uclibc
authorH.J. Lu <hongjiu.lu@intel.com>
Fri, 14 Nov 2014 16:43:23 +0000 (16:43 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Fri, 14 Nov 2014 16:43:23 +0000 (08:43 -0800)
* config.gcc (default_gnu_indirect_function): Set to yes
for i[34567]86-*-linux* and x86_64-*-linux* if not targeting
Android nor uclibc.

From-SVN: r217575

gcc/ChangeLog
gcc/config.gcc

index 8d26234cdfce9da34d0ba5775df45c1d865acbc9..bb993d2158deca6833205d3fc8f5ef51e910935c 100644 (file)
@@ -1,3 +1,9 @@
+2014-11-14  H.J. Lu  <hongjiu.lu@intel.com>
+
+       * config.gcc (default_gnu_indirect_function): Set to yes
+       for i[34567]86-*-linux* and x86_64-*-linux* if not targeting
+       Android nor uclibc.
+
 2014-11-14  Felix Yang  <felix.yang@huawei.com>
            Jiji Jiang  <jiangjiji@huawei.com>
 
index a6b37d8b8f5da734cb5103022bcad244db7ed6b4..bef56e2e54e8f505c14f95f68669ef18f7d5ce2e 100644 (file)
@@ -1404,8 +1404,14 @@ i[34567]86-*-linux* | i[34567]86-*-kfreebsd*-gnu | i[34567]86-*-knetbsd*-gnu | i
        i[34567]86-*-linux*)
                tm_file="${tm_file} linux.h linux-android.h"
                extra_options="${extra_options} linux-android.opt"
-               # Assume modern glibc
-               default_gnu_indirect_function=yes
+               # Assume modern glibc if not targeting Android nor uclibc.
+               case ${target} in
+               *-*-*android*|*-*-*uclibc*)
+                 ;;
+               *)
+                 default_gnu_indirect_function=yes
+                 ;;
+               esac
                if test x$enable_targets = xall; then
                        tm_file="${tm_file} i386/x86-64.h i386/gnu-user-common.h i386/gnu-user64.h i386/linux-common.h i386/linux64.h"
                        tm_defines="${tm_defines} TARGET_BI_ARCH=1"
@@ -1467,8 +1473,14 @@ x86_64-*-linux* | x86_64-*-kfreebsd*-gnu | x86_64-*-knetbsd*-gnu)
        x86_64-*-linux*)
                tm_file="${tm_file} linux.h linux-android.h i386/linux-common.h i386/linux64.h"
                extra_options="${extra_options} linux-android.opt"
-               # Assume modern glibc
-               default_gnu_indirect_function=yes
+               # Assume modern glibc if not targeting Android nor uclibc.
+               case ${target} in
+               *-*-*android*|*-*-*uclibc*)
+                 ;;
+               *)
+                 default_gnu_indirect_function=yes
+                 ;;
+               esac
                ;;
        x86_64-*-kfreebsd*-gnu)
                tm_file="${tm_file} kfreebsd-gnu.h i386/kfreebsd-gnu64.h"