diff --git a/core/clang/TARGET_arm.mk b/core/clang/TARGET_arm.mk index 575b9f9417..59ed41f98e 100644 --- a/core/clang/TARGET_arm.mk +++ b/core/clang/TARGET_arm.mk @@ -54,3 +54,4 @@ $(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_LDFLAGS := \ $(clang_2nd_arch_prefix)RS_TRIPLE := armv7-none-linux-gnueabi $(clang_2nd_arch_prefix)RS_TRIPLE_CFLAGS := +RS_COMPAT_TRIPLE := armv7-none-linux-gnueabi diff --git a/core/clang/TARGET_arm64.mk b/core/clang/TARGET_arm64.mk index 02643214bc..6f9e5406ab 100644 --- a/core/clang/TARGET_arm64.mk +++ b/core/clang/TARGET_arm64.mk @@ -52,3 +52,4 @@ CLANG_TARGET_GLOBAL_LDFLAGS := \ RS_TRIPLE := aarch64-linux-android RS_TRIPLE_CFLAGS := +RS_COMPAT_TRIPLE := aarch64-linux-android diff --git a/core/clang/TARGET_mips.mk b/core/clang/TARGET_mips.mk index 011c2a607a..91067f58a2 100644 --- a/core/clang/TARGET_mips.mk +++ b/core/clang/TARGET_mips.mk @@ -52,3 +52,4 @@ $(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_LDFLAGS := \ $(clang_2nd_arch_prefix)RS_TRIPLE := armv7-none-linux-gnueabi $(clang_2nd_arch_prefix)RS_TRIPLE_CFLAGS := +RS_COMPAT_TRIPLE := mipsel-linux-android diff --git a/core/clang/TARGET_mips64.mk b/core/clang/TARGET_mips64.mk index a5e29d29a4..ab69aedab1 100644 --- a/core/clang/TARGET_mips64.mk +++ b/core/clang/TARGET_mips64.mk @@ -52,3 +52,4 @@ CLANG_TARGET_GLOBAL_LDFLAGS := \ RS_TRIPLE := aarch64-linux-android RS_TRIPLE_CFLAGS := +RS_COMPAT_TRIPLE := mips64el-linux-android diff --git a/core/clang/TARGET_x86.mk b/core/clang/TARGET_x86.mk index da7a223823..60ee06fdaa 100644 --- a/core/clang/TARGET_x86.mk +++ b/core/clang/TARGET_x86.mk @@ -54,3 +54,4 @@ $(clang_2nd_arch_prefix)CLANG_TARGET_GLOBAL_LDFLAGS := \ $(clang_2nd_arch_prefix)RS_TRIPLE := armv7-none-linux-gnueabi $(clang_2nd_arch_prefix)RS_TRIPLE_CFLAGS := -D__i386__ +RS_COMPAT_TRIPLE := i686-linux-android diff --git a/core/clang/TARGET_x86_64.mk b/core/clang/TARGET_x86_64.mk index cc1f59ff88..5561e42490 100644 --- a/core/clang/TARGET_x86_64.mk +++ b/core/clang/TARGET_x86_64.mk @@ -52,3 +52,4 @@ CLANG_TARGET_GLOBAL_LDFLAGS := \ RS_TRIPLE := aarch64-linux-android RS_TRIPLE_CFLAGS := -D__x86_64__ +RS_COMPAT_TRIPLE := x86_64-linux-android diff --git a/core/definitions.mk b/core/definitions.mk index 9b8a29995e..74fa03857f 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -879,7 +879,7 @@ define transform-bc-to-so @echo "Renderscript compatibility: $(notdir $@) <= $(notdir $<)" $(hide) mkdir -p $(dir $@) $(hide) $(BCC_COMPAT) -O3 -o $(dir $@)/$(notdir $(<:.bc=.o)) -fPIC -shared \ - -rt-path $(RS_PREBUILT_CLCORE) -mtriple $(RS_TRIPLE) $< + -rt-path $(RS_PREBUILT_CLCORE) -mtriple $(RS_COMPAT_TRIPLE) $< $(hide) $(PRIVATE_CXX) -shared -Wl,-soname,$(notdir $@) -nostdlib \ -Wl,-rpath,\$$ORIGIN/../lib \ $(dir $@)/$(notdir $(<:.bc=.o)) \