diff --git a/debian/changelog b/debian/changelog index 4087d6ca..3e249bc4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ llvm-toolchain-snapshot (1:3.7~svn229332-1~exp1) experimental; urgency=medium * New snapshot release * Support of gcc 5.0 (Closes: #777988) + * compiler-rt-i586.diff: fix a build issue of compiler-rt under i386 -- Sylvestre Ledru Sun, 15 Feb 2015 22:22:15 +0100 diff --git a/debian/patches/compiler-rt-i586.diff b/debian/patches/compiler-rt-i586.diff new file mode 100644 index 00000000..cf1f1b9b --- /dev/null +++ b/debian/patches/compiler-rt-i586.diff @@ -0,0 +1,34 @@ +Index: llvm-toolchain-snapshot_3.7~svn229332/compiler-rt/make/platform/clang_linux.mk +=================================================================== +--- llvm-toolchain-snapshot_3.7~svn229332.orig/compiler-rt/make/platform/clang_linux.mk ++++ llvm-toolchain-snapshot_3.7~svn229332/compiler-rt/make/platform/clang_linux.mk +@@ -21,7 +21,7 @@ ifneq ($(findstring -linux-,$(CompilerTa + + # Define configs only if arch in triple is i386 or x86_64 + CompilerTargetArch := $(firstword $(subst -, ,$(CompilerTargetTriple))) +-ifeq ($(call contains,i386 x86_64,$(CompilerTargetArch)),true) ++ifeq ($(call contains,i386 x86_64 i586,$(CompilerTargetArch)),true) + + # TryCompile compiler source flags + # Returns exit code of running a compiler invocation. +@@ -35,7 +35,7 @@ TryCompile = \ + echo $$?) + + test_source = $(ProjSrcRoot)/make/platform/clang_linux_test_input.c +-ifeq ($(CompilerTargetArch),i386) ++ifneq (,$(filter $(CompilerTargetArch),i386 i586)) + SupportedArches := i386 + ifeq ($(call TryCompile,$(CC),$(test_source),-m64),0) + SupportedArches += x86_64 +Index: llvm-toolchain-snapshot_3.7~svn229332/tools/clang/runtime/compiler-rt/Makefile +=================================================================== +--- llvm-toolchain-snapshot_3.7~svn229332.orig/tools/clang/runtime/compiler-rt/Makefile ++++ llvm-toolchain-snapshot_3.7~svn229332/tools/clang/runtime/compiler-rt/Makefile +@@ -165,6 +165,7 @@ BuildRuntimeLibraries: + ProjSrcRoot=$(COMPILERRT_SRC_ROOT) \ + ProjObjRoot=$(PROJ_OBJ_DIR) \ + CC="$(ToolDir)/clang" \ ++ LD_LIBRARY_PATH=../build-llvm/Release/lib \ + VERBOSE=$(VERBOSE) \ + LLVM_ANDROID_TOOLCHAIN_DIR="$(LLVM_ANDROID_TOOLCHAIN_DIR)" \ + $(RuntimeDirs:%=clang_%) diff --git a/debian/patches/series b/debian/patches/series index 3b3febf3..778d4874 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -36,3 +36,4 @@ silent-MCJIIT-tests.diff lldb-libname.diff strip-svn.diff lit-lang.diff +compiler-rt-i586.diff