Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e0a90e10 authored by Dan Willemsen's avatar Dan Willemsen Committed by Automerger Merge Worker
Browse files

Merge "Add basic Darwin+Arm64 support as HOST_CROSS" am: e808bc4a am: b66a55ea

Original change: https://android-review.googlesource.com/c/platform/build/+/1883492

Change-Id: If56481c18988d0e457b3479814b62ba4bc6e7fef
parents e807b063 b66a55ea
Loading
Loading
Loading
Loading
+0 −22
Original line number Diff line number Diff line
#
# Copyright (C) 2020 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 builds hosted on linux_arm-arm64
# Included by combo/select.mk

define $(combo_var_prefix)transform-shared-lib-to-toc
$(call _gen_toc_command_for_elf,$(1),$(2))
endef
+0 −23
Original line number Diff line number Diff line
#
# 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.
#

# Settings to use MinGW as a cross-compiler under Linux
# Included by combo/select.make

define $(combo_var_prefix)transform-shared-lib-to-toc
$(hide) $($(PRIVATE_2ND_ARCH_VAR_PREFIX)$(PRIVATE_PREFIX)OBJDUMP) -x $(1) | grep "^Name" | cut -f3 -d" " > $(2)
$(hide) $($(PRIVATE_2ND_ARCH_VAR_PREFIX)$(PRIVATE_PREFIX)NM) -g -f p $(1) | cut -f1-2 -d" " >> $(2)
endef
+0 −23
Original line number Diff line number Diff line
#
# 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.
#

# Settings to use MinGW as a cross-compiler under Linux
# Included by combo/select.make

define $(combo_var_prefix)transform-shared-lib-to-toc
$(hide) $($(PRIVATE_2ND_ARCH_VAR_PREFIX)$(PRIVATE_PREFIX)OBJDUMP) -x $(1) | grep "^Name" | cut -f3 -d" " > $(2)
$(hide) $($(PRIVATE_2ND_ARCH_VAR_PREFIX)$(PRIVATE_PREFIX)NM) -g -f p $(1) | cut -f1-2 -d" " >> $(2)
endef
+9 −0
Original line number Diff line number Diff line
@@ -27,6 +27,13 @@ combo_os_arch := $($(combo_target)OS)-$($(combo_target)$(combo_2nd_arch_prefix)A
combo_var_prefix := $(combo_2nd_arch_prefix)$(combo_target)

# Set reasonable defaults for the various variables
ifeq ($(combo_target),HOST_CROSS_)
$(KATI_obsolete_var \
  $(combo_var_prefix)GLOBAL_ARFLAGS \
  $(combo_var_prefix)STATIC_LIB_SUFFIX \
  $(combo_var_prefix)transform-shared-lib-to-toc \
  ,HOST_CROSS builds are not supported in Make)
else

$(combo_var_prefix)GLOBAL_ARFLAGS := crsPD -format=gnu

@@ -34,3 +41,5 @@ $(combo_var_prefix)STATIC_LIB_SUFFIX := .a

# Now include the combo for this specific target.
include $(BUILD_COMBOS)/$(combo_target)$(combo_os_arch).mk

endif
+4 −0
Original line number Diff line number Diff line
@@ -167,6 +167,10 @@ ifeq ($(HOST_OS),linux)
  else
    $(error Unsupported HOST_CROSS_OS $(HOST_CROSS_OS))
  endif
else ifeq ($(HOST_OS),darwin)
  HOST_CROSS_OS := darwin
  HOST_CROSS_ARCH := arm64
  HOST_CROSS_2ND_ARCH :=
endif

ifeq ($(HOST_OS),)