This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [rfa][gold] build debug_msg.o without -fdebug-prefix-map
- From: Ian Lance Taylor <iant at google dot com>
- To: Chris Demetriou <cgd at google dot com>
- Cc: binutils at sourceware dot org
- Date: Wed, 19 Aug 2009 06:01:54 -0700
- Subject: Re: [rfa][gold] build debug_msg.o without -fdebug-prefix-map
- References: <2e7be40c0908190107p39d39520m17229db5436b5fff@mail.gmail.com>
Chris Demetriou <cgd@google.com> writes:
> in the gold tests, the error messages from linking debug_msg.o are
> checked to verify that the source file names show up correctly in
> error messages.
>
> Use of -fdebug-prefix-map in CXX or CXXFLAGS breaks that test.
>
> To repro, build/test like:
>
> export CC="$GCC_PREFIX/bin/gcc -fdebug-prefix-map=${topdir}=/tmp/foobar"
> export CXX="$GCC_PREFIX//bin/g++ -fdebug-prefix-map=${topdir}=/tmp/foobar"
> CC="${CC}" CXX="${CXX}" "${topdir}/gold/configure" --enable-gold
> make all-gold
> make check-gold
>
> (GCC_PREFIX must contain a version of gcc that supports
> -fdebug-prefix-map, of course.)
>
> the errors you get are like:
>
> Did not find expected error in debug_msg.err:
> debug_msg.o: in function
> Base::virtfn():/home/cgd/proj/gcctools/sources/gold/gold/testsuite/debug_msg.cc:50:
> error: undefined reference to 'undef_fn1()'
I think we should just change the test. The test (in
gold/testsuite/debug_msg.sh) is trying to match ${srcdir} precisely.
That's not relevant to what is being tested here; it suffices to match
debug_msg.cc. So let's just s/${srcdir}/.*/ in debug_msg.sh. If that
works, the patch is preapproved.
Thanks.
Ian