diff --git a/core/definitions.mk b/core/definitions.mk index e216a7047..1b5556437 100644 --- a/core/definitions.mk +++ b/core/definitions.mk @@ -826,7 +826,9 @@ $(hide) $(BCC_COMPAT) -O3 -o $(dir $@)/$(notdir $(<:.bc=.o)) -fPIC -shared \ -rt-path $(PRIVATE_LIBCLCORE) $< $(hide) $(PRIVATE_CXX) -shared -Wl,-soname,$(notdir $@) -nostdlib \ -Wl,-rpath,\$$ORIGIN/../lib \ - $(dir $@)/$(notdir $(<:.bc=.o)) -o $@ -L prebuilts/gcc/ \ + $(dir $@)/$(notdir $(<:.bc=.o)) \ + $(PRIVATE_COMPILER_RT) \ + -o $@ -L prebuilts/gcc/ \ -L $(TARGET_OUT_INTERMEDIATE_LIBRARIES) -lRSSupport -lm endef diff --git a/core/java.mk b/core/java.mk index b0fc268c2..90861345f 100644 --- a/core/java.mk +++ b/core/java.mk @@ -209,13 +209,15 @@ $(rs_generated_bc) : $(RenderScript_file_stamp) rs_built_clcore := $(PRODUCT_OUT)/obj/SHARED_LIBRARIES/libclcore.bc_intermediates/libclcore.bc rs_support_lib := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/libRSSupport.so rs_jni_lib := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/librsjni.so +rs_compiler_rt := $(call intermediates-dir-for,STATIC_LIBRARIES,libcompiler-rt)/libcompiler-rt.a LOCAL_JNI_SHARED_LIBRARIES += libRSSupport librsjni $(rs_compatibility_jni_libs): $(RenderScript_file_stamp) $(rs_compatibility_jni_libs): $(BCC_COMPAT) $(rs_built_clcore) -$(rs_compatibility_jni_libs): $(rs_support_lib) $(rs_jni_lib) +$(rs_compatibility_jni_libs): $(rs_support_lib) $(rs_jni_lib) $(rs_compiler_rt) $(rs_compatibility_jni_libs): PRIVATE_CXX := $(TARGET_CXX) $(rs_compatibility_jni_libs): PRIVATE_LIBCLCORE := $(rs_built_clcore) +$(rs_compatibility_jni_libs): PRIVATE_COMPILER_RT := $(rs_compiler_rt) $(rs_compatibility_jni_libs): $(renderscript_intermediate)/lib%.so: \ $(renderscript_intermediate)/res/raw/%.bc $(transform-bc-to-so)