This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] fix testsuite ldscripts problem [was Re: mips and frv testsuite failures after plugin patch]
On 26/10/2010 21:22, Ralf Wildenhues wrote:
> Hi Dave,
Hi Ralf :)
> * Dave Korn wrote on Mon, Oct 25, 2010 at 10:23:18PM CEST:
>> --- ld/Makefile.am 14 Oct 2010 01:31:29 -0000 1.292
>> +++ ld/Makefile.am 25 Oct 2010 19:45:45 -0000
>> @@ -1916,7 +1916,16 @@ EXTRA_ld_new_SOURCES += $(ALL_EMULATION_
>> # This is the real libbfd.a created by libtool.
>> TESTBFDLIB = @TESTBFDLIB@
>>
>> -check-DEJAGNU: site.exp
>> +ldscripts-link:
>> + -eval "x`$(LIBTOOL) --config | $(GREP) ^objdir=`" && \
>> + if test -d $$xobjdir; then \
>> + test ! -e $$xobjdir/ldscripts \
>> + && $(LN_S) ../ldscripts $$xobjdir/ldscripts; \
>
> This won't work when LN_S is 'cp -p'; instead, please do
> cd $$xobjdir && $(LN_S) ../ldscripts ldscripts
>
> as documented in 'info Autoconf --index LN_S'.
Thank you; I looked up eval but forgot to look up linking. Will change as
you suggest.
> Besides, Solaris /bin/sh test does not have -e, so you might want to
> prefer -f or -r if you're still going to use the test.
Surely -f isn't right? I think that checks for a regular file, and I do not
know whether a link would necessarily count as one. I really only want to
check for existence of any kind at all, I don't care what because if someone's
already created 'ldscripts' in the objdir, they must know what they're doing,
it wouldn't just happen by accident. So I want the simplest portable
existence test of any kind. I don't even want to care if it's readable,
although I suppose it wouldn't matter either way if it's not. What's the best
most portable way to just test for existence?
cheers,
DaveK