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 <vidyaprav...@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.

        Jakub

Reply via email to