Starting as a new thread.

This is a repeat of the proposal:

The packages in LFS that use separate build directories are out-of-tree. That is:

mkdir ../pkg-build
cd    ../pkg-build
../pkg/configure

If we use in-tree but still separate directories we then have:

mkdir build
cd    build
../configure

The affected packages are binutils, gcc (and libstdc++ which is extracted from gcc), and glibc.

============

I've thought about the proposal and wanted to make a list of pros and cons. Please add to the list other things I have not thought of.


Pros:
1. It keeps the build together so only one directory need be deleted when the package is finished.
2.  It is similar to BLFS packages that use cmake.
3.  It has been tested and it works.
4.  The proposed build structure looks slightly cleaner.
5. The proposed build structure may be slightly easier for new users to understand. 6. Upstream recommendations were written a long time ago -- well over 10 years and maybe over 20 years. The details may not be as valid to day as they once were.

Cons:

1.  If it's not broken, don't fix it.  What we have now works.
2.  Upstream recommends, or at least implies, the structure we have now.

Other info:

------------

binutils implies a separate build directory, but does not address the location of that directory:

https://sourceware.org/binutils/binutils-porting-guide.txt

The binutils README implies srcdir == objdir

-----------

gcc says:

"If you encounter seemingly strange errors when trying to build the compiler in a directory other than the source directory, it could be because you have previously configured the compiler in the source directory. Make sure you have done all the necessary preparations. "

which implies that building in-tree is OK.

file:///sources/gcc-5.3.0/INSTALL/build.html

However  https://gcc.gnu.org/install/configure.html says

"First, we highly recommend that GCC be built into a separate directory from the sources which does not reside within the source tree. This is how we generally build GCC; building where srcdir == objdir should still work, but doesn't get extensive testing; building where objdir is a subdirectory of srcdir is unsupported."

Pierre has tested the case where srcdir == objdir and the build fails.
Tests with objdir == srcdir/build are successful.

To me unsupported means that they just have not tested it.  We have tested it.

------------

glibc

http://www.gnu.org/software/libc/manual/html_node/Configuring-and-compiling.html

implies an external build directory via example, but does not address the possibility of an internal build directory.

------------

Still looking for additional feedback. The Con #1 is strong. The question is whether the Pro reasons are enough to outweigh it.

  -- Bruce
--
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to