[PATCH] Fix PR78333

Richard Biener rguenther@suse.de
Thu Nov 17 08:59:00 GMT 2016


On Thu, 17 Nov 2016, Rainer Orth wrote:

> Hi Christophe,
> 
> > The new testcase fails to link on bare-metal targets (arm/aarch64):
> > /cc4ckSGA.o: In function `main':
> > pr78333.c:(.text+0x1c): undefined reference to `__cyg_profile_func_enter'
> > pr78333.c:(.text+0x34): undefined reference to `__cyg_profile_func_exit'
> > collect2: error: ld returned 1 exit status
> >
> > I understand that we really want this test to have dg-do link unlike most
> > of the other tests using -finstrument-functions, so we do not want to
> > switch to dg-do compile.
> >
> > Do we want to skip this test in bare-metal configs, or is it a new bug?
> 
> it's not only bare-metal targets, but probably most non-glibc targets.
> E.g the test also FAILs on Solaris in the same way, unlike Linux/x86_64
> where glibc provides those functions.
> 
> Probably providing dummy implemenations as in the original testcase in
> the PR is enough?

Maybe { dg-require weak } plus weak definitions of the cyg_profile funcs?
Or simply restrict the test to { target *-*-linux* }?

Richard.



More information about the Gcc-patches mailing list