]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android-sdk/platform-bionic.git/blob - linker/Android.mk
Merge "Add a flag control that PRIVATE libm can be chosen"
[android-sdk/platform-bionic.git] / linker / Android.mk
1 LOCAL_PATH := $(call my-dir)
3 include $(CLEAR_VARS)
5 LOCAL_SRC_FILES:= \
6     debugger.cpp \
7     dlfcn.cpp \
8     linker.cpp \
9     linker_allocator.cpp \
10     linker_environ.cpp \
11     linker_phdr.cpp \
12     rt.cpp \
14 LOCAL_SRC_FILES_arm     := arch/arm/begin.S
15 LOCAL_SRC_FILES_arm64   := arch/arm64/begin.S
16 LOCAL_SRC_FILES_x86     := arch/x86/begin.c
17 LOCAL_SRC_FILES_x86_64  := arch/x86_64/begin.S
18 LOCAL_SRC_FILES_mips    := arch/mips/begin.S
19 LOCAL_SRC_FILES_mips64  := arch/mips64/begin.S
21 LOCAL_LDFLAGS := \
22     -shared \
23     -Wl,-Bsymbolic \
24     -Wl,--exclude-libs,ALL \
26 LOCAL_CFLAGS += \
27     -fno-stack-protector \
28     -Wstrict-overflow=5 \
29     -fvisibility=hidden \
30     -Wall -Wextra -Wunused -Werror \
32 LOCAL_CONLYFLAGS += \
33     -std=gnu99 \
35 LOCAL_CPPFLAGS += \
36     -std=gnu++11 \
38 # We need to access Bionic private headers in the linker.
39 LOCAL_CFLAGS += -I$(LOCAL_PATH)/../libc/
41 # we don't want crtbegin.o (because we have begin.o), so unset it
42 # just for this module
43 LOCAL_NO_CRT := true
44 # TODO: split out the asflags.
45 LOCAL_ASFLAGS := $(LOCAL_CFLAGS)
47 LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk $(LOCAL_PATH)/linker_executable.mk
49 LOCAL_STATIC_LIBRARIES := libc_nomalloc
51 LOCAL_FORCE_STATIC_EXECUTABLE := true # not necessary when not including BUILD_EXECUTABLE
53 LOCAL_2ND_ARCH_VAR_PREFIX := $(linker_2nd_arch_var_prefix)
55 LOCAL_MODULE := linker
56 LOCAL_MODULE_STEM_32 := linker
57 LOCAL_MODULE_STEM_64 := linker64
58 LOCAL_MULTILIB := both
60 include $(LOCAL_PATH)/linker_executable.mk
61 ifdef TARGET_2ND_ARCH
62 LOCAL_2ND_ARCH_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX)
63 OVERRIDE_BUILT_MODULE_PATH :=
64 LOCAL_BUILT_MODULE :=
65 LOCAL_INSTALLED_MODULE :=
66 LOCAL_MODULE_STEM :=
67 LOCAL_BUILT_MODULE_STEM :=
68 LOCAL_INSTALLED_MODULE_STEM :=
69 LOCAL_INTERMEDIATE_TARGETS :=
70 include $(LOCAL_PATH)/linker_executable.mk
71 endif
73 include $(call first-makefiles-under,$(LOCAL_PATH))