Merge "Correctly set the linker search path for libm and libc." am: b463cdc874
am: 6062710fed
am: e277ce63f8
Change-Id: Ib34fe4f4f47f68cbdf0271c61f5102b35a4db9f0
This commit is contained in:
commit
1d6d78ef38
3 changed files with 12 additions and 9 deletions
|
@ -868,12 +868,6 @@ endif
|
|||
|
||||
RS_PREBUILT_CLCORE := prebuilts/sdk/renderscript/lib/$(TARGET_ARCH)/librsrt_$(TARGET_ARCH).bc
|
||||
RS_PREBUILT_COMPILER_RT := prebuilts/sdk/renderscript/lib/$(TARGET_ARCH)/libcompiler_rt.a
|
||||
ifeq (true,$(TARGET_IS_64_BIT))
|
||||
RS_PREBUILT_LIBPATH := -L prebuilts/ndk/r10/platforms/android-21/arch-$(TARGET_ARCH)/usr/lib64 \
|
||||
-L prebuilts/ndk/r10/platforms/android-21/arch-$(TARGET_ARCH)/usr/lib
|
||||
else
|
||||
RS_PREBUILT_LIBPATH := -L prebuilts/ndk/r10/platforms/android-9/arch-$(TARGET_ARCH)/usr/lib
|
||||
endif
|
||||
|
||||
# API Level lists for Renderscript Compat lib.
|
||||
RSCOMPAT_32BIT_ONLY_API_LEVELS := 8 9 10 11 12 13 14 15 16 17 18 19 20
|
||||
|
|
|
@ -1056,8 +1056,9 @@ $(hide) $(PRIVATE_CXX) -shared -Wl,-soname,$(notdir $@) -nostdlib \
|
|||
-Wl,-rpath,\$$ORIGIN/../lib \
|
||||
$(dir $@)/$(notdir $(<:.bc=.o)) \
|
||||
$(RS_PREBUILT_COMPILER_RT) \
|
||||
-o $@ $(TARGET_GLOBAL_LDFLAGS) -Wl,--hash-style=sysv -L prebuilts/gcc/ \
|
||||
$(RS_PREBUILT_LIBPATH) \
|
||||
-o $@ $(TARGET_GLOBAL_LDFLAGS) -Wl,--hash-style=sysv \
|
||||
-L $(SOONG_OUT_DIR)/ndk/platforms/android-$(PRIVATE_SDK_VERSION)/arch-$(TARGET_ARCH)/usr/lib64 \
|
||||
-L $(SOONG_OUT_DIR)/ndk/platforms/android-$(PRIVATE_SDK_VERSION)/arch-$(TARGET_ARCH)/usr/lib \
|
||||
$(call intermediates-dir-for,SHARED_LIBRARIES,libRSSupport)/libRSSupport.so \
|
||||
-lm -lc
|
||||
endef
|
||||
|
|
10
core/java.mk
10
core/java.mk
|
@ -299,13 +299,21 @@ rs_support_io_lib := $(TARGET_OUT_INTERMEDIATE_LIBRARIES)/libRSSupportIO.so
|
|||
LOCAL_JNI_SHARED_LIBRARIES += libRSSupportIO
|
||||
endif
|
||||
|
||||
my_arch := $(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)
|
||||
ifneq (,$(filter arm64 mips64 x86_64,$(my_arch)))
|
||||
my_min_sdk_version := 21
|
||||
else
|
||||
my_min_sdk_version := $(MIN_SUPPORTED_SDK_VERSION)
|
||||
endif
|
||||
|
||||
$(rs_compatibility_jni_libs): $(RenderScript_file_stamp) $(RS_PREBUILT_CLCORE) \
|
||||
$(rs_support_lib) $(rs_support_io_lib) $(rs_jni_lib) $(rs_compiler_rt)
|
||||
$(rs_compatibility_jni_libs): $(BCC_COMPAT)
|
||||
$(rs_compatibility_jni_libs): PRIVATE_CXX := $(CXX_WRAPPER) $(TARGET_CXX)
|
||||
$(rs_compatibility_jni_libs): PRIVATE_SDK_VERSION := $(my_min_sdk_version)
|
||||
$(rs_compatibility_jni_libs): $(renderscript_intermediate)/librs.%.so: \
|
||||
$(renderscript_intermediate.bc_folder)%.bc
|
||||
$(renderscript_intermediate.bc_folder)%.bc \
|
||||
$(SOONG_OUT_DIR)/ndk.timestamp
|
||||
$(transform-bc-to-so)
|
||||
|
||||
endif
|
||||
|
|
Loading…
Reference in a new issue