From 4449d80c053f8a0d08b2a2c4ff5c467ec763eefd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Tue, 9 Aug 2016 16:31:38 +0300 Subject: [PATCH] Patch compiler-rt to fix "make clang_mingw" with the 3.9 branch --- Dockerfile | 3 ++ patches/compiler-rt-0001.patch | 55 ++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 patches/compiler-rt-0001.patch diff --git a/Dockerfile b/Dockerfile index 4b30089..30af56d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -108,6 +108,9 @@ RUN cp /build/mingw-w64/mingw-w64-libraries/winpthreads/include/* $MINGW_PREFIX/ #Work around upstream issue with capital W windows.h RUN ln -s /build/prefix/armv7-w64-mingw32/include/windows.h /build/prefix/armv7-w64-mingw32/include/Windows.h +RUN cd compiler-rt && \ + git am /build/patches/compiler-rt-*.patch + # Manually build compiler-rt as a standalone project RUN cd compiler-rt && \ make clang_mingw-builtins-arm diff --git a/patches/compiler-rt-0001.patch b/patches/compiler-rt-0001.patch new file mode 100644 index 0000000..725b786 --- /dev/null +++ b/patches/compiler-rt-0001.patch @@ -0,0 +1,55 @@ +From 1e1bd1b7ddb2b259a88fcdc3fdeea6fad16d3b11 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Martin=20Storsj=C3=B6?= +Date: Tue, 9 Aug 2016 23:50:59 +0300 +Subject: [PATCH] Fix "make clang_mingw-builtins-arm" with latest master + +This does the same to clang_linux.mk as was done in SVN rev +258863, git mirror commit 20da67f8d3f8. +--- + make/platform/clang_linux.mk | 14 ++------------ + 1 file changed, 2 insertions(+), 12 deletions(-) + +diff --git a/make/platform/clang_linux.mk b/make/platform/clang_linux.mk +index 870209f..6dce2e1 100644 +--- a/make/platform/clang_linux.mk ++++ b/make/platform/clang_linux.mk +@@ -49,16 +49,14 @@ endif + + # Build runtime libraries for i386. + ifeq ($(call contains,$(SupportedArches),i386),true) +-Configs += builtins-i386 profile-i386 ++Configs += builtins-i386 + Arch.builtins-i386 := i386 +-Arch.profile-i386 := i386 + endif + + # Build runtime libraries for x86_64. + ifeq ($(call contains,$(SupportedArches),x86_64),true) +-Configs += builtins-x86_64 profile-x86_64 ++Configs += builtins-x86_64 + Arch.builtins-x86_64 := x86_64 +-Arch.profile-x86_64 := x86_64 + endif + + endif +@@ -71,17 +69,9 @@ CFLAGS := -Wall -Werror -O3 -fomit-frame-pointer + + CFLAGS.builtins-i386 := $(CFLAGS) -m32 + CFLAGS.builtins-x86_64 := $(CFLAGS) -m64 +-CFLAGS.profile-i386 := $(CFLAGS) -m32 +-CFLAGS.profile-x86_64 := $(CFLAGS) -m64 + + FUNCTIONS.builtins-i386 := $(CommonFunctions) $(ArchFunctions.i386) + FUNCTIONS.builtins-x86_64 := $(CommonFunctions) $(ArchFunctions.x86_64) +-FUNCTIONS.profile-i386 := GCDAProfiling InstrProfiling InstrProfilingBuffer \ +- InstrProfilingFile InstrProfilingPlatformOther \ +- InstrProfilingRuntime InstrProfilingUtil \ +- InstrProfilingWriter InstrProfilingValue \ +- InstrProfilingMerge InstrProfilingMergeFile +-FUNCTIONS.profile-x86_64 := $(FUNCTIONS.profile-i386) + + # Always use optimized variants. + OPTIMIZED := 1 +-- +2.7.4 +