Re: [rfa/rfc] Build libcommon.a for gdb and gdbserver

Tom Tromey
2011-01-18T15:20:10Z

>>>>> ">" == Yao Qi <yao@codesourcery.com> writes:

>> I am a little bit reluctant about adding configure.ac/Makefile.in as
>> well, :) We have to add different objects in libcommon.a varies on
>> different targets, and seems only configure/Makefile helps on this. I
>> can't figure out any alternatives to this in my mind so far.

One idea would be to make new top-level directories in src, then either
use the generic --disable-DIR configure option, or add a new one to
specify that you just want gdbserver.

Another idea would be to just have gdb/configure, but have a special
Makefile target that only builds gdbserver. Then all the configury
would be unified; maybe this is the best option, for that reason.

One final option would be to put gdbserver and common into a single
directory, so we keep just a single "extra" configure script.

Tom> I see that common/Makefile.in doesn't have automatic dependency
Tom> tracking. I think it should, especially if we are planning to move more
Tom> and more code there. This would be simpler with a single configure:-)

>> I'll fix that.

FWIW, it may be worth just switching to automake. It is quite a bit of
work to do for gdb, but for gdbserver it might not be so bad.

Tom