[LLVMdev] LLVM-3.0 fails to build on linux ppc32
acrux_it at libero.it
acrux_it at libero.it
Fri Dec 2 03:30:29 PST 2011
hi, i just try to build llvm-3.0 (stable) on linux ppc32 (CRUX PPC 2.7) with
gcc-4.5.3, binutils-2.21.1, glibc-2.12.2 .
As this suggestion:
http://llvm.org/bugs/show_bug.cgi?id=10969
I applied a patch like this one:
--- llvm-3.0.src/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h
2011-07-26 01:24:55.000000000 +0200
+++ llvm-3.0.src/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h
2011-12-02 02:04:06.000000000 +0100
@@ -34,6 +34,10 @@
} // End llvm namespace
+// Generated files will use "namespace PPC". To avoid symbol clash,
+// undefine PPC here. PPC may be predefined on some hosts.
+#undef PPC
+
// Defines symbolic names for PowerPC registers. This defines a mapping from
// register name to register number.
//
--- llvm-3.0.src/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h
2011-07-26 02:24:13.000000000 +0200
+++ llvm-3.0.src/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h
2011-12-02 02:05:22.000000000 +0100
@@ -14,6 +14,10 @@
#ifndef LLVM_TARGET_POWERPC_PPCPREDICATES_H
#define LLVM_TARGET_POWERPC_PPCPREDICATES_H
+// Generated files will use "namespace PPC". To avoid symbol clash,
+// undefine PPC here. PPC may be predefined on some hosts.
+#undef PPC
+
namespace llvm {
namespace PPC {
/// Predicate - These are "(BI << 5) | BO" for various predicates.
but i got this further error:
[...]
make[3]: Leaving directory
`/mnt/EXT/00/llvm/work/src/llvm-3.0.src/lib/ExecutionEngine/JIT'
make[3]: Entering directory
`/mnt/EXT/00/llvm/work/src/llvm-3.0.src/lib/ExecutionEngine/MCJIT'
llvm[3]: Compiling Intercept.cpp for Release build
llvm[3]: Compiling MCJIT.cpp for Release build
llvm[3]: Building Release Archive Library libLLVMMCJIT.a
make[3]: Leaving directory
`/mnt/EXT/00/llvm/work/src/llvm-3.0.src/lib/ExecutionEngine/MCJIT'
make[3]: Entering directory
`/mnt/EXT/00/llvm/work/src/llvm-3.0.src/lib/ExecutionEngine/RuntimeDyld'
llvm[3]: Compiling RuntimeDyld.cpp for Release build
llvm[3]: Compiling RuntimeDyldMachO.cpp for Release build
llvm[3]: Building Release Archive Library libLLVMRuntimeDyld.a
make[3]: Leaving directory
`/mnt/EXT/00/llvm/work/src/llvm-3.0.src/lib/ExecutionEngine/RuntimeDyld'
make[2]: Leaving directory
`/mnt/EXT/00/llvm/work/src/llvm-3.0.src/lib/ExecutionEngine'
make[2]: Entering directory `/mnt/EXT/00/llvm/work/src/llvm-3.0.
src/lib/Linker'
llvm[2]: Compiling LinkArchives.cpp for Release build
llvm[2]: Compiling LinkItems.cpp for Release build
llvm[2]: Compiling LinkModules.cpp for Release build
llvm[2]: Compiling Linker.cpp for Release build
llvm[2]: Building Release Archive Library libLLVMLinker.a
make[2]: Leaving directory `/mnt/EXT/00/llvm/work/src/llvm-3.0.src/lib/Linker'
make[2]: Entering directory `/mnt/EXT/00/llvm/work/src/llvm-3.0.src/lib/MC'
llvm[2]: Compiling ELFObjectWriter.cpp for Release build
In file included from ELFObjectWriter.cpp:33:0:
../Target/PowerPC/MCTargetDesc/PPCFixupKinds.h:16:11: error: expected
identifier before numeric constant
../Target/PowerPC/MCTargetDesc/PPCFixupKinds.h:16:11: error: expected
unqualified-id before numeric constant
ELFObjectWriter.cpp:1832:1: error: expected '}' at end of input
/bin/rm: cannot remove
`/mnt/EXT/00/llvm/work/src/llvm-3.0.src/lib/MC/Release/ELFObjectWriter.d.tmp':
No such file or directory
make[2]: ***
[/mnt/EXT/00/llvm/work/src/llvm-3.0.src/lib/MC/Release/ELFObjectWriter.o]
Error
1
make[2]: Leaving directory `/mnt/EXT/00/llvm/work/src/llvm-3.0.src/lib/MC'
make[1]: *** [MC/.makeall] Error 2
make[1]: Leaving directory `/mnt/EXT/00/llvm/work/src/llvm-3.0.src/lib'
make: *** [all] Error 1
cheers,
--nico
More information about the llvm-dev
mailing list