Building an ARM cross compiler

Martin Kinkelin noone at spam.com
Wed Feb 9 16:59:26 PST 2011


Hi, I also encountered these complaints about undefined c_global_trees while
trying to compile the latest GDC with GCC v4.5.2 using MinGW64 and MSYS (native
--build=x86_64-w64-mingw32). I've been trying to build an up-to-date x64 D2
compiler for Windows to finally start playing around with D.

---------------
g++  -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual
-Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros
-Wno-overlength-strings   -DHAVE_CONFIG_H -I. -I. -I../../gcc -I../../gcc/.
-I../../gcc/../include -I../../gcc/../libcpp/include -I/c/gcc-4.5.2/build/./gmp
-I/c/gcc-4.5.2/gmp -I/c/gcc-4.5.2/build/./mpfr -I/c/gcc-4.5.2/mpfr
-I/c/gcc-4.5.2/mpc/src  -I../../gcc/../libdecnumber
-I../../gcc/../libdecnumber/dpd -I../libdecnumber     -I. -I. -I../../gcc
-I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include
-I/c/gcc-4.5.2/build/./gmp -I/c/gcc-4.5.2/gmp -I/c/gcc-4.5.2/build/./mpfr
-I/c/gcc-4.5.2/mpfr -I/c/gcc-4.5.2/mpc/src  -I../../gcc/../libdecnumber
-I../../gcc/../libdecnumber/dpd -I../libdecnumber    -I../../gcc/d
-I../../gcc/d/dmd2 -Id -D_GNU_SOURCE=1 -D_DH=1 -DD_NO_TRAMPOLINES=1 -DELFOBJ=1
-DLIBPHOBOS=\"-lgphobos2\" -DLIBPHOBOS_PROFILE=\"-lgphobos2\"
-DLIBDRUNTIME=\"-lgdruntime\" -DLIBDRUNTIME_PROFILE=\"-lgdruntime\" -DD_GCC_VER=45
-Wno-missing-braces -Wno-format -Wno-missing-field-initializers
-fno-strict-aliasing -fmessage-length=0 -Wl,--stack,8388608 -o cc1d.exe \
		d/id.gen.o d/impcnvtab.gen.o attribs.o cppdefault.o stub-objc.o prefix.o
i386-c.o msformat-c.o  d/aav.dmd.o d/access.dmd.o d/aliasthis.dmd.o d/array.dmd.o
d/arrayop.dmd.o d/async.dmd.o d/attrib.dmd.o d/cast.dmd.o d/class.dmd.o
d/clone.dmd.o d/cond.dmd.o d/constfold.dmd.o d/dchar.dmd.o d/declaration.dmd.o
d/delegatize.dmd.o d/doc.dmd.o d/dsymbol.dmd.o d/dump.dmd.o d/entity.dmd.o
d/enum.dmd.o d/expression.dmd.o d/func.dmd.o d/gnuc.dmd.o d/hdrgen.dmd.o
d/html.dmd.o d/identifier.dmd.o d/imphint.dmd.o d/import.dmd.o d/init.dmd.o
d/inline.dmd.o d/interpret.dmd.o d/json.dmd.o d/lexer.dmd.o d/lstring.dmd.o
d/macro.dmd.o d/mangle.dmd.o d/mars.dmd.o d/mtype.dmd.o d/module.dmd.o
d/opover.dmd.o d/optimize.dmd.o d/parse.dmd.o d/rmem.dmd.o d/root.dmd.o
d/scope.dmd.o d/speller.dmd.o d/statement.dmd.o d/staticassert.dmd.o
d/stringtable.dmd.o d/struct.dmd.o d/template.dmd.o d/todt.dmd.o d/toobj.dmd.o
d/typinf.dmd.o d/unialpha.dmd.o d/utf.dmd.o d/unittests.dmd.o d/version.dmd.o
d/argtypes.dmd.o d/builtin.dmd.o d/traits.dmd.o d/d-lang.glue.o d/d-decls.glue.o
d/d-codegen.glue.o d/d-objfile.glue.o d/d-irstate.glue.o d/d-glue.glue.o
d/d-convert.glue.o d/d-todt.glue.o d/d-gcc-real.glue.o d/d-gt.cglue.o
d/d-builtins.cglue.o d/d-misc.cglue.o d/d-builtins2.glue.o d/symbol.glue.o
d/asmstmt.glue.o d/dt.glue.o d/d-cppmngl.glue.o d/d-c-stubs.cglue.o main.o
libbackend.a ../libcpp/libcpp.a ../libdecnumber/libdecnumber.a
-L/c/gcc-4.5.2/build/./gmp/.libs -L/c/gcc-4.5.2/build/./mpfr/.libs
-L/c/gcc-4.5.2/build/./mpc/src/.libs -lmpc -lmpfr -lgmp   -L../zlib -lz
../libcpp/libcpp.a   ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a
msformat-c.o:msformat-c.c:(.data+0x318): undefined reference to `c_global_trees'
...
---------------

Hacking the Makefile to link in c-common.o isn't enough here either.
So I guess there is a reason why Iain states that the latest working version for
Windows is D2.020 (from 2008 sadly) coupled with GCC v4.3.5. Could someone shed
some light on this?

Best regards and thanks for the hard work everybody,

Martin Kinkelin


More information about the D.gnu mailing list