* [Android] Stop unconditional disabling of ifuncs for Bionic #2
@ 2014-12-09 12:39 Alexander Ivchenko
2014-12-09 18:43 ` Jeff Law
0 siblings, 1 reply; 2+ messages in thread
From: Alexander Ivchenko @ 2014-12-09 12:39 UTC (permalink / raw)
To: GCC Patches; +Cc: enh, Andrew Hsieh, Jeff Law, H.J. Lu
Hi,
Whether the *linux* target supports ifuncs or not is defined here:
linux_has_ifunc_p (void)
{
return OPTION_BIONIC ? false : HAVE_GNU_INDIRECT_FUNCTION;
}
Bionic right now supports indirect functions, but there is no way to
notify the compiler about that (For Android OPTION_BIONIC is always on
and so configure time check with --enable-gnu-indirect-function does
not work)
The following patch makes the use of the default version of
TARGET_HAS_IFUNC_P for *linux*, so we can decide whether the Android
target supports indirect functions or not on configure time.
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f22bba8..d4d09d0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-08 Alexander Ivchenko <alexander.ivchenko@intel.com>
+
+ * config/linux.c (linux_has_ifunc_p): Remove.
+ * config/linux.h (TARGET_HAS_IFUNC_P): Use default version.
+
2014-12-08 Ilya Tocar <ilya.tocar@intel.com>
* config/i386/i386.c (ix86_expand_vec_perm_vpermi2): Handle v64qi.
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
Is the patch ok? Bootstrapped/regtested on x86_64-unknown-linux-gnu +
checked that the behavior of i686-linux-android is correct.
Alexander
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Android] Stop unconditional disabling of ifuncs for Bionic #2
2014-12-09 12:39 [Android] Stop unconditional disabling of ifuncs for Bionic #2 Alexander Ivchenko
@ 2014-12-09 18:43 ` Jeff Law
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2014-12-09 18:43 UTC (permalink / raw)
To: Alexander Ivchenko, GCC Patches; +Cc: enh, Andrew Hsieh, H.J. Lu
On 12/09/14 05:39, Alexander Ivchenko wrote:
> Hi,
>
> Whether the *linux* target supports ifuncs or not is defined here:
>
> linux_has_ifunc_p (void)
> {
> return OPTION_BIONIC ? false : HAVE_GNU_INDIRECT_FUNCTION;
> }
>
> Bionic right now supports indirect functions, but there is no way to
> notify the compiler about that (For Android OPTION_BIONIC is always on
> and so configure time check with --enable-gnu-indirect-function does
> not work)
>
> The following patch makes the use of the default version of
> TARGET_HAS_IFUNC_P for *linux*, so we can decide whether the Android
> target supports indirect functions or not on configure time.
>
> diff --git a/gcc/ChangeLog b/gcc/ChangeLog
> index f22bba8..d4d09d0 100644
> --- a/gcc/ChangeLog
> +++ b/gcc/ChangeLog
> @@ -1,3 +1,8 @@
> +2014-12-08 Alexander Ivchenko <alexander.ivchenko@intel.com>
> +
> + * config/linux.c (linux_has_ifunc_p): Remove.
> + * config/linux.h (TARGET_HAS_IFUNC_P): Use default version.
OK.
jeff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-09 18:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-09 12:39 [Android] Stop unconditional disabling of ifuncs for Bionic #2 Alexander Ivchenko
2014-12-09 18:43 ` 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).