Home | History | Annotate | Download | only in combo
      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 
     17 # Configuration for Linux on ARM.
     18 # Included by combo/select.mk
     19 
     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. Their
     24 # purpose is to allow module Android.mk files to selectively compile
     25 # different versions of code based upon the funtionality and
     26 # instructions available in a given architecture version.
     27 #
     28 # The blocks also define specific arch_variant_cflags, which
     29 # include defines, and compiler settings for the given architecture
     30 # version.
     31 #
     32 
     33 KNOWN_ARMv8_CORES := cortex-a53 cortex-a53.a57 cortex-a55 cortex-a73 cortex-a75 cortex-a76
     34 KNOWN_ARMv8_CORES += kryo kryo385 exynos-m1 exynos-m2
     35 
     36 KNOWN_ARMv82a_CORES := cortex-a55 cortex-a75 kryo385
     37 
     38 ifeq (,$(strip $(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT)))
     39   TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT := generic
     40 endif
     41 
     42 # This sanity checks TARGET_2ND_ARCH_VARIANT against the lists above.
     43 ifneq (,$(filter $(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT), $(KNOWN_ARMv82a_CORES)))
     44   ifeq (,$(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT))
     45     TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT := armv8-2a
     46   else ifneq (armv8-2a,$(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT))
     47     $(error Incorrect TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT, $(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT). Use armv8-2a instead.)
     48   endif
     49 else ifneq (,$(filter $(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT), $(KNOWN_ARMv8_CORES)))
     50   ifeq (,$(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT))
     51     TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT := armv8-a
     52   else ifneq ($(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT),armv8-a)
     53     $(error Incorrect TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT, $(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT). Use armv8-a instead.)
     54   endif
     55 endif
     56 
     57 ifeq ($(strip $(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT)),)
     58   $(error TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT must be set)
     59 endif
     60 
     61 TARGET_ARCH_SPECIFIC_MAKEFILE := $(BUILD_COMBOS)/arch/$(TARGET_$(combo_2nd_arch_prefix)ARCH)/$(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT).mk
     62 ifeq ($(strip $(wildcard $(TARGET_ARCH_SPECIFIC_MAKEFILE))),)
     63   $(error Unknown ARM architecture version: $(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT))
     64 endif
     65 
     66 include $(TARGET_ARCH_SPECIFIC_MAKEFILE)
     67 include $(BUILD_SYSTEM)/combo/fdo.mk
     68 
     69 define $(combo_var_prefix)transform-shared-lib-to-toc
     70 $(call _gen_toc_command_for_elf,$(1),$(2))
     71 endef
     72 
     73 $(combo_2nd_arch_prefix)TARGET_PACK_MODULE_RELOCATIONS := true
     74 
     75 $(combo_2nd_arch_prefix)TARGET_LINKER := /system/bin/linker
     76