# # Copyright (C) 2006 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # # Configuration for Linux on ARM. # Included by combo/select.mk # You can set TARGET_ARCH_VARIANT to use an arch version other # than ARMv5TE. Each value should correspond to a file named # $(BUILD_COMBOS)/arch/.mk which must contain # makefile variable definitions similar to the preprocessor # defines in build/core/combo/include/arch//AndroidConfig.h. Their # purpose is to allow module Android.mk files to selectively compile # different versions of code based upon the funtionality and # instructions available in a given architecture version. # # The blocks also define specific arch_variant_cflags, which # include defines, and compiler settings for the given architecture # version. # ifeq ($(strip $(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT)),) TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT := armv5te endif # Decouple NDK library selection with platform compiler version $(combo_2nd_arch_prefix)TARGET_NDK_GCC_VERSION := 4.9 ifeq ($(strip $(TARGET_GCC_VERSION_EXP)),) $(combo_2nd_arch_prefix)TARGET_GCC_VERSION := 4.9 $(combo_2nd_arch_prefix)TARGET_LEGACY_GCC_VERSION := 4.8 else $(combo_2nd_arch_prefix)TARGET_GCC_VERSION := $(TARGET_GCC_VERSION_EXP) endif TARGET_ARCH_SPECIFIC_MAKEFILE := $(BUILD_COMBOS)/arch/$(TARGET_$(combo_2nd_arch_prefix)ARCH)/$(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT).mk ifeq ($(strip $(wildcard $(TARGET_ARCH_SPECIFIC_MAKEFILE))),) $(error Unknown ARM architecture version: $(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT)) endif include $(TARGET_ARCH_SPECIFIC_MAKEFILE) include $(BUILD_SYSTEM)/combo/fdo.mk # You can set TARGET_TOOLS_PREFIX to get gcc from somewhere else ifeq ($(strip $($(combo_2nd_arch_prefix)TARGET_TOOLS_PREFIX)),) $(combo_2nd_arch_prefix)TARGET_TOOLCHAIN_ROOT := prebuilts/gcc/$(HOST_PREBUILT_TAG)/arm/arm-linux-androideabi-$($(combo_2nd_arch_prefix)TARGET_GCC_VERSION) $(combo_2nd_arch_prefix)TARGET_TOOLS_PREFIX := $($(combo_2nd_arch_prefix)TARGET_TOOLCHAIN_ROOT)/bin/arm-linux-androideabi- endif $(combo_2nd_arch_prefix)TARGET_CC := $($(combo_2nd_arch_prefix)TARGET_TOOLS_PREFIX)gcc$(HOST_EXECUTABLE_SUFFIX) $(combo_2nd_arch_prefix)TARGET_CXX := $($(combo_2nd_arch_prefix)TARGET_TOOLS_PREFIX)g++$(HOST_EXECUTABLE_SUFFIX) $(combo_2nd_arch_prefix)TARGET_AR := $($(combo_2nd_arch_prefix)TARGET_TOOLS_PREFIX)ar$(HOST_EXECUTABLE_SUFFIX) $(combo_2nd_arch_prefix)TARGET_OBJCOPY := $($(combo_2nd_arch_prefix)TARGET_TOOLS_PREFIX)objcopy$(HOST_EXECUTABLE_SUFFIX) $(combo_2nd_arch_prefix)TARGET_LD := $($(combo_2nd_arch_prefix)TARGET_TOOLS_PREFIX)ld$(HOST_EXECUTABLE_SUFFIX) $(combo_2nd_arch_prefix)TARGET_READELF := $($(combo_2nd_arch_prefix)TARGET_TOOLS_PREFIX)readelf$(HOST_EXECUTABLE_SUFFIX) $(combo_2nd_arch_prefix)TARGET_STRIP := $($(combo_2nd_arch_prefix)TARGET_TOOLS_PREFIX)strip$(HOST_EXECUTABLE_SUFFIX) $(combo_2nd_arch_prefix)TARGET_NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined $(combo_2nd_arch_prefix)TARGET_arm_CFLAGS := -O2 \ -fomit-frame-pointer \ -fstrict-aliasing \ -funswitch-loops # Modules can choose to compile some source as thumb. $(combo_2nd_arch_prefix)TARGET_thumb_CFLAGS := -mthumb \ -Os \ -fomit-frame-pointer \ -fno-strict-aliasing # Set FORCE_ARM_DEBUGGING to "true" in your buildspec.mk # or in your environment to force a full arm build, even for # files that are normally built as thumb; this can make # gdb debugging easier. Don't forget to do a clean build. # # NOTE: if you try to build a -O0 build with thumb, several # of the libraries (libpv, libwebcore, libkjs) need to be built # with -mlong-calls. When built at -O0, those libraries are # too big for a thumb "BL