2014-04-01 20:41:36 +02:00
|
|
|
LOCAL_PATH := $(call my-dir)
|
2009-03-04 04:28:35 +01:00
|
|
|
|
2014-03-27 18:45:57 +01:00
|
|
|
include $(CLEAR_VARS)
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES:= \
|
|
|
|
debugger.cpp \
|
|
|
|
dlfcn.cpp \
|
|
|
|
linker.cpp \
|
2014-05-06 01:49:04 +02:00
|
|
|
linker_allocator.cpp \
|
2014-03-27 18:45:57 +01:00
|
|
|
linker_environ.cpp \
|
|
|
|
linker_phdr.cpp \
|
|
|
|
rt.cpp \
|
|
|
|
|
|
|
|
LOCAL_SRC_FILES_arm := arch/arm/begin.S
|
|
|
|
LOCAL_SRC_FILES_arm64 := arch/arm64/begin.S
|
|
|
|
LOCAL_SRC_FILES_x86 := arch/x86/begin.c
|
|
|
|
LOCAL_SRC_FILES_x86_64 := arch/x86_64/begin.S
|
|
|
|
LOCAL_SRC_FILES_mips := arch/mips/begin.S
|
2014-06-13 02:49:04 +02:00
|
|
|
LOCAL_SRC_FILES_mips64 := arch/mips64/begin.S
|
2014-03-27 18:45:57 +01:00
|
|
|
|
|
|
|
LOCAL_LDFLAGS := \
|
|
|
|
-shared \
|
|
|
|
-Wl,-Bsymbolic \
|
|
|
|
-Wl,--exclude-libs,ALL \
|
|
|
|
|
|
|
|
LOCAL_CFLAGS += \
|
|
|
|
-fno-stack-protector \
|
|
|
|
-Wstrict-overflow=5 \
|
|
|
|
-fvisibility=hidden \
|
2014-06-04 00:22:34 +02:00
|
|
|
-Wall -Wextra -Wunused -Werror \
|
2014-03-27 18:45:57 +01:00
|
|
|
|
|
|
|
LOCAL_CONLYFLAGS += \
|
|
|
|
-std=gnu99 \
|
|
|
|
|
|
|
|
LOCAL_CPPFLAGS += \
|
|
|
|
-std=gnu++11 \
|
|
|
|
|
|
|
|
# We need to access Bionic private headers in the linker.
|
|
|
|
LOCAL_CFLAGS += -I$(LOCAL_PATH)/../libc/
|
|
|
|
|
|
|
|
# we don't want crtbegin.o (because we have begin.o), so unset it
|
|
|
|
# just for this module
|
|
|
|
LOCAL_NO_CRT := true
|
|
|
|
# TODO: split out the asflags.
|
|
|
|
LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
|
|
|
|
|
|
|
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk $(LOCAL_PATH)/linker_executable.mk
|
|
|
|
|
|
|
|
LOCAL_STATIC_LIBRARIES := libc_nomalloc
|
|
|
|
|
|
|
|
LOCAL_FORCE_STATIC_EXECUTABLE := true # not necessary when not including BUILD_EXECUTABLE
|
|
|
|
|
|
|
|
LOCAL_2ND_ARCH_VAR_PREFIX := $(linker_2nd_arch_var_prefix)
|
|
|
|
|
|
|
|
LOCAL_MODULE := linker
|
|
|
|
LOCAL_MODULE_STEM_32 := linker
|
|
|
|
LOCAL_MODULE_STEM_64 := linker64
|
|
|
|
LOCAL_MULTILIB := both
|
2013-10-17 22:06:20 +02:00
|
|
|
|
2014-08-15 00:46:36 +02:00
|
|
|
# Leave the symbols in the shared library so that stack unwinders can produce
|
|
|
|
# meaningful name resolution.
|
|
|
|
LOCAL_STRIP_MODULE := keep_symbols
|
|
|
|
|
2014-03-27 18:45:57 +01:00
|
|
|
include $(LOCAL_PATH)/linker_executable.mk
|
2014-02-13 06:58:47 +01:00
|
|
|
ifdef TARGET_2ND_ARCH
|
2014-03-27 18:45:57 +01:00
|
|
|
LOCAL_2ND_ARCH_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX)
|
|
|
|
OVERRIDE_BUILT_MODULE_PATH :=
|
|
|
|
LOCAL_BUILT_MODULE :=
|
|
|
|
LOCAL_INSTALLED_MODULE :=
|
|
|
|
LOCAL_MODULE_STEM :=
|
|
|
|
LOCAL_BUILT_MODULE_STEM :=
|
|
|
|
LOCAL_INSTALLED_MODULE_STEM :=
|
|
|
|
LOCAL_INTERMEDIATE_TARGETS :=
|
|
|
|
include $(LOCAL_PATH)/linker_executable.mk
|
2013-10-08 19:05:05 +02:00
|
|
|
endif
|
2014-05-06 01:49:04 +02:00
|
|
|
|
|
|
|
include $(call first-makefiles-under,$(LOCAL_PATH))
|