Clean up libRSSupport.so and libclcore.bc dependencies.
Bug: 7419958
Change-Id: I62453bb6830cc2c82ca9dbbf576b52da95eef4b1
diff --git a/core/definitions.mk b/core/definitions.mk
index 93810ef..e216a70 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -822,9 +822,10 @@
define transform-bc-to-so
@echo "Renderscript compatibility"
$(hide) mkdir -p $(dir $@)
-$(hide) $(BCC_COMPAT) -o $(dir $@)/$(notdir $(<:.bc=.o)) -fPIC -shared \
- -rt-path $(TARGET_OUT_SHARED_LIBRARIES)/libclcore.bc $<
+$(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/ \
-L $(TARGET_OUT_INTERMEDIATE_LIBRARIES) -lRSSupport -lm
endef