What about overloading the existing option -mbionic ? -mbionic=21 and above enable ifunc (so NDK can help enforce it)
On Fri, Nov 14, 2014 at 11:51 AM, enh <e...@google.com> wrote: > On Thu, Nov 13, 2014 at 5:12 PM, Jeff Law <l...@redhat.com> wrote: >> On 11/13/14 10:46, enh wrote: >>> >>> This feels like a bad idea to me simply because a new compiler with an >>> old runtime will generate code that fails, right? >>> >>> >>> yes, but that's already true of PIE or gnu-style hash or... >> >> That doesn't make it the right thing to do. I would argue that's a bug that >> really needs to be fixed. > > it's not a bug. no one wants 22 different compilers or configuration > options, with a new one every six months or so. > >>> If you can't do a configure-time test, then the way to go is either a >>> compile-time option, or to use a different target. If there's some >>> minimum version of android that has this capability, then this isn't >>> terribly hard. You may not even need a config file for this since >>> you >>> could define LIBC_BIONIC_USE_IFUNCS or something like that when >>> configured for a suitably new android version. >>> >>> >>> this won't make any difference to the developers, though. they get their >>> prebuilt compilers from us, and we'll just turn all the latest options >>> on. we don't ship a compilers for each Android version. we already have >>> 6 architectures * {clang,gcc} * {current,previous}version to ship. >> >> But that's no reason to have a compiler which produces bogus binaries. >> >> I really think this patch is a bad idea. > > so we should just change linux_has_ifunc_p to return > HAVE_GNU_INDIRECT_FUNCTION; instead? -- Thanks, Andrew