| Jean-Baptiste Queru | 9b4a812 | 2010-02-23 12:36:56 -0800 | [diff] [blame] | 1 | # | 
 | 2 | # Copyright (C) 2006 The Android Open Source Project | 
 | 3 | # | 
 | 4 | # Licensed under the Apache License, Version 2.0 (the "License"); | 
 | 5 | # you may not use this file except in compliance with the License. | 
 | 6 | # You may obtain a copy of the License at | 
 | 7 | # | 
 | 8 | #      http://www.apache.org/licenses/LICENSE-2.0 | 
 | 9 | # | 
 | 10 | # Unless required by applicable law or agreed to in writing, software | 
 | 11 | # distributed under the License is distributed on an "AS IS" BASIS, | 
 | 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
 | 13 | # See the License for the specific language governing permissions and | 
 | 14 | # limitations under the License. | 
 | 15 | # | 
 | 16 |  | 
| The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 17 | # Configuration for Linux on ARM. | 
| Jean-Baptiste Queru | 9b4a812 | 2010-02-23 12:36:56 -0800 | [diff] [blame] | 18 | # Included by combo/select.mk | 
| The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 19 |  | 
| David 'Digit' Turner | d53c81d | 2009-05-29 15:34:02 +0200 | [diff] [blame] | 20 | # You can set TARGET_ARCH_VARIANT to use an arch version other | 
 | 21 | # than ARMv5TE. Each value should correspond to a file named | 
 | 22 | # $(BUILD_COMBOS)/arch/<name>.mk which must contain | 
 | 23 | # makefile variable definitions similar to the preprocessor | 
| Ben Leslie | e03f023 | 2008-10-30 10:41:09 -0500 | [diff] [blame] | 24 | # defines in system/core/include/arch/<combo>/AndroidConfig.h. Their | 
| David 'Digit' Turner | d53c81d | 2009-05-29 15:34:02 +0200 | [diff] [blame] | 25 | # purpose is to allow module Android.mk files to selectively compile | 
 | 26 | # different versions of code based upon the funtionality and | 
| Ben Leslie | e03f023 | 2008-10-30 10:41:09 -0500 | [diff] [blame] | 27 | # instructions available in a given architecture version. | 
 | 28 | # | 
| David 'Digit' Turner | d53c81d | 2009-05-29 15:34:02 +0200 | [diff] [blame] | 29 | # The blocks also define specific arch_variant_cflags, which | 
| Ben Leslie | e03f023 | 2008-10-30 10:41:09 -0500 | [diff] [blame] | 30 | # include defines, and compiler settings for the given architecture | 
 | 31 | # version. | 
 | 32 | # | 
| David 'Digit' Turner | d53c81d | 2009-05-29 15:34:02 +0200 | [diff] [blame] | 33 | ifeq ($(strip $(TARGET_ARCH_VARIANT)),) | 
 | 34 | TARGET_ARCH_VARIANT := armv5te | 
| Ben Leslie | e03f023 | 2008-10-30 10:41:09 -0500 | [diff] [blame] | 35 | endif | 
| David 'Digit' Turner | d53c81d | 2009-05-29 15:34:02 +0200 | [diff] [blame] | 36 |  | 
 | 37 | TARGET_ARCH_SPECIFIC_MAKEFILE := $(BUILD_COMBOS)/arch/$(TARGET_ARCH)/$(TARGET_ARCH_VARIANT).mk | 
 | 38 | ifeq ($(strip $(wildcard $(TARGET_ARCH_SPECIFIC_MAKEFILE))),) | 
 | 39 | $(error Unknown ARM architecture version: $(TARGET_ARCH_VARIANT)) | 
| Andy McFadden | 8f51a2a | 2009-05-28 12:47:23 -0700 | [diff] [blame] | 40 | endif | 
| Ben Leslie | e03f023 | 2008-10-30 10:41:09 -0500 | [diff] [blame] | 41 |  | 
| David 'Digit' Turner | d53c81d | 2009-05-29 15:34:02 +0200 | [diff] [blame] | 42 | include $(TARGET_ARCH_SPECIFIC_MAKEFILE) | 
 | 43 |  | 
| The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 44 | # You can set TARGET_TOOLS_PREFIX to get gcc from somewhere else | 
| Jean-Baptiste Queru | 9b4a812 | 2010-02-23 12:36:56 -0800 | [diff] [blame] | 45 | ifeq ($(strip $(TARGET_TOOLS_PREFIX)),) | 
 | 46 | TARGET_TOOLS_PREFIX := \ | 
| Jing Yu | ada132a | 2010-06-16 20:17:19 -0700 | [diff] [blame] | 47 | 	prebuilt/$(HOST_PREBUILT_TAG)/toolchain/arm-eabi-4.4.3/bin/arm-eabi- | 
| The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 48 | endif | 
 | 49 |  | 
| Jean-Baptiste Queru | 9b4a812 | 2010-02-23 12:36:56 -0800 | [diff] [blame] | 50 | TARGET_CC := $(TARGET_TOOLS_PREFIX)gcc$(HOST_EXECUTABLE_SUFFIX) | 
 | 51 | TARGET_CXX := $(TARGET_TOOLS_PREFIX)g++$(HOST_EXECUTABLE_SUFFIX) | 
 | 52 | TARGET_AR := $(TARGET_TOOLS_PREFIX)ar$(HOST_EXECUTABLE_SUFFIX) | 
 | 53 | TARGET_OBJCOPY := $(TARGET_TOOLS_PREFIX)objcopy$(HOST_EXECUTABLE_SUFFIX) | 
 | 54 | TARGET_LD := $(TARGET_TOOLS_PREFIX)ld$(HOST_EXECUTABLE_SUFFIX) | 
| The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 55 |  | 
| Jean-Baptiste Queru | 9b4a812 | 2010-02-23 12:36:56 -0800 | [diff] [blame] | 56 | TARGET_NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined | 
| The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 57 |  | 
| Dave Bort | 9528248 | 2009-04-23 18:44:55 -0700 | [diff] [blame] | 58 | TARGET_arm_CFLAGS :=    -O2 \ | 
 | 59 |                         -fomit-frame-pointer \ | 
 | 60 |                         -fstrict-aliasing    \ | 
 | 61 |                         -funswitch-loops     \ | 
 | 62 |                         -finline-limit=300 | 
| The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 63 |  | 
| David 'Digit' Turner | d53c81d | 2009-05-29 15:34:02 +0200 | [diff] [blame] | 64 | # Modules can choose to compile some source as thumb. As | 
| Ben Leslie | e03f023 | 2008-10-30 10:41:09 -0500 | [diff] [blame] | 65 | # non-thumb enabled targets are supported, this is treated | 
 | 66 | # as a 'hint'. If thumb is not enabled, these files are just | 
 | 67 | # compiled as ARM. | 
 | 68 | ifeq ($(ARCH_ARM_HAVE_THUMB_SUPPORT),true) | 
| Dave Bort | 9528248 | 2009-04-23 18:44:55 -0700 | [diff] [blame] | 69 | TARGET_thumb_CFLAGS :=  -mthumb \ | 
 | 70 |                         -Os \ | 
 | 71 |                         -fomit-frame-pointer \ | 
 | 72 |                         -fno-strict-aliasing \ | 
 | 73 |                         -finline-limit=64 | 
| Ben Leslie | e03f023 | 2008-10-30 10:41:09 -0500 | [diff] [blame] | 74 | else | 
| Dave Bort | 8acd848 | 2009-05-05 17:04:20 -0700 | [diff] [blame] | 75 | TARGET_thumb_CFLAGS := $(TARGET_arm_CFLAGS) | 
| Ben Leslie | e03f023 | 2008-10-30 10:41:09 -0500 | [diff] [blame] | 76 | endif | 
| The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 77 |  | 
| Dave Bort | 9528248 | 2009-04-23 18:44:55 -0700 | [diff] [blame] | 78 | # Set FORCE_ARM_DEBUGGING to "true" in your buildspec.mk | 
 | 79 | # or in your environment to force a full arm build, even for | 
 | 80 | # files that are normally built as thumb; this can make | 
 | 81 | # gdb debugging easier.  Don't forget to do a clean build. | 
 | 82 | # | 
 | 83 | # NOTE: if you try to build a -O0 build with thumb, several | 
| The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 84 | # of the libraries (libpv, libwebcore, libkjs) need to be built | 
 | 85 | # with -mlong-calls.  When built at -O0, those libraries are | 
 | 86 | # too big for a thumb "BL <label>" to go from one end to the other. | 
| Dave Bort | 9528248 | 2009-04-23 18:44:55 -0700 | [diff] [blame] | 87 | ifeq ($(FORCE_ARM_DEBUGGING),true) | 
| Dave Bort | 8acd848 | 2009-05-05 17:04:20 -0700 | [diff] [blame] | 88 |   TARGET_arm_CFLAGS += -fno-omit-frame-pointer -fno-strict-aliasing | 
| Dave Bort | 9528248 | 2009-04-23 18:44:55 -0700 | [diff] [blame] | 89 |   TARGET_thumb_CFLAGS += -marm -fno-omit-frame-pointer | 
 | 90 | endif | 
| The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 91 |  | 
| Ben Leslie | e03f023 | 2008-10-30 10:41:09 -0500 | [diff] [blame] | 92 | android_config_h := $(call select-android-config-h,linux-arm) | 
 | 93 | arch_include_dir := $(dir $(android_config_h)) | 
| The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 94 |  | 
| Jean-Baptiste Queru | 9b4a812 | 2010-02-23 12:36:56 -0800 | [diff] [blame] | 95 | TARGET_GLOBAL_CFLAGS += \ | 
| The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 96 | 			-msoft-float -fpic \ | 
| The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 97 | 			-ffunction-sections \ | 
 | 98 | 			-funwind-tables \ | 
 | 99 | 			-fstack-protector \ | 
| Nick Kralevich | 2915cc3 | 2010-05-05 11:09:52 -0700 | [diff] [blame] | 100 | 			-Wa,--noexecstack \ | 
| Nick Kralevich | d868cad | 2010-05-14 09:34:59 -0700 | [diff] [blame] | 101 | 			-Werror=format-security \ | 
| The Android Open Source Project | 4f85cc5 | 2009-01-09 17:50:54 -0800 | [diff] [blame] | 102 | 			-fno-short-enums \ | 
| David 'Digit' Turner | d53c81d | 2009-05-29 15:34:02 +0200 | [diff] [blame] | 103 | 			$(arch_variant_cflags) \ | 
| Ben Leslie | e03f023 | 2008-10-30 10:41:09 -0500 | [diff] [blame] | 104 | 			-include $(android_config_h) \ | 
 | 105 | 			-I $(arch_include_dir) | 
 | 106 |  | 
| David 'Digit' Turner | 3e46778 | 2010-06-16 16:04:55 -0700 | [diff] [blame] | 107 | # This is to avoid the dreaded warning compiler message: | 
 | 108 | #   note: the mangling of 'va_list' has changed in GCC 4.4 | 
 | 109 | # | 
 | 110 | # The fact that the mangling changed does not affect the NDK ABI | 
 | 111 | # very fortunately (since none of the exposed APIs used va_list | 
 | 112 | # in their exported C++ functions). Also, GCC 4.5 has already | 
 | 113 | # removed the warning from the compiler. | 
 | 114 | # | 
 | 115 | TARGET_GLOBAL_CFLAGS += -Wno-psabi | 
 | 116 |  | 
| Jean-Baptiste Queru | 9b4a812 | 2010-02-23 12:36:56 -0800 | [diff] [blame] | 117 | TARGET_GLOBAL_LDFLAGS += \ | 
| Nick Kralevich | 2915cc3 | 2010-05-05 11:09:52 -0700 | [diff] [blame] | 118 | 			-Wl,-z,noexecstack \ | 
| Erik Gilling | c12c518 | 2009-07-17 15:57:10 -0700 | [diff] [blame] | 119 | 			$(arch_variant_ldflags) | 
 | 120 |  | 
| Ben Leslie | e03f023 | 2008-10-30 10:41:09 -0500 | [diff] [blame] | 121 | # We only need thumb interworking in cases where thumb support | 
 | 122 | # is available in the architecture, and just to be sure, (and | 
 | 123 | # since sometimes thumb-interwork appears to be default), we | 
 | 124 | # specifically disable when thumb support is unavailable. | 
 | 125 | ifeq ($(ARCH_ARM_HAVE_THUMB_SUPPORT),true) | 
| Jean-Baptiste Queru | 9b4a812 | 2010-02-23 12:36:56 -0800 | [diff] [blame] | 126 | TARGET_GLOBAL_CFLAGS +=	-mthumb-interwork | 
| Ben Leslie | e03f023 | 2008-10-30 10:41:09 -0500 | [diff] [blame] | 127 | else | 
| Jean-Baptiste Queru | 9b4a812 | 2010-02-23 12:36:56 -0800 | [diff] [blame] | 128 | TARGET_GLOBAL_CFLAGS +=	-mno-thumb-interwork | 
| Ben Leslie | e03f023 | 2008-10-30 10:41:09 -0500 | [diff] [blame] | 129 | endif | 
| The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 130 |  | 
| Jean-Baptiste Queru | 9b4a812 | 2010-02-23 12:36:56 -0800 | [diff] [blame] | 131 | TARGET_GLOBAL_CPPFLAGS += -fvisibility-inlines-hidden | 
| The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 132 |  | 
| Jean-Baptiste Queru | 9b4a812 | 2010-02-23 12:36:56 -0800 | [diff] [blame] | 133 | TARGET_RELEASE_CFLAGS := \ | 
| Mike Reed | 8dd26ee | 2009-10-30 08:32:28 -0400 | [diff] [blame] | 134 | 			-DNDEBUG \ | 
| The Android Open Source Project | 6a5f7f0 | 2009-03-05 14:34:30 -0800 | [diff] [blame] | 135 | 			-g \ | 
| The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 136 | 			-Wstrict-aliasing=2 \ | 
 | 137 | 			-finline-functions \ | 
 | 138 | 			-fno-inline-functions-called-once \ | 
 | 139 | 			-fgcse-after-reload \ | 
 | 140 | 			-frerun-cse-after-loop \ | 
 | 141 | 			-frename-registers | 
 | 142 |  | 
 | 143 | libc_root := bionic/libc | 
 | 144 | libm_root := bionic/libm | 
 | 145 | libstdc++_root := bionic/libstdc++ | 
 | 146 | libthread_db_root := bionic/libthread_db | 
 | 147 |  | 
| Ben Leslie | e03f023 | 2008-10-30 10:41:09 -0500 | [diff] [blame] | 148 |  | 
 | 149 | ## on some hosts, the target cross-compiler is not available so do not run this command | 
| Jean-Baptiste Queru | 9b4a812 | 2010-02-23 12:36:56 -0800 | [diff] [blame] | 150 | ifneq ($(wildcard $(TARGET_CC)),) | 
| David 'Digit' Turner | d53c81d | 2009-05-29 15:34:02 +0200 | [diff] [blame] | 151 | # We compile with the global cflags to ensure that | 
| Ben Leslie | e03f023 | 2008-10-30 10:41:09 -0500 | [diff] [blame] | 152 | # any flags which affect libgcc are correctly taken | 
 | 153 | # into account. | 
| Jean-Baptiste Queru | 9b4a812 | 2010-02-23 12:36:56 -0800 | [diff] [blame] | 154 | TARGET_LIBGCC := $(shell $(TARGET_CC) $(TARGET_GLOBAL_CFLAGS) -print-libgcc-file-name) | 
| Ben Leslie | e03f023 | 2008-10-30 10:41:09 -0500 | [diff] [blame] | 155 | endif | 
 | 156 |  | 
| Jing Yu | 2dcc806 | 2009-09-21 16:31:50 -0700 | [diff] [blame] | 157 | # Define FDO (Feedback Directed Optimization) options. | 
 | 158 |  | 
 | 159 | TARGET_FDO_CFLAGS:= | 
 | 160 | TARGET_FDO_LIB:= | 
 | 161 |  | 
| Jean-Baptiste Queru | 9b4a812 | 2010-02-23 12:36:56 -0800 | [diff] [blame] | 162 | target_libgcov := $(shell $(TARGET_CC) $(TARGET_GLOBAL_CFLAGS) \ | 
| Jing Yu | 2dcc806 | 2009-09-21 16:31:50 -0700 | [diff] [blame] | 163 |         --print-file-name=libgcov.a) | 
 | 164 | ifneq ($(strip $(BUILD_FDO_INSTRUMENT)),) | 
 | 165 |   # Set BUILD_FDO_INSTRUMENT=true to turn on FDO instrumentation. | 
 | 166 |   # The profile will be generated on /data/local/tmp/profile on the device. | 
 | 167 |   TARGET_FDO_CFLAGS := -fprofile-generate=/data/local/tmp/profile -DANDROID_FDO | 
 | 168 |   TARGET_FDO_LIB := $(target_libgcov) | 
 | 169 | else | 
 | 170 |   # If BUILD_FDO_INSTRUMENT is turned off, then consider doing the FDO optimizations. | 
 | 171 |   # Set TARGET_FDO_PROFILE_PATH to set a custom profile directory for your build. | 
 | 172 |   ifeq ($(strip $(TARGET_FDO_PROFILE_PATH)),) | 
 | 173 |     TARGET_FDO_PROFILE_PATH := fdo/profiles/$(TARGET_ARCH)/$(TARGET_ARCH_VARIANT) | 
 | 174 |   else | 
 | 175 |     ifeq ($(strip $(wildcard $(TARGET_FDO_PROFILE_PATH))),) | 
 | 176 |       $(warning Custom TARGET_FDO_PROFILE_PATH supplied, but directory does not exist. Turn off FDO.) | 
 | 177 |     endif | 
 | 178 |   endif | 
 | 179 |  | 
 | 180 |   # If the FDO profile directory can't be found, then FDO is off. | 
 | 181 |   ifneq ($(strip $(wildcard $(TARGET_FDO_PROFILE_PATH))),) | 
 | 182 |     TARGET_FDO_CFLAGS := -fprofile-use=$(TARGET_FDO_PROFILE_PATH) -DANDROID_FDO | 
 | 183 |     TARGET_FDO_LIB := $(target_libgcov) | 
 | 184 |   endif | 
 | 185 | endif | 
 | 186 |  | 
 | 187 |  | 
| The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 188 | # unless CUSTOM_KERNEL_HEADERS is defined, we're going to use | 
 | 189 | # symlinks located in out/ to point to the appropriate kernel | 
 | 190 | # headers. see 'config/kernel_headers.make' for more details | 
 | 191 | # | 
 | 192 | ifneq ($(CUSTOM_KERNEL_HEADERS),) | 
 | 193 |     KERNEL_HEADERS_COMMON := $(CUSTOM_KERNEL_HEADERS) | 
 | 194 |     KERNEL_HEADERS_ARCH   := $(CUSTOM_KERNEL_HEADERS) | 
 | 195 | else | 
 | 196 |     KERNEL_HEADERS_COMMON := $(libc_root)/kernel/common | 
 | 197 |     KERNEL_HEADERS_ARCH   := $(libc_root)/kernel/arch-$(TARGET_ARCH) | 
 | 198 | endif | 
 | 199 | KERNEL_HEADERS := $(KERNEL_HEADERS_COMMON) $(KERNEL_HEADERS_ARCH) | 
 | 200 |  | 
| Jean-Baptiste Queru | 9b4a812 | 2010-02-23 12:36:56 -0800 | [diff] [blame] | 201 | TARGET_C_INCLUDES := \ | 
| The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 202 | 	$(libc_root)/arch-arm/include \ | 
 | 203 | 	$(libc_root)/include \ | 
 | 204 | 	$(libstdc++_root)/include \ | 
 | 205 | 	$(KERNEL_HEADERS) \ | 
 | 206 | 	$(libm_root)/include \ | 
 | 207 | 	$(libm_root)/include/arch/arm \ | 
 | 208 | 	$(libthread_db_root)/include | 
 | 209 |  | 
 | 210 | TARGET_CRTBEGIN_STATIC_O := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_static.o | 
 | 211 | TARGET_CRTBEGIN_DYNAMIC_O := $(TARGET_OUT_STATIC_LIBRARIES)/crtbegin_dynamic.o | 
 | 212 | TARGET_CRTEND_O := $(TARGET_OUT_STATIC_LIBRARIES)/crtend_android.o | 
 | 213 |  | 
 | 214 | TARGET_STRIP_MODULE:=true | 
 | 215 |  | 
| Jean-Baptiste Queru | 9b4a812 | 2010-02-23 12:36:56 -0800 | [diff] [blame] | 216 | TARGET_DEFAULT_SYSTEM_SHARED_LIBRARIES := libc libstdc++ libm | 
| The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 217 |  | 
| Jean-Baptiste Queru | 9b4a812 | 2010-02-23 12:36:56 -0800 | [diff] [blame] | 218 | TARGET_CUSTOM_LD_COMMAND := true | 
| Ben Cheng | db95cb4 | 2009-09-08 16:31:55 -0700 | [diff] [blame] | 219 |  | 
| Dan Bornstein | fa477ba | 2009-10-13 15:56:48 -0700 | [diff] [blame] | 220 | # Enable the Dalvik JIT compiler if not already specified. | 
 | 221 | ifeq ($(strip $(WITH_JIT)),) | 
 | 222 |     WITH_JIT := true | 
 | 223 | endif | 
| Ben Cheng | db95cb4 | 2009-09-08 16:31:55 -0700 | [diff] [blame] | 224 |  | 
| The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 225 | define transform-o-to-shared-lib-inner | 
 | 226 | $(TARGET_CXX) \ | 
 | 227 | 	-nostdlib -Wl,-soname,$(notdir $@) -Wl,-T,$(BUILD_SYSTEM)/armelf.xsc \ | 
 | 228 | 	-Wl,--gc-sections \ | 
 | 229 | 	-Wl,-shared,-Bsymbolic \ | 
 | 230 | 	$(TARGET_GLOBAL_LD_DIRS) \ | 
 | 231 | 	$(PRIVATE_ALL_OBJECTS) \ | 
 | 232 | 	-Wl,--whole-archive \ | 
 | 233 | 	$(call normalize-host-libraries,$(PRIVATE_ALL_WHOLE_STATIC_LIBRARIES)) \ | 
 | 234 | 	-Wl,--no-whole-archive \ | 
 | 235 | 	$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \ | 
 | 236 | 	$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \ | 
 | 237 | 	-o $@ \ | 
| Erik Gilling | c12c518 | 2009-07-17 15:57:10 -0700 | [diff] [blame] | 238 | 	$(TARGET_GLOBAL_LDFLAGS) \ | 
| Nick Kralevich | 387e4d0 | 2010-04-26 14:12:19 -0700 | [diff] [blame] | 239 | 	$(PRIVATE_LDFLAGS) \ | 
| Jing Yu | 2dcc806 | 2009-09-21 16:31:50 -0700 | [diff] [blame] | 240 | 	$(TARGET_FDO_LIB) \ | 
| The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 241 | 	$(TARGET_LIBGCC) | 
 | 242 | endef | 
 | 243 |  | 
 | 244 | define transform-o-to-executable-inner | 
 | 245 | $(TARGET_CXX) -nostdlib -Bdynamic -Wl,-T,$(BUILD_SYSTEM)/armelf.x \ | 
 | 246 | 	-Wl,-dynamic-linker,/system/bin/linker \ | 
 | 247 |     -Wl,--gc-sections \ | 
 | 248 | 	-Wl,-z,nocopyreloc \ | 
 | 249 | 	-o $@ \ | 
 | 250 | 	$(TARGET_GLOBAL_LD_DIRS) \ | 
 | 251 | 	-Wl,-rpath-link=$(TARGET_OUT_INTERMEDIATE_LIBRARIES) \ | 
 | 252 | 	$(call normalize-target-libraries,$(PRIVATE_ALL_SHARED_LIBRARIES)) \ | 
 | 253 | 	$(TARGET_CRTBEGIN_DYNAMIC_O) \ | 
 | 254 | 	$(PRIVATE_ALL_OBJECTS) \ | 
 | 255 | 	$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \ | 
| Erik Gilling | c12c518 | 2009-07-17 15:57:10 -0700 | [diff] [blame] | 256 | 	$(TARGET_GLOBAL_LDFLAGS) \ | 
| Nick Kralevich | 387e4d0 | 2010-04-26 14:12:19 -0700 | [diff] [blame] | 257 | 	$(PRIVATE_LDFLAGS) \ | 
| Jing Yu | 2dcc806 | 2009-09-21 16:31:50 -0700 | [diff] [blame] | 258 | 	$(TARGET_FDO_LIB) \ | 
| The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 259 | 	$(TARGET_LIBGCC) \ | 
 | 260 | 	$(TARGET_CRTEND_O) | 
 | 261 | endef | 
 | 262 |  | 
 | 263 | define transform-o-to-static-executable-inner | 
 | 264 | $(TARGET_CXX) -nostdlib -Bstatic -Wl,-T,$(BUILD_SYSTEM)/armelf.x \ | 
 | 265 |     -Wl,--gc-sections \ | 
 | 266 | 	-o $@ \ | 
 | 267 | 	$(TARGET_GLOBAL_LD_DIRS) \ | 
 | 268 | 	$(TARGET_CRTBEGIN_STATIC_O) \ | 
| Erik Gilling | c12c518 | 2009-07-17 15:57:10 -0700 | [diff] [blame] | 269 | 	$(TARGET_GLOBAL_LDFLAGS) \ | 
| Nick Kralevich | 387e4d0 | 2010-04-26 14:12:19 -0700 | [diff] [blame] | 270 | 	$(PRIVATE_LDFLAGS) \ | 
| The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 271 | 	$(PRIVATE_ALL_OBJECTS) \ | 
 | 272 | 	$(call normalize-target-libraries,$(PRIVATE_ALL_STATIC_LIBRARIES)) \ | 
| Jing Yu | 2dcc806 | 2009-09-21 16:31:50 -0700 | [diff] [blame] | 273 | 	$(TARGET_FDO_LIB) \ | 
| The Android Open Source Project | b6c1cf6 | 2008-10-21 07:00:00 -0700 | [diff] [blame] | 274 | 	$(TARGET_LIBGCC) \ | 
 | 275 | 	$(TARGET_CRTEND_O) | 
 | 276 | endef |