This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch,testsuite] Fix testcases that use bind_pic_locally
- From: Vidya Praveen <vidyapraveen at arm dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Mike Stump <mikestump at comcast dot net>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, "janisjo at codesourcery dot com" <janisjo at codesourcery dot com>
- Date: Thu, 9 Jan 2014 16:58:22 +0000
- Subject: Re: [Patch,testsuite] Fix testcases that use bind_pic_locally
- Authentication-results: sourceware.org; auth=none
- References: <20131217140612 dot GA11832 at e103625-lin dot cambridge dot arm dot com> <617916D4-237F-4091-993C-5438F4780E9E at comcast dot net> <20140108114908 dot GB8275 at e103625-lin dot cambridge dot arm dot com> <20140108122856 dot GF892 at tucnak dot redhat dot com>
On Wed, Jan 08, 2014 at 12:28:56PM +0000, Jakub Jelinek wrote:
> On Wed, Jan 08, 2014 at 11:49:08AM +0000, Vidya Praveen wrote:
> > On Tue, Jan 07, 2014 at 09:35:54PM +0000, Mike Stump wrote:
> > > On Dec 17, 2013, at 6:06 AM, Vidya Praveen <vidyapraveen@arm.com> wrote:
> > > > bind_pic_locally is broken for targets that doesn't pass -fPIC/-fpic by
> > > > default [1][2].
> > >
> > > Let's give Jakub 2 days to weigh in? If no objections, Ok, though, do see about adding documentation for it.
> >
> > Sure. I didn't respin the patch with documentation since I wanted to know
> > if the solution is acceptable. If this patch is OK, I'll respin with the
> > documentation for bind_pic_locally_ok.
> >
> > > I kinda would like a simpler interface for these two, but? that can be follow on work, if someone has a bright idea and some time to implement it.
> > >
> >
> > Could you explain what do you mean by simpler interface here?
>
> The simpler interface, as I said earlier, would be just to make sure
> /* { dg-add-options bind_pic_locally } */
> does the right thing, I really don't believe you've tried hard enough.
>
> It is true dejagnu's default_target_compile has:
> if {[board_info $dest exists multilib_flags]} {
> append add_flags " [board_info $dest multilib_flags]"
> }
> last (before just adding -o $destfile; is multilib_flags where the
> -fpic/-fPIC comes in, right?), but if say dg-add-options bind_pic_locally
> adds the necessary options not to dg-extra-tools-flags, but to some
> other variable and say gcc_target_compile (and g++_target_compile)
> around the [target_compile ...] invocation e.g. temporarily append
> that other variable (if not empty) to board_info's multilib_flags
> and afterwards remove it, I don't see why it wouldn't work.
> Tcl is quite flexible in this.
Thanks Jakub. I seem to have not properly understood your earlier email. I could
do this and works fine. I'll test and post the patch.
VP.