diff --git a/srcpkgs/llvm/patches/cross-internal-compiler-error.patch b/srcpkgs/llvm/patches/cross-internal-compiler-error.patch new file mode 100644 index 00000000000..8449d7ca305 --- /dev/null +++ b/srcpkgs/llvm/patches/cross-internal-compiler-error.patch @@ -0,0 +1,22 @@ +For unknown reasons llvm_unreachable() causes a GCC internal compiler error +when cross compiling it for ARM: + +/builddir/llvm-3.4/lib/LTO/LTOCodeGenerator.cpp: In member function 'void LTOCodeGenerator::setCodePICModel(lto_codegen_model)': +/builddir/llvm-3.4/lib/LTO/LTOCodeGenerator.cpp:166:1: internal compiler error: in merge_if_block, at ifcvt.c:3193 +Please submit a full bug report, +with preprocessed source if appropriate. +See for instructions. + +Comment it out for now as workaround. + +--- lib/LTO/LTOCodeGenerator.cpp.orig 2014-01-07 12:14:22.401871342 +0100 ++++ lib/LTO/LTOCodeGenerator.cpp 2014-01-07 12:14:44.050019574 +0100 +@@ -162,7 +162,7 @@ void LTOCodeGenerator::setCodePICModel(l + CodeModel = model; + return; + } +- llvm_unreachable("Unknown PIC model!"); ++ //llvm_unreachable("Unknown PIC model!"); + } + + bool LTOCodeGenerator::writeMergedModules(const char *path, diff --git a/srcpkgs/llvm/template b/srcpkgs/llvm/template index 643e39cf001..13f5ae068e8 100644 --- a/srcpkgs/llvm/template +++ b/srcpkgs/llvm/template @@ -20,7 +20,7 @@ checksum=" f37c89b1383ce462d47537a0245ac798600887a9be9f63073e16b79ed536ab5c" # XXX Investigate ocaml bindings. -hostmakedepends="groff perl python zlib-devel" +hostmakedepends="groff perl python zlib-devel libffi-devel" makedepends="zlib-devel libffi-devel" post_extract() { @@ -35,7 +35,7 @@ post_extract() { } do_configure() { - unset CC CXX CPP AR AS RANLIB CFLAGS LDFLAGS CPPFLAGS + unset CC CXX CPP AR AS RANLIB CFLAGS CXXFLAGS CPPFLAGS LDFLAGS # Fix installation directories, ./configure doesn't seem to set them right sed -i -e 's:\$(PROJ_prefix)/etc/llvm:/etc/llvm:' \ @@ -48,7 +48,7 @@ do_configure() { } do_build() { - unset CC CXX CPP AR AS RANLIB CFLAGS LDFLAGS CPPFLAGS + unset CC CXX CPP AR AS RANLIB CFLAGS CXXFLAGS CPPFLAGS LDFLAGS cd build make ${makejobs}