This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [Patch,ld] Fix check_lto_available
- From: Vidya Praveen <vidyapraveen at arm dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>, "nickc at redhat dot com" <nickc at redhat dot com>
- Date: Wed, 11 Dec 2013 14:31:37 +0000
- Subject: Re: [Patch,ld] Fix check_lto_available
- Authentication-results: sourceware.org; auth=none
- References: <20131211135732 dot GE5586 at e103625-lin dot cambridge dot arm dot com> <CAMe9rOqv7T2eLLUnA5a4R=-vch9xG3ytn545P-DZmu-sCa-V2Q at mail dot gmail dot com>
On Wed, Dec 11, 2013 at 02:08:51PM +0000, H.J. Lu wrote:
> On Wed, Dec 11, 2013 at 5:57 AM, Vidya Praveen <vidyapraveen@arm.com> wrote:
> > Hello,
> >
> > This patch modifies check_lto_available of ld regression test to
> >
> > 1. Make use of cflags, ldflags from board description file
> >
> > 2. Test by building an executable rather than a shared library
> > - This is needed for the baremetal targets as shared library makes no sense
> > to the baremetal targets. lto.exp which makes use of this check also has
> > guard for shared library tests.
> >
> > Reference:
> > https://sourceware.org/ml/binutils/2013-10/msg00214.html
> >
> > Tested for aarch64-none-elf and arm-none-eabi, arm-none-linux-gnueabihf and
> > x86_64-unknown-linux-gnu.
> >
> > OK for trunk?
> >
> > Cheers
> > VP.
> >
> > ld/testsuite/ChangeLog:
> >
> > 2013-12-11 Vidya Praveen <vidyapraveen@arm.com>
> >
> > * lib/ld-lib.exp (check_lto_available): Support cflags,ldflags and
> > test by compiling for an executable rather than shared library.
> >
>
> You also changed check_plugin_api_available. Please send
> a separate patch for it.
No. I have not. diff jus says so (though the changes are only in
check_lto_available).
>
> As for check_lto_available, it is not OK unless lto.exp is changed
> to handle LTO tests which use -shared.
Like I mentioned earlier, these shared library tests for LTO are guarded
with a condition that checks if shared library support is present.
...
302 # Restrict these to ELF targets that support shared libs and PIC.
303 if { [is_elf_format]
304 && [run_host_cmd_yesno $CC "-shared -fPIC $srcdir/$subdir/dummy.c -o tmpdir/t.so"] } {
305 run_cc_link_tests $lto_link_elf_tests
...
Or do you mean, I should make use of cflags/ldflags in that check?
VP.