#2114: gcc -print-search-dirs gives directories outside /tools directory
----------------------+-----------------------------------------------------
Reporter: mfonseca | Owner: [EMAIL PROTECTED]
Type: defect | Status: new
Priority: normal | Milestone: 7.0
Component: Book | Version: 6.3
Severity: normal | Keywords:
----------------------+-----------------------------------------------------
Comment(by [EMAIL PROTECTED]):
The change to DIY's new build method already changed the definition for
STANDARD_STARTFILE_PREFIX_1 and 2. Currently, in trunk for gcc pass 2,
there are (roughly, it's part of a bigger loop) these commands:
{{{
echo '
#define STANDARD_STARTFILE_PREFIX_1 ""
#define STANDARD_STARTFILE_PREFIX_2 ""' >> gcc/config/linux.h
}}}
But there are still references to paths in /usr. If we just do as you
mention in your first suggestion, we should be alright. A slightly
modified suggestion would be:
{{{
sed -i 's@/usr/.*/gcc/@@' gcc/gcc.c
}}}
The only thing is, that for both areas (libraries and programs) when we
just unset the values of the variables, we end up with broken paths in the
search dirs, too. When I add the above line into my build, here is the
result (on x86_64):
{{{
install: /mnt/lfs/tools/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.2/
programs: =/mnt/lfs/tools/bin/../libexec/gcc/x86_64-unknown-linux-
gnu/4.3.2/:/mnt/lfs/tools/bin/../libexec/gcc/:x86_64-unknown-linux-
gnu/4.3.2/:x86_64-unknown-linux-gnu/:x86_64-unknown-linux-
gnu/4.3.2/:x86_64-unknown-linux-gnu/:/mnt/lfs/tools/bin/../lib/gcc/x86_64
-unknown-linux-gnu/4.3.2/../../../../x86_64-unknown-linux-gnu/bin/x86_64
-unknown-linux-gnu/4.3.2/:/mnt/lfs/tools/bin/../lib/gcc/x86_64-unknown-
linux-gnu/4.3.2/../../../../x86_64-unknown-linux-gnu/bin/
libraries: =/mnt/lfs/tools/bin/../lib/gcc/x86_64-unknown-linux-
gnu/4.3.2/:/mnt/lfs/tools/bin/../lib/gcc/:x86_64-unknown-linux-
gnu/4.3.2/:/mnt/lfs/tools/bin/../lib/gcc/x86_64-unknown-linux-
gnu/4.3.2/../../../../x86_64-unknown-linux-gnu/lib/x86_64-unknown-linux-
gnu/4.3.2/:/mnt/lfs/tools/bin/../lib/gcc/x86_64-unknown-linux-
gnu/4.3.2/../../../../x86_64-unknown-linux-
gnu/lib/:/mnt/lfs/tools/bin/../lib/gcc/x86_64-unknown-linux-
gnu/4.3.2/../../../x86_64-unknown-linux-
gnu/4.3.2/:/mnt/lfs/tools/bin/../lib/gcc/x86_64-unknown-linux-
gnu/4.3.2/../../../:/tools/lib/gcc/x86_64-unknown-linux-
gnu/4.3.2/../../../x86_64-unknown-linux-gnu/4.3.2/:/tools/lib/gcc/x86_64
-unknown-linux-gnu/4.3.2/../../../
}}}
Let me put a line break after the colons, so it's easier to read:
{{{
install: /mnt/lfs/tools/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.2/
programs: =/mnt/lfs/tools/bin/../libexec/gcc/x86_64-unknown-linux-
gnu/4.3.2/:
/mnt/lfs/tools/bin/../libexec/gcc/:
x86_64-unknown-linux-gnu/4.3.2/:
x86_64-unknown-linux-gnu/:
x86_64-unknown-linux-gnu/4.3.2/:
x86_64-unknown-linux-gnu/:
/mnt/lfs/tools/bin/../lib/gcc/x86_64-unknown-linux-
gnu/4.3.2/../../../../x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-
gnu/4.3.2/:
/mnt/lfs/tools/bin/../lib/gcc/x86_64-unknown-linux-
gnu/4.3.2/../../../../x86_64-unknown-linux-gnu/bin/
libraries: =/mnt/lfs/tools/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.2/:
/mnt/lfs/tools/bin/../lib/gcc/:
x86_64-unknown-linux-gnu/4.3.2/:
/mnt/lfs/tools/bin/../lib/gcc/x86_64-unknown-linux-
gnu/4.3.2/../../../../x86_64-unknown-linux-gnu/lib/x86_64-unknown-linux-
gnu/4.3.2/:
/mnt/lfs/tools/bin/../lib/gcc/x86_64-unknown-linux-
gnu/4.3.2/../../../../x86_64-unknown-linux-gnu/lib/:
/mnt/lfs/tools/bin/../lib/gcc/x86_64-unknown-linux-
gnu/4.3.2/../../../x86_64-unknown-linux-gnu/4.3.2/:
/mnt/lfs/tools/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.3.2/../../../:
/tools/lib/gcc/x86_64-unknown-linux-gnu/4.3.2/../../../x86_64-unknown-
linux-gnu/4.3.2/:
/tools/lib/gcc/x86_64-unknown-linux-gnu/4.3.2/../../../
}}}
So, the main objective is achieved, there are no more references to /usr,
but there are now definitely broken directories in the search paths, too.
This doesn't seem to be a big deal, but I wonder if we can adjust those to
be valid too...
--
Ticket URL: <http://wiki.linuxfromscratch.org/lfs/ticket/2114#comment:7>
LFS Trac <http://wiki.linuxfromscratch.org/lfs/>
Linux From Scratch: Your Distro, Your Rules.
--
http://linuxfromscratch.org/mailman/listinfo/lfs-book
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page