[rfa][gold] build debug_msg.o without -fdebug-prefix-map
Ian Lance Taylor
iant@google.com
Wed Aug 19 16:22:00 GMT 2009
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
More information about the Binutils
mailing list