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

Yao Qi
2011-01-31T00:31:54Z

On 01/28/2011 10:53 PM, Tom Tromey wrote:
> Yao> 4 Building libcommon.a for gdb and gdbserver respectively.
>
> This seems to mean that we must build libcommon twice. I don't
> understand that -- what is the benefit, versus having a single library?

The benefit is that we have single source (in common/) rather than two.

> Yao> diff --git a/gdb/Makefile.in b/gdb/Makefile.in
> [...]
> Yao> +$(LIBCOMMON): $(LIBCOMMON_DIR)/Makefile
> Yao> + @$(MAKE) $(FLAGS_TO_PASS) DO=all DODIRS=common subdir_do
> Yao> +
> Yao> +configure-common:
> Yao> + @: $(MAKE); $(unstage)
> Yao> + @r=`${PWD_COMMAND}`; export r; \
> Yao> + s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \
>
> I believe gdb/configure will take care of this, because `common' is now
> in AC_CONFIG_SUBDIRS.

This bit is useful that common/ can be configured during gdb `make'.

--
Yao (é½å°§)