public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Android] Enable ifuncs on Android
@ 2014-11-12 10:03 Alexander Ivchenko
  2014-11-13 17:42 ` Jeff Law
  0 siblings, 1 reply; 15+ messages in thread
From: Alexander Ivchenko @ 2014-11-12 10:03 UTC (permalink / raw)
  To: GCC Patches; +Cc: enh, Andrew Hsieh

Hi,

Bionic - Android libc - supports indirect functions right now, but
they are disabled in gcc;

We cannot do the configure-time check for that, because there is only
one version of each compiler shipped in ndk for all Android platforms.
On the other hand, having different runtime targets like -mandroid-19,
-mandroid-20 would be a nightmare. But, keeping in mind that the last
version of Android is a priority, I think that enabling ifuncs
unconditionally would be the right thing.

Is the patch ok? Bootstrapped/regtested on x86_64-unknown-linux-gnu +
checked that the behavior of i686-linux-android is correct.


diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index eac19cf..9932323 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2014-11-11  Alexander Ivchenko  <alexander.ivchenko@intel.com>
+
+       * config/linux.c (linux_has_ifunc_p): Remove.
+       * config/linux.h (TARGET_HAS_IFUNC_P): Use the default version.
+
 2014-11-11  Uros Bizjak  <ubizjak@gmail.com>

        * sreal.c (sreal::to_int): Use INTTYPE_MAXIMUM (int64_t)
diff --git a/gcc/config/linux.c b/gcc/config/linux.c
index 6242e11..15df213 100644
--- a/gcc/config/linux.c
+++ b/gcc/config/linux.c
@@ -23,14 +23,6 @@ along with GCC; see the file COPYING3.  If not see
 #include "tm.h"
 #include "linux-protos.h"

-/* Android does not support GNU indirect functions.  */
-
-bool
-linux_has_ifunc_p (void)
-{
-  return OPTION_BIONIC ? false : HAVE_GNU_INDIRECT_FUNCTION;
-}
-
 bool
 linux_libc_has_function (enum function_class fn_class)
 {
diff --git a/gcc/config/linux.h b/gcc/config/linux.h
index d38ef81..6ccacff 100644
--- a/gcc/config/linux.h
+++ b/gcc/config/linux.h
@@ -117,10 +117,6 @@ see the files COPYING3 and COPYING.RUNTIME
respectively.  If not, see

 #else /* !uClinux, i.e., normal Linux */

-/* IFUNCs are supported by glibc, but not by uClibc or Bionic.  */
-# undef TARGET_HAS_IFUNC_P
-# define TARGET_HAS_IFUNC_P linux_has_ifunc_p
-
 /* Determine what functions are present at the runtime;
    this includes full c99 runtime and sincos.  */
 # undef TARGET_LIBC_HAS_FUNCTION


--Alexander

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2014-11-24 21:26 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-12 10:03 [Android] Enable ifuncs on Android Alexander Ivchenko
2014-11-13 17:42 ` Jeff Law
2014-11-13 18:05   ` enh
     [not found]   ` <CAJgzZopFPL=5y8ts36Jd_+tH1UOz+2SG7BLZkRj5JnihuACOUw@mail.gmail.com>
2014-11-14  1:23     ` Jeff Law
2014-11-14  4:28       ` enh
2014-11-14  4:30         ` Andrew Hsieh
2014-11-14  4:35           ` H.J. Lu
2014-11-14  4:56             ` Alexander Ivchenko
2014-11-14  4:59   ` H.J. Lu
2014-11-14  5:17     ` H.J. Lu
2014-11-14  5:32     ` Jeff Law
2014-11-14  6:06       ` H.J. Lu
2014-11-14 16:51       ` H.J. Lu
2014-11-24 11:17         ` Alexander Ivchenko
2014-11-24 22:05           ` Jeff Law

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).