This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] [RFC] sim: testsuite: support @vars@ in flags


On 11/10/2015 06:46 AM, Mike Frysinger wrote:
> Sometimes in tests, we need supplemental files like linker scripts or
> board helper files.  There's no way to set those flags in the tests
> currently and relative paths don't work (breaks out of tree builds).
> 
> Update the main option parser to replace some strings on the fly.  Now
> tests can do things like:
> # ld: -T@srcdir@/@subdir@/sample.ld
> 
> I'm not sure if there's any precedence for things like this in the tree.

Seems like ld's testsuite has something like that.  At least, grepping
for "subdir" finds a ton of things like these, in .d files:

ld-d10v/reloc-005.d:2:#ld: -T $srcdir/$subdir/reloc-005.ld
ld-d10v/reloc-013.d:2:#ld: -T $srcdir/$subdir/reloc-013.ld
ld-d10v/reloc-014.d:2:#ld: -T $srcdir/$subdir/reloc-014.ld
ld-d10v/reloc-006.d:2:#ld: -T $srcdir/$subdir/reloc-006.ld

I can't find where the magic $srcdir and $subdir are expanded.  Maybe
that's just passed through a tcl eval somewhere, which expands the tcl
variables.

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]