summaryrefslogtreecommitdiff
path: root/debian/patches/compiler-rt-i586.diff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2017-10-15 15:41:01 +0300
committerIgor Pashev <pashev.igor@gmail.com>2017-10-15 15:41:01 +0300
commit7a2b43796a4c38cf98fe05e8e4ec985318b2721b (patch)
treeb0f5611276e10646b654f7d5ed12c6e6060353be /debian/patches/compiler-rt-i586.diff
downloadllvm-toolchain-5.0-debian.tar.gz
Imported llvm-toolchain-5.0 (1:5.0-4)debian/5.0-4debian
Diffstat (limited to 'debian/patches/compiler-rt-i586.diff')
-rw-r--r--debian/patches/compiler-rt-i586.diff34
1 files changed, 34 insertions, 0 deletions
diff --git a/debian/patches/compiler-rt-i586.diff b/debian/patches/compiler-rt-i586.diff
new file mode 100644
index 0000000..d2c754a
--- /dev/null
+++ b/debian/patches/compiler-rt-i586.diff
@@ -0,0 +1,34 @@
+Index: llvm-toolchain-snapshot-3.8~svn249990/compiler-rt/make/platform/clang_linux.mk
+===================================================================
+--- llvm-toolchain-snapshot-3.8~svn249990.orig/compiler-rt/make/platform/clang_linux.mk
++++ llvm-toolchain-snapshot-3.8~svn249990/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 i686,$(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 i686))
+ SupportedArches := i386
+ ifeq ($(call TryCompile,$(CC),$(test_source),-m64),0)
+ SupportedArches += x86_64
+Index: llvm-toolchain-snapshot-3.8~svn249990/clang/runtime/compiler-rt/Makefile
+===================================================================
+--- llvm-toolchain-snapshot-3.8~svn249990.orig/clang/runtime/compiler-rt/Makefile
++++ llvm-toolchain-snapshot-3.8~svn249990/clang/runtime/compiler-rt/Makefile
+@@ -161,6 +161,7 @@ BuildRuntimeLibraries:
+ ProjSrcRoot=$(COMPILERRT_SRC_ROOT) \
+ ProjObjRoot=$(PROJ_OBJ_DIR) \
+ CC="$(ToolDir)/clang" \
++ LD_LIBRARY_PATH=../build-llvm/Release/lib \
+ VERBOSE=$(VERBOSE) \
+ $(RuntimeDirs:%=clang_%)
+ .PHONY: BuildRuntimeLibraries