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: [PATCH] PR 10532


Am Don, 2003-06-26 um 10.56 schrieb Jim Wilson:
> Ralf Corsepius wrote:
> > The patches below address gcc incorrectly setting up its include file
> > path for cross-compilers.
> 
> This appears to be already fixed on the mainline by a patch from Daniel 
> Jacobowitz.  See the 2003-02-13 configure.in patch which defines 
> PREFIX_INCLUDE_DIR only if host == target. 

I guess, you mean this fragment from gcc/configure.in (near line 2708)

if test x$with_sysroot = x && test x$host = x$target \
   && test "$prefix" != "/usr" && test "x$prefix" != "x$local_prefix" ;
then
  AC_DEFINE_UNQUOTED(PREFIX_INCLUDE_DIR, "$prefix/include")
fi

AFAIU (Actually, I don't fully understand the logic), this tries to
catch some exceptional cases of native compilation and leaves
PREFIX_INCLUDE_DIR undefined for cross-compilation.

So, theoretically PREFIX_INCLUDE_DIR should be undefined when compiling
cppdefaults.c and produce the over-all behavior I would like to see.

Unfortunately, I can't verify if this approach actually fixes my
problem, because gcc-mainline currently doesn't build for me. I'll try
again some time later :(

>  This is part of the sysroot 
> patch which isn't on 3.3 and is too big to add now, but the cross 
> compiler test part of this could be applied to the 3.3 branch if it 
> solves your problem.

Well, all I can say is: 
* I had been able to reproduce my problem with gcc-trunk as of last
week. (The date 2003-02-13 makes me wonder.)
* The problem exists in gcc-3.2
* The problem had been present on gcc-3.3-branch as of last week.

Ralf



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