Hi
i tried to build gcc-4.0 with gdc support in an i386
clean debian environment (using pbuilder) but i get
this error:
[CUT]
c++ -O2 -DIN_GCC -W -Wall -Wwrite-strings
-Wstrict-prototypes -Wmissing-pro\totypes
-DHAVE_CONFIG_H -I. -Id -I../../src/gcc
-I../../src/gcc/d -I../../s\rc/gcc/../include
-I../../src/gcc/../libcpp/include -Id
-I../../src/gcc/d/d\md -I../../src/gcc/d
-D_GNU_SOURCE=1 -D_DH=1 -DD_NO_TRAMPOLINES=1
-DD_CPU_VERSY\M=\"X86\" -DD_OS_VERSYM=\"linux\"
-DD_GCC_VER=40 -Wno-missing-braces -fmessage-\length=0
-o d/idgen.dmdgen.o -c ../../src/gcc/d/dmd/idgen.c
`-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
cc1plus: warning: command line option
"-Wstrict-prototypes" is valid for C/ObjC\ but not for C++
cc1plus: warning: command line option
"-Wmissing-prototypes" is valid for C/Obj\C but not for C++
../../src/gcc/d/dmd/idgen.c:1: error: bad value () for
-march= switch
../../src/gcc/d/dmd/idgen.c:1: error: bad value () for
-mtune= switch
make[4]: *** [d/idgen.dmdgen.o] Error 1
make[4]: Leaving directory
`/tmp/buildd/gcc-4.0-4.0.3/build/gcc'
make[3]: *** [stage2_build] Error 2
make[3]: Leaving directory
`/tmp/buildd/gcc-4.0-4.0.3/build/gcc'
make[2]: *** [bootstrap] Error 2
make[2]: Leaving directory
`/tmp/buildd/gcc-4.0-4.0.3/build'
s=`cat status`; rm -f status; test $s -eq 0
make[1]: *** [stamps/05-build-stamp] Error 1
make[1]: Leaving directory `/tmp/buildd/gcc-4.0-4.0.3'
make: *** [stamps/05-build-stamp] Error 2
pbuilder: Failed autobuilding of package
gcc compiles if i disable the D support.
Logged In: YES
user_id=5895
Which CXXFLAGS do you use ?
I know I had to strip most of the default flags from RPM,
in order to make it compile correctly... Something like:
OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e
's/-fno-exceptions//g'`
# -mcpu makes libiberty fail to build, in GCC 3.4 *grr!*
OPT_FLAGS=`echo $OPT_FLAGS|%{__perl} -pe 's/ ?-mcpu=([^ ]+)//g'`