This is the mail archive of the gcc-patches@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: Bugs in sysroot patches resulting in $(local_include)/include always searched, ../-expansion broken


On Thu, Feb 20, 2003 at 05:24:43PM +0100, Hans-Peter Nilsson wrote:
> > Date: Thu, 20 Feb 2003 10:16:01 -0500
> > From: Daniel Jacobowitz <drow at mvista dot com>
> > On Thu, Feb 20, 2003 at 04:09:41PM +0100, Hans-Peter Nilsson wrote:
> > > Clues?  Patches?  Request for better report?  I may eventually
> > > find the bug, but clues to speed up the process are welcome and
> > > my testing suffers in the meantime.
> > 
> > Better report.  Could you give me the output of gcc -v for 3.3-branch

I think I see the problem.

> Compiling fixunsdfsi is where it fails, so I'll show that.
> First for 3.3 (beware, cutnpaste, with most trailing \\n edited
> out I hope):
> 
> Command:
> /mnt/misca2/builds/gcc33/bug2/gcc/xgcc -B/mnt/misca2/builds/gcc33/bug2/gcc/ -B/home/hp/work/axis/build/gcc3testprefix/cris-linux/bin/ -B/home/hp/work/axis/build/gcc3testprefix/cris-linux/lib/ -isystem /home/hp/work/axis/build/gcc3testprefix/cris-linux/include -O2  -DIN_GCC -DCROSS_COMPILE   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include   -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I/home/hp/cvs_areas/combined/cvs_write33/gcc -I/home/hp/cvs_areas/combined/cvs_write33/gcc/. -I/home/hp/cvs_areas/combined/cvs_write33/gcc/config -I/home/hp/cvs_areas/combined/cvs_write33/gcc/../include  -DL_fixunsdfsi -c /home/hp/cvs_areas/combined/cvs_write33/gcc/libgcc2.c -o libgcc/./_fixunsdfsi.o -v
> 
> Output:

>  /home/hp/work/axis/build/gcc3testprefix/lib/gcc-lib/cris-linux/3.3/../../../../cris-linux/sys-include

Look at the command and the resulting search directory.  The directory
is relative to $prefix, that is, the final installation directory.  But
the compiler isn't there now.  One part of my changes, which I
consider a strict correctness change, is that if we would search a
relocated copy of a directory (based on where the gcc binary is) then
we should not search the unrelocated copy (based on $prefix, which
doesn't apply, because we aren't there right now).

Now we do:

> Command:
> /mnt/miscb3/builds2/bug2/gcc/xgcc -B/mnt/miscb3/builds2/bug2/gcc/ -B/home/hp/work/axis/build/gcc3testprefix/cris-linux/bin/ -B/home/hp/work/axis/build/gcc3testprefix/cris-linux/lib/ -isystem /home/hp/work/axis/build/gcc3testprefix/cris-linux/include -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -Dinhibit_libc -I. -I. -I/home/hp/cvs_areas/combined/cvs_write/gcc -I/home/hp/cvs_areas/combined/cvs_write/gcc/. -I/home/hp/cvs_areas/combined/cvs_write/gcc/config -I/home/hp/cvs_areas/combined/cvs_write/gcc/../include -DL_fixunsdfsi -c /home/hp/cvs_areas/combined/cvs_write/gcc/libgcc2.c -o libgcc/./_fixunsdfsi.o -v
> 
> Output, in which you see the failure mode:
> ignoring nonexistent directory "/mnt/miscb3/builds2/bug2/lib/gcc-lib/cris-linux/3.4/include"
> ignoring nonexistent directory "/mnt/miscb3/builds2/bug2/lib/gcc-lib/cris-linux/3.4/../../../../cris-linux/sys-include"

We see that the binary is in the build dir, so we're searching in the
build dir for $prefix/cris-linux/sys-include.


So we need to either:
  - not relocate sys-include, seems like a bad idea
  - explicitly specify it at build time as an additional -I option

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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