2010-02-24 04:36:56 +08:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
|
2008-10-21 22:00:00 +08:00
|
|
|
# Configuration for Linux on ARM.
|
2010-02-24 04:36:56 +08:00
|
|
|
# Included by combo/select.mk
|
2008-10-21 22:00:00 +08:00
|
|
|
|
2009-05-29 21:34:02 +08:00
|
|
|
# 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/<name>.mk which must contain
|
2015-08-29 01:31:28 +08:00
|
|
|
# makefile variable definitions. Their
|
2009-05-29 21:34:02 +08:00
|
|
|
# purpose is to allow module Android.mk files to selectively compile
|
|
|
|
# different versions of code based upon the funtionality and
|
2008-10-30 23:41:09 +08:00
|
|
|
# instructions available in a given architecture version.
|
|
|
|
#
|
2009-05-29 21:34:02 +08:00
|
|
|
# The blocks also define specific arch_variant_cflags, which
|
2008-10-30 23:41:09 +08:00
|
|
|
# include defines, and compiler settings for the given architecture
|
|
|
|
# version.
|
|
|
|
#
|
2017-08-23 18:58:57 +08:00
|
|
|
ifeq ($(strip $(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT)),)
|
|
|
|
TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT := generic
|
|
|
|
endif
|
|
|
|
|
2018-10-11 05:33:13 +08:00
|
|
|
KNOWN_ARMv8_CORES := cortex-a53 cortex-a53.a57 cortex-a55 cortex-a73 cortex-a75 cortex-a76
|
2018-11-23 03:55:32 +08:00
|
|
|
KNOWN_ARMv8_CORES += kryo kryo385 exynos-m1 exynos-m2
|
2017-08-23 18:58:57 +08:00
|
|
|
|
2018-11-23 03:55:32 +08:00
|
|
|
KNOWN_ARMv82a_CORES := cortex-a55 cortex-a75 kryo385
|
2018-11-13 17:31:28 +08:00
|
|
|
|
|
|
|
# Check for cores that implement armv8-2a ISAs.
|
|
|
|
ifneq (,$(filter $(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT), $(KNOWN_ARMv82a_CORES)))
|
|
|
|
ifneq ($(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT),armv8-2a)
|
|
|
|
$(warning $(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT) is armv8-2a.)
|
|
|
|
ifneq (,$(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT))
|
|
|
|
$(warning TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT, $(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT), ignored! Use armv8-2a instead.)
|
|
|
|
endif
|
|
|
|
# Overwrite TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT
|
|
|
|
TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT := armv8-2a
|
|
|
|
endif
|
2017-08-23 18:58:57 +08:00
|
|
|
# Many devices (incorrectly) use armv7-a-neon as the 2nd architecture variant
|
|
|
|
# for cores that implement armv8-a ISAs. The following sets it to armv8-a.
|
2018-11-13 17:31:28 +08:00
|
|
|
else ifneq (,$(filter $(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT), $(KNOWN_ARMv8_CORES)))
|
2017-08-23 18:58:57 +08:00
|
|
|
ifneq ($(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT),armv8-a)
|
|
|
|
$(warning $(TARGET_$(combo_2nd_arch_prefix)CPU_VARIANT) is armv8-a.)
|
|
|
|
ifneq (,$(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT))
|
|
|
|
$(warning TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT, $(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT), ignored! Use armv8-a instead.)
|
|
|
|
endif
|
|
|
|
# Overwrite TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT
|
|
|
|
TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT := armv8-a
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2013-12-28 03:09:36 +08:00
|
|
|
ifeq ($(strip $(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT)),)
|
2018-01-09 07:26:16 +08:00
|
|
|
$(error TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT must be set)
|
2008-10-30 23:41:09 +08:00
|
|
|
endif
|
2009-05-29 21:34:02 +08:00
|
|
|
|
2013-12-28 03:09:36 +08:00
|
|
|
TARGET_ARCH_SPECIFIC_MAKEFILE := $(BUILD_COMBOS)/arch/$(TARGET_$(combo_2nd_arch_prefix)ARCH)/$(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT).mk
|
2009-05-29 21:34:02 +08:00
|
|
|
ifeq ($(strip $(wildcard $(TARGET_ARCH_SPECIFIC_MAKEFILE))),)
|
2013-12-28 03:09:36 +08:00
|
|
|
$(error Unknown ARM architecture version: $(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT))
|
2009-05-29 03:47:23 +08:00
|
|
|
endif
|
2008-10-30 23:41:09 +08:00
|
|
|
|
2009-05-29 21:34:02 +08:00
|
|
|
include $(TARGET_ARCH_SPECIFIC_MAKEFILE)
|
2014-07-24 05:28:58 +08:00
|
|
|
include $(BUILD_SYSTEM)/combo/fdo.mk
|
2009-05-29 21:34:02 +08:00
|
|
|
|
2015-10-09 13:36:04 +08:00
|
|
|
define $(combo_var_prefix)transform-shared-lib-to-toc
|
|
|
|
$(call _gen_toc_command_for_elf,$(1),$(2))
|
|
|
|
endef
|
2008-10-21 22:00:00 +08:00
|
|
|
|
2015-04-21 07:59:05 +08:00
|
|
|
$(combo_2nd_arch_prefix)TARGET_PACK_MODULE_RELOCATIONS := true
|
2015-04-23 12:22:33 +08:00
|
|
|
|
2014-11-14 02:15:46 +08:00
|
|
|
$(combo_2nd_arch_prefix)TARGET_LINKER := /system/bin/linker
|