This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix in-src-tree builds by making gdbserver/gnulib/ a separate library (a la libiberty, etc.), and adding ACX_CONFIGURE_DIR.


On Wed, 18 Apr 2012 15:03:34 +0200, Pedro Alves wrote:
> On 04/18/2012 01:51 PM, Jan Kratochvil wrote:
> 
> > On Wed, 18 Apr 2012 14:40:18 +0200, Pedro Alves wrote:
> >> > This is no different from src/gdb/ vs build/gdb.
> > I (and I guess most of the users) always use just in-src-tree-build with src/
> > and no separate build/ .  
> 
> Eh.  Why would you prefer doing things that way?

This is offtopic but:

After 6 years I still have not figured out a single reason why to do
out-of-src-tree build.  It is difficult to switch directories back and forth
between editing .c files and running make.

And why to separate the two directories?
 * Object/binary files are filtered out of versioning system handling by
   .cvsignore/.gitignore (it does not work with GDB, I guess I should fix it).
 * Why to have multiple builds out of a single src tree?  I do not remember
   I would ever use that case.  And if I had to I just copy the sources.
   And if I need to save space of the sources files, negligible to the object
   files size anyway, either
   * filesystem automatic deduplication does it for me automatically anyway.
   * or I can just use hardlinks for the source files (cp -al).

I probably miss some use case but I never met such use case in the 6 years
heavily involved with the toolchain (and neither in its lighter use before).


> > From my point of view it does not matter how it
> > looks in the out-of-src-tree build.  I understand you have to introduce
> > separate build directory for gnulib/ in your layout.
> > 
> > Couldn't you just use
> > 	gdb/configure.ac:           ACX_CONFIGURE_DIR(["gnulib-src"],    ["build-gnulib-gdb"])
> > 	gdb/gdbserver/configure.ac: ACX_CONFIGURE_DIR(["../gnulib-src"], ["build-gnulib-gdbserver"])
> > and having during in-src-tree build:
> > 	src/gdb/gnulib-src/gnulib/
> > 	src/gdb/build-gnulib-gdb/gnulib/
> > 	src/gdb/gdbserver/build-gnulib-gdbserver/gnulib/
> 
> I could, but look at those duplicate "gnulib/"s anyway...

It is all about subjective orientation, I find it easier that at least the
parent directory name is unique.

This double-directory layout and out-of-src-tree part even during in-src-tree
part is sure not ideal.  Do you have objections to this layout of slightly
less ambigous names?  I do not mind renaming it any way, just to keep it
unique as I propose above.


> I really don't think we should complicate the build to somehow change that.

Then there is the toplevel gnulib directory.


> I think you'll have cases like these if you build gcc in tree, for example.

gcc tree is an exception as:
 * it has three stages during bootstrap anyway so it just cannot be a single
   directory.
 * AFAIK it is usable only after `make install' anyway so one needs the
   separate installation directory already, so if 2 or 3 directories already
   does not matter much.


Thanks,
Jan


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]