Message ID | yddd3rg3c9m.fsf@manam.CeBiTec.Uni-Bielefeld.DE |
---|---|
State | New |
Headers | show |
On Mon, 11 Oct 2010, Rainer Orth wrote: > Solaris 2/SPARC bootstrap is currently broken due to one of Joseph's > recent patches: sparc/gmon-sol2.c doesn't compile since some headers now > use bool without a definition being provided: I am currently testing a patch along the lines I described at <http://gcc.gnu.org/ml/gcc-patches/2010-10/msg00787.html>, which I think should fix this through flags.h again not being included in tm.h. The *real* problem, however, is on two levels: * There are far too many defines used to condition target code (USED_FOR_TARGET, IN_LIBGCC2, IN_TARGET_LIBS, IN_RTS) in one place or another, plus IN_GCC which "distinguishes between code compiled into GCC itself and other programs built during a bootstrap" according to the makefile comment (but which does nothing of the sort - it's used for other programs such as gcov, and for generator programs, and for target code), plus GENERATOR_FILE which actually has a meaningful use. The options code is using a subset of the target code conditionals - apparently not a sufficient subset - to disable some things for the target. (Then you have __GCC_FLOAT_NOT_NEEDED, defined in gcc/Makefile.in but completely unused.) This set of defines should be cut down - my guess is that it should be possible to have just USED_FOR_TARGET and GENERATOR_FILE, plus IN_CONFIGURE_TEST or similar to deal with the IN_GCC conditional in system.h. * It would be better for no headers to be shared by host and target code in the first place; so far as target code needs configuration headers, they should be completely separate from host headers, and target code should be built and configured completely outside the gcc/ directory. Then you don't need macros to distinguish whether code is being built for the host or the target at all.
diff -r a6ebd063d3e0 gcc/config/sparc/gmon-sol2.c --- a/gcc/config/sparc/gmon-sol2.c Mon Oct 11 11:31:36 2010 +0200 +++ b/gcc/config/sparc/gmon-sol2.c Mon Oct 11 18:40:48 2010 +0200 @@ -35,8 +35,6 @@ #include "tconfig.h" #include "tsystem.h" #include <fcntl.h> /* for creat() */ -#include "coretypes.h" -#include "tm.h" #if 0 #include "sparc/gmon.h"