llvm: add patch to workaround GCC internal compiler error in cross builds.

This commit is contained in:
Juan RP 2014-01-07 12:17:38 +01:00
parent be01bb25ec
commit e56cc9579a
2 changed files with 25 additions and 3 deletions

View File

@ -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 <http://gcc.gnu.org/bugs.html> 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,

View File

@ -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}