This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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: relative include search path


> ?So that you can move the entire installation somewhere else and it will all
> work because it will all be in the same relative locations compared to the new
> $prefix as it was when installed in the original $prefix.
>
> ?What you have done is move a single part of the installation to a new
> location and leave the rest behind. ?That is not supported, and there's no
> simple and direct way in which it could be.

I don't moved a single part of the installation to a new location. I
have built minimal system (grub, linux kernel, libc, bash and gcc)
using cross compiler, and I am trying to compile simple file that
includes <stddef.h>. gcc compiles this file only when I invoke it from
/usr/bin, where it was installed. i.e.

cd /usr/bin
gcc -v test.c

When gcc is invoked from another directory without "cd /usr/bin", it
can not find the stddef.h.

"gcc -v test.c" prints relative include path
("../lib/gcc/x86_64-unknown-linux-gnu/4.5.0/include"), while "gcc -v
test.c", invoked on  my main system prints absolute include path, i.e
it prepends directory where the gcc is located to the
"../lib/gcc/x86_64-unknown-linux-gnu/4.5.0/include".

So question is: why gcc can not prepend its location when it searches
for include files ?


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