It seems that C files include this, so you'll want _Bool, or just use an int. BR, Rob On 22 November 2013 11:51, Terry Guo <flameroc@xxxxxxxxx> wrote: > Hi there, > > I am using latest trunk code and declared a bool type variable in > i386.h as below: > > extern bool mybool; > > And then configure gcc as: > > ../gcc/configure --enable-languages=c,c++ --disable-bootstrap > > During the stage of libgcc build, I then ran into following errors: > > make[3]: Leaving directory > `/myssd/terguo01/toolchain-build/flash-prefetch/src/gcc-build/i686-pc-linux-gnu/libgcc' > /myssd/terguo01/toolchain-build/flash-prefetch/src/gcc-build/./gcc/xgcc > -B/myssd/terguo01/toolchain-build/flash-prefetch/src/gcc-build/./gcc/ > -B/usr/local/i686-pc-linux-gnu/bin/ > -B/usr/local/i686-pc-linux-gnu/lib/ -isystem > /usr/local/i686-pc-linux-gnu/include -isystem > /usr/local/i686-pc-linux-gnu/sys-include -g -O2 -O2 -g -O2 > -DIN_GCC -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes > -Wmissing-prototypes -Wold-style-definition -isystem ./include > -fpic -mlong-double-80 -g -DIN_LIBGCC2 -fbuilding-libgcc > -fno-stack-protector -fpic -mlong-double-80 -I. -I. -I../.././gcc > -I../../../gcc/libgcc -I../../../gcc/libgcc/. > -I../../../gcc/libgcc/../gcc -I../../../gcc/libgcc/../include > -I../../../gcc/libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT > -DHAVE_CC_TLS -DUSE_TLS -o _clear_cache.o -MT _clear_cache.o -MD -MP > -MF _clear_cache.dep -DL_clear_cache -c ../../../gcc/libgcc/libgcc2.c > -fvisibility=hidden -DHIDE_EXPORTS > In file included from ../.././gcc/tm.h:22:0, > from ../../../gcc/libgcc/libgcc2.c:29: > ../../../gcc/libgcc/../gcc/config/i386/i386.h:2099:1: error: unknown > type name ‘bool’ > extern bool mybool; > ^ > In file included from ../.././gcc/tm.h:22:0, > from ../../../gcc/libgcc/libgcc2.c:29: > ../../../gcc/libgcc/../gcc/config/i386/i386.h:2099:1: error: unknown > type name ‘bool’ > extern bool mybool; > ^ > In file included from ../.././gcc/tm.h:22:0, > from ../../../gcc/libgcc/libgcc2.c:29: > ../../../gcc/libgcc/../gcc/config/i386/i386.h:2099:1: error: unknown > type name ‘bool’ > extern bool mybool; > ^ > In file included from ../.././gcc/tm.h:22:0, > from ../../../gcc/libgcc/libgcc2.c:29: > ../../../gcc/libgcc/../gcc/config/i386/i386.h:2099:1: error: unknown > type name ‘bool’ > extern bool mybool; > ^ > In file included from ../.././gcc/tm.h:22:0, > from ../../../gcc/libgcc/libgcc2.c:29: > ../../../gcc/libgcc/../gcc/config/i386/i386.h:2099:1: error: unknown > type name ‘bool’ > extern bool mybool; > ^ > In file included from ../.././gcc/tm.h:22:0, > from ../../../gcc/libgcc/libgcc2.c:29: > ../../../gcc/libgcc/../gcc/config/i386/i386.h:2099:1: error: unknown > type name ‘bool’ > extern bool mybool; > ^ > make[2]: *** [_muldi3.o] Error 1 > make[2]: *** Waiting for unfinished jobs.... > make[2]: *** [_negdi2.o] Error 1 > make[2]: *** [_ashldi3.o] Error 1 > make[2]: *** [_cmpdi2.o] Error 1 > make[2]: *** [_lshrdi3.o] Error 1 > make[2]: *** [_ashrdi3.o] Error 1 > In file included from ../.././gcc/tm.h:22:0, > from ../../../gcc/libgcc/libgcc2.c:29: > ../../../gcc/libgcc/../gcc/config/i386/i386.h:2099:1: error: unknown > type name ‘bool’ > extern bool mybool; > ^ > In file included from ../.././gcc/tm.h:22:0, > from ../../../gcc/libgcc/libgcc2.c:29: > ../../../gcc/libgcc/../gcc/config/i386/i386.h:2099:1: error: unknown > type name ‘bool’ > extern bool mybool; > ^ > make[2]: *** [_clear_cache.o] Error 1 > make[2]: *** [_ucmpdi2.o] Error 1 > make[2]: Leaving directory > `/myssd/terguo01/toolchain-build/flash-prefetch/src/gcc-build/i686-pc-linux-gnu/libgcc' > make[1]: *** [all-target-libgcc] Error 2 > make[1]: Leaving directory > `/myssd/terguo01/toolchain-build/flash-prefetch/src/gcc-build' > make: *** [all] Error 2 > > What should I do to use bool type in i386.h? Please help. Thanks in advance. > > BR, > Terry