Jeremy Huntwork wrote:
> On 3/1/12 3:48 PM, Bruce Dubbs wrote:
>> Could you please explain (again) the advantages of your proposal over
>> the current process.
>
> The biggest advantages are that we don't have to maintain a patch that
> reverts upstream changes to make our build system work (the pass2
> startfiles fix patch) and that we are more closely following what
> upstream has provided to build a clean cross compiler.
That patch only adds 5 lines of code. However I do see being able to
drop it as an advantage -- if appropriate.
> And yes, pass 1 is indeed a cross compiler, and it cross compiles the
> temporary libc. It just happens to match our host architecture so we can
> fake it as a native compiler when we build pass 2 of binutils and gcc.
>
> The current method does work, but for all intents and purposes, it works
> unintentionally since we mangle the source. Before pass 2, in the
> current method gcc doesn't even work without manually specifying -B and
> to me that's broken.
-B for broken? :)
That doesn't particularly bother me, but I don't mind removing it either
if it's unnecessary.
> There may seem to be more adjustments in the proposed version, but it's
> really just resetting hard coded paths in configurations to work with
> the /tools prefix - think of it as moving the adjusting toolchain phase
> from after glibc to before gcc pass1 is compiled.
I suspect the page "Toolchain Technical Notes" would need to be updated
too.
> And because of the pre-adjusting there's even less chance to bring in
> something from the host system. The limits.h file is an example. The
> first pass of GCC doesn't install a full-featured limits.h file because
> it can't find one in the include paths we've specified.
> And that's it. It's cleaner, more direct, and more closely tracks what
> upstream has provided.
Another advantage I see is removing '5.8. Adjusting the Toolchain'. I
really think that a lot of users think that's black magic. Maybe it is.
-------
As a start to analysis, lets take your changes one at a time. The first
change is to binutils-pass1. Working from your diff and the current
instructions:
../binutils-2.22/configure \
--target=$LFS_TGT \
--prefix=/tools \
--disable-nls \
--disable-werror
You propose adding
--with-sysroot=$LFS \
--with-lib-path=/tools/lib \
I don't see either of those in the ./configure --help. Can you explain
what these do.
-- Bruce
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page