This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][OBVIOUS] Fix ifunc detection.
- From: Thomas Schwinge <thomas at codesourcery dot com>
- To: Martin Liška <mliska at suse dot cz>, <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 2 Mar 2018 17:38:22 +0100
- Subject: Re: [PATCH][OBVIOUS] Fix ifunc detection.
- Authentication-results: sourceware.org; auth=none
- References: <d7c7a480-a58d-a54b-cfc4-d1333b8e77e8@suse.cz>
Hi!
On Fri, 26 Jan 2018 16:24:48 +0100, Martin Liška <mliska@suse.cz> wrote:
> This fixes detection of ifunc target capability.
> I'm going to install the patch.
You could also just have approved the patch I had sent two months before:
<http://mid.mail-archive.com/87fu9aiemr.fsf@euler.schwinge.homeip.net>.
;-)
One remark:
> --- a/gcc/testsuite/lib/target-supports.exp
> +++ b/gcc/testsuite/lib/target-supports.exp
> @@ -449,7 +449,7 @@ proc check_ifunc_available { } {
> extern "C" {
> #endif
> typedef void F (void);
> - F* g (void) {}
> + F* g (void) { return 0; }
> void f () __attribute__ ((ifunc ("g")));
> #ifdef __cplusplus
> }
Is it OK to "return 0" from this ifunc handler, or might some analysis in
GCC trip over that (at some later point)? In my patch, I returned the
address of an "extern" function.
Grüße
Thomas