2008-10-21 16:00:00 +02:00
|
|
|
LOCAL_PATH:= $(call my-dir)
|
|
|
|
|
|
|
|
#
|
|
|
|
# libdl
|
|
|
|
#
|
|
|
|
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
2012-08-13 23:06:05 +02:00
|
|
|
# NOTE: --exclude-libs=libgcc.a makes sure that any symbols libdl.so pulls from
|
2008-10-21 16:00:00 +02:00
|
|
|
# libgcc.a are made static to libdl.so. This in turn ensures that libraries that
|
|
|
|
# a) pull symbols from libgcc.a and b) depend on libdl.so will not rely on libdl.so
|
|
|
|
# to provide those symbols, but will instead pull them from libgcc.a. Specifically,
|
2012-08-13 23:06:05 +02:00
|
|
|
# we use this property to make sure libc.so has its own copy of the code from
|
2008-10-21 16:00:00 +02:00
|
|
|
# libgcc.a it uses.
|
|
|
|
#
|
|
|
|
# DO NOT REMOVE --exclude-libs!
|
|
|
|
|
2015-05-22 02:43:49 +02:00
|
|
|
LOCAL_LDFLAGS := -Wl,--exclude-libs=libgcc.a -Wl,--version-script=$(LOCAL_PATH)/libdl.map
|
2008-12-18 03:03:48 +01:00
|
|
|
|
|
|
|
# for x86, exclude libgcc_eh.a for the same reasons as above
|
2014-01-24 00:15:28 +01:00
|
|
|
LOCAL_LDFLAGS_x86 := -Wl,--exclude-libs=libgcc_eh.a
|
|
|
|
LOCAL_LDFLAGS_x86_64 := $(LOCAL_LDFLAGS_x86)
|
2008-12-18 03:03:48 +01:00
|
|
|
|
2008-10-21 16:00:00 +02:00
|
|
|
LOCAL_SRC_FILES:= libdl.c
|
2014-06-04 00:22:34 +02:00
|
|
|
LOCAL_CFLAGS := -Wall -Wextra -Wunused -Werror
|
2014-09-16 19:10:25 +02:00
|
|
|
LOCAL_CXX_STL := none
|
2008-10-21 16:00:00 +02:00
|
|
|
|
2014-01-15 02:25:13 +01:00
|
|
|
LOCAL_MODULE := libdl
|
2012-08-13 23:06:05 +02:00
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
2008-10-21 16:00:00 +02:00
|
|
|
|
|
|
|
# NOTE: libdl needs __aeabi_unwind_cpp_pr0 from libgcc.a but libgcc.a needs a
|
|
|
|
# few symbols from libc. Using --no-undefined here results in having to link
|
|
|
|
# against libc creating a circular dependency which is removed and we end up
|
|
|
|
# with missing symbols. Since this library is just a bunch of stubs, we set
|
|
|
|
# LOCAL_ALLOW_UNDEFINED_SYMBOLS to remove --no-undefined from the linker flags.
|
|
|
|
LOCAL_ALLOW_UNDEFINED_SYMBOLS := true
|
2012-08-13 23:06:05 +02:00
|
|
|
LOCAL_SYSTEM_SHARED_LIBRARIES :=
|
2008-10-21 16:00:00 +02:00
|
|
|
|
2014-12-18 17:03:49 +01:00
|
|
|
LOCAL_ADDRESS_SANITIZER := false
|
2008-10-21 16:00:00 +02:00
|
|
|
include $(BUILD_SHARED_LIBRARY)
|
2014-09-27 00:23:07 +02:00
|
|
|
|
|
|
|
# A dummy libdl.a. Need for static executables using the LLVM unwinder. Most
|
|
|
|
# functions default to failure, others use a sensible default (dl_iterate_phdr()
|
|
|
|
# returns 0, as would happen if the user iterated over every phdr).
|
|
|
|
include $(CLEAR_VARS)
|
|
|
|
LOCAL_SRC_FILES:= libdl.c
|
|
|
|
LOCAL_CFLAGS := -Wall -Wextra -Wunused -Werror
|
|
|
|
LOCAL_CXX_STL := none
|
|
|
|
|
|
|
|
LOCAL_MODULE := libdl
|
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
2014-12-18 17:03:49 +01:00
|
|
|
LOCAL_ADDRESS_SANITIZER := false
|
2014-09-27 00:23:07 +02:00
|
|
|
include $(BUILD_STATIC_LIBRARY)
|