Build rules for Renderscript compatibility library.

Bug: 7419958
Change-Id: I2e0f0bb632e6ff22b2cf1a1b96b28364637995cc
diff --git a/core/definitions.mk b/core/definitions.mk
index 319b63e..96cc0cc 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -819,6 +819,16 @@
 $(hide) touch $@
 endef
 
+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) $(PRIVATE_CXX) -shared -Wl,-soname,$(notdir $@) \
+	$(dir $@)/$(notdir $(<:.bc=.o)) -o $@ -L prebuilts/gcc/ \
+	-L $(TARGET_OUT_INTERMEDIATE_LIBRARIES) -lRSSupport -lm
+endef
+
 ###########################################################
 ## Commands to compile RenderScript to C++
 ###########################################################