[LLVMdev] dragonegg build failure

Jack Howarth
2011-04-08T00:38:17Z

The new dragonegg 2.9 sources fail to build against either FSF gcc 4.5.2 or
4.5.3svn
(with the i386_static.diff patch applied) on x86_64-apple-darwin10. In both
cases, the
build fails as...

GCC=/sw/lib/gcc4.5/bin/gcc-4 LLVM_CONFIG=/sw/bin/llvm-config make
CPPFLAGS="-DENABLE_LTO -I/sw/include"
Compiling utils/TargetInfo.cpp
<command-line>: warning: "__STDC_LIMIT_MACROS" redefined
<command-line>: warning: this is the location of the previous definition
<command-line>: warning: "__STDC_CONSTANT_MACROS" redefined
<command-line>: warning: this is the location of the previous definition
Linking TargetInfo
Compiling cache.c
<command-line>: warning: "__STDC_LIMIT_MACROS" redefined
<command-line>: warning: this is the location of the previous definition
<command-line>: warning: "__STDC_CONSTANT_MACROS" redefined
<command-line>: warning: this is the location of the previous definition
Compiling Backend.cpp
<command-line>: warning: "__STDC_LIMIT_MACROS" redefined
<command-line>: warning: this is the location of the previous definition
<command-line>: warning: "__STDC_CONSTANT_MACROS" redefined
<command-line>: warning: this is the location of the previous definition
In file included from
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/config.h:6,
                 from
/sw/src/fink.build/dragonegg-gcc45-2.9-1/dragonegg-2.9/Backend.cpp:55:
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/auto-host.h:39:1:
warning: "DEFAULT_USE_CXA_ATEXIT" redefined
In file included from
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/tm.h:13,
                 from
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/Target.h:52,
                 from
/sw/src/fink.build/dragonegg-gcc45-2.9-1/dragonegg-2.9/Backend.cpp:31:
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/defaults.h:921:1:
warning: this is the location of the previous definition
/sw/src/fink.build/dragonegg-gcc45-2.9-1/dragonegg-2.9/Backend.cpp:310:2: error:
#error LLVM_TARGET_NAME macro not specified
In file included from
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/tm.h:4,
                 from
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/Target.h:52,
                 from
/sw/src/fink.build/dragonegg-gcc45-2.9-1/dragonegg-2.9/Backend.cpp:31:
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/options.h:414:
error: expected unqualified-id before ')' token
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/options.h:582:
error: expected unqualified-id before ')' token
In file included from
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/tm.h:7,
                 from
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/Target.h:52,
                 from
/sw/src/fink.build/dragonegg-gcc45-2.9-1/dragonegg-2.9/Backend.cpp:31:
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/config/i386/i386.h:445:
error: 'tree' does not name a type
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/config/i386/i386.h:2252:
error: 'rtx' does not name a type
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/config/i386/i386.h:2253:
error: 'rtx' does not name a type
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/config/i386/i386.h:2352:
error: expected unqualified-id before ')' token
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/config/i386/i386.h:2358:
error: expected unqualified-id before ')' token
In file included from
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/tm.h:8,
                 from
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/Target.h:52,
                 from
/sw/src/fink.build/dragonegg-gcc45-2.9-1/dragonegg-2.9/Backend.cpp:31:
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/config/darwin.h:123:
error: expected unqualified-id before ')' token
In file included from
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/tm.h:8,
                 from
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/Target.h:52,
                 from
/sw/src/fink.build/dragonegg-gcc45-2.9-1/dragonegg-2.9/Backend.cpp:31:
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/config/darwin.h:756:
error: expected unqualified-id before ')' token
In file included from
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/tm.h:17,
                 from
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/Target.h:52,
                 from
/sw/src/fink.build/dragonegg-gcc45-2.9-1/dragonegg-2.9/Backend.cpp:31:
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/insn-flags.h:2011:
error: 'rtx' does not name a type
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/insn-flags.h:2012:
error: 'rtx' does not name a type
....
/sw/lib/gcc4.5/lib/gcc/x86_64-apple-darwin10.5.0/4.5.2/plugin/include/toplev.h:155:
error: conflicts with new declaration with 'C' linkage
/sw/src/fink.build/dragonegg-gcc45-2.9-1/dragonegg-2.9/Backend.cpp: In function
'void llvm_start_unit(void*, void*)':
/sw/src/fink.build/dragonegg-gcc45-2.9-1/dragonegg-2.9/Backend.cpp:1574: error:
'debug_hooks' was not declared in this scope
/sw/src/fink.build/dragonegg-gcc45-2.9-1/dragonegg-2.9/Backend.cpp:1574: error:
'do_nothing_debug_hooks' was not declared in this scope
/sw/src/fink.build/dragonegg-gcc45-2.9-1/dragonegg-2.9/Backend.cpp: In function
'void emit_functions(cgraph_node_set_def*)':
/sw/src/fink.build/dragonegg-gcc45-2.9-1/dragonegg-2.9/Backend.cpp:1932:
warning: suggest a space before ';' or explicit braces around empty body
in 'for' statement
make: *** [Backend.o] Error 1