RFA: PR 68913: Provide weak version of __fread_chk for PR61886 test
Jeff Law
law@redhat.com
Sat Jan 9 00:10:00 GMT 2016
On 01/08/2016 05:01 AM, Nick Clifton wrote:
> Hi Guys,
>
> OK - how about this reformulation of the pr61886 test ?
>
> The patch changes references to __fread_chk with references to just
> fread, which I assume will be present in all target runtime libraries. I
> had to add some preprocessor trickery in order to ensure that
> __USER_LABEL_PREFIX__ is correctly prepended to the assembler name of
> the functions, but other than that the test remains the same. No linker
> funny business this time.
>
> I have tested this patch with an x86_64 native (whose C runtime does
> include __fread_chk), an ARM cross compiler (using newlib, which does
> not provide __fread_chk) and with a V850 cross compiler (which uses
> newlib and which also defines __USER_LABEL_PREFIX to "_"). Prior to
> Honza's r231548 patch all three toolchains fail this patched test. Using
> today#s latest and greatest mainline gcc sources, all three toolchains
> pass the patched test.
>
> OK to apply ?
>
> Cheers
> Nick
>
> gcc/testsuite/ChangeLog
> 2016-01-08 Nick Clifton <nickc@redhat.com>
>
> PR target/68913
> * gcc.dg/lto/pr61886_0.c: Rename the external function called
> to fread so that it will be found in all target runtimes.
Ok.
Thanks for going the extra mile on this one.
jeff
More information about the Gcc-patches
mailing list