Re: [PATCH] Don't include *sol2-tdep.o on Linux/sparc*

Rainer Orth
2020-06-25T12:03:35Z

Hi Pedro,

> On 6/25/20 9:23 AM, Rainer Orth wrote:
>>> From a quick check, this should just work today: the functions declared
>>> in sparc*-sol2-tdep.c are only called in Solaris-specific files already.
>>> I'll give it a try separately. sparc{32,64}_sol2_init_abi are currently
>>> declared in common files (sparc*-tdep.h), but they can just be made
>>> static and the declarations removed.
>> the following patch does just that: tested on sparc64-unknown-linux-gnu
>> (build only due to PR tdep/26170) and sparcv9-sun-solaris2.11.
>
> I got curious and looked into git history to find why that was done
> in the first place.
>
> 'git blame configure.tgt' points at a4ce5b0d0204 as the commit that
> converted the old .mt files into configure.tgt.
>
> And then:
>
> $ git blame a4ce5b0d0204^ -- ./config/sparc/linux64.mt
>
> points at:
>
> commit 691342f948aa4f8c4f4e039669276faf753a36b4
> Author: David S. Miller <davem@redhat.com>
> AuthorDate: Mon Feb 27 06:14:51 2006 +0000
>
> 2006-02-26 David S. Miller <davem@sunset.davemloft.net>
>
> * config/sparc/linux.mt (TDEPFILES): Add sol2-tdep.o.
> * config/sparc/linux64.mt (TDEPFILES): Likewise.
>
> Which is... drumroll... a big nothingburger:
>
> https://sourceware.org/legacy-ml/gdb-patches/2006-02/msg00492.html
>
> So, nothing to see here, move along. :-)

however, this only accounts for the presence of sol2-tdep.o, not the
rest (sparc*-sol2-tdep.o). I looked further and they were present from
the beginning when sparc/linux64.mt was introduced. There may have been
a reason to include them once but it's certainly gone today.