This is the mail archive of the gcc@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: Problem with some canadian cross builds


On Thu, Aug 01, 2002 at 11:07:46PM -0700, H. J. Lu wrote:
> On Fri, Aug 02, 2002 at 01:16:50AM -0400, Daniel Jacobowitz wrote:
> > There's all sorts of configury voodoo going on here, much of which is
> > suspect, but it boils down to the top level configure.in guessing a name for
> > $GCC_FOR_TARGET - often incorrectly.  The first place this shows up is in:
> > 
> > # Dump a specs file to make -B./ read these specs over installed ones.
> > specs: xgcc$(exeext)
> >         $(GCC_FOR_TARGET) -dumpspecs > tmp-specs
> >         mv tmp-specs specs
> > 
> > The others I can work around by overriding GCC_FOR_TARGET, but is there some
> > other way we can get the specs file besides running what we seem to assume
> > is the built compiler?  If I override GCC_FOR_TARGET I get a completely
> > different specs file; for instance, one in which *cross_compile is set
> > differently.
> > 
> 
> This what I have in my gcc spec file:
> 
> %if %{cross_compile}
> # Install syslimits.h for canadian cross compile.
> pushd $RPM_BUILD_DIR/gcc-3.1-%{DATE}/obj-%{_target_platform}
> #pushd $RPM_BUILD_DIR/gcc-%{version}-%{DATE}/obj-%{_target_platform}
> cp -af ../gcc/gsyslimits.h $FULLPATH/include/syslimits.h
> # Fix the specs file.
> cat gcc/specs |
> awk '
> BEGIN {
>   cross=0;
> }
> /cross_compile/ { print; cross = 1; next; } 
> /^1$/ {
>   if (cross == 0) {
>     print;
>   }
>   else {
>     cross = 0;
>     print "0";
>   }
>   next;
> }
> { print; }
> ' > $FULLPATH/specs
> popd
> %endif

Yup, I have almost the same.  But every once in a while I actually try
to build one by hand, and I forget about this - I shouldn't have to
fudge this sort of thing.

> 
> 
> H.J.
> 

-- 
Daniel Jacobowitz                           Carnegie Mellon University
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]