This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Patch to get m68k-unknown-linux-gnu working (cpp recursion?)
- To: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- Subject: Re: Patch to get m68k-unknown-linux-gnu working (cpp recursion?)
- From: Andreas Schwab <schwab at suse dot de>
- Date: 11 Nov 2001 23:22:45 +0100
- Cc: gcc-patches at gcc dot gnu dot org
- References: <200111112158.QAA25970@caip.rutgers.edu>
"Kaveh R. Ghazi" <ghazi@caip.rutgers.edu> writes:
|> When trying to cross compile from sparc-sun-solaris2.7 to
|> m68k-unknown-linux-gnu, I get some wierd errors. This happens whether
|> I use cc, gcc-2.95 or the latest trunk as the host compiler, so I
|> don't think its a compiler bug. It seems to recursively include
|> m68k/linux.h for some reason I can't figure out.
|>
|> > /teal/caip5/ghazi/bin/tgcc -c -DCROSS_COMPILE -DIN_GCC -g -W -Wall
|> > -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional
|> > -pedantic -Wno-long-long -DHAVE_CONFIG_H -DGENERATOR_FILE
|> > -I. -I. -I../../egcs-CVS20011111/gcc
|> > -I../../egcs-CVS20011111/gcc/. -I../../egcs-CVS20011111/gcc/config
|> > -I../../egcs-CVS20011111/gcc/../include
|> > ../../egcs-CVS20011111/gcc/gengenrtl.c
|> > [20Mb worth of macro redefinition errors...]
|> > gcc/config/m68k/linux.h:27:10: #include nested too deeply
|> > gcc/config/m68k/linux.h:32:10: #include nested too deeply
|> > gcc/config/m68k/linux.h:33:10: #include nested too deeply
|> > gcc/config/m68k/linux.h:34:10: #include nested too deeply
|> > make: *** [gengenrtl.o] Error 1
|>
|>
|> The attached patch fixes it by converting the nested includes to
|> config.gcc tm_file entries. But I don't understand the original
|> problem well enough to be satisfied with the fix. My best guess is
|> that the include of "linux.h" regets m68k/linux.h but I don't see why
|> that would happen given the -I flags passed in.
|>
|> Anyway, here's the patch, should I install?
m68k/linux.h is also used by m68k-*-linux*libc1.
Andreas.
--
Andreas Schwab "And now for something
Andreas.Schwab@suse.de completely different."
SuSE Labs, SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5