Skip to content

Commit

Permalink
Remove unused mips workarounds.
Browse files Browse the repository at this point in the history
This was never really finished, and hasn't been supported for years.

Test: treehugger
Change-Id: I7668088d1449f33025aaf36fae0817894c84a877
  • Loading branch information
enh-google committed Mar 7, 2020
1 parent 074d8e1 commit f71c05a
Show file tree
Hide file tree
Showing 12 changed files with 10 additions and 162 deletions.
32 changes: 4 additions & 28 deletions core/binary.mk
Original file line number Diff line number Diff line change
Expand Up @@ -110,19 +110,8 @@ ifneq ($(LOCAL_SDK_VERSION),)
# Make sure we've built the NDK.
my_additional_dependencies += $(SOONG_OUT_DIR)/ndk_base.timestamp

# mips32r6 is not supported by the NDK. No released NDK contains these
# libraries, but the r10 in prebuilts/ndk had a local hack to add them :(
#
# We need to find a real solution to this problem, but until we do just drop
# mips32r6 things back to r10 to get the tree building again.
ifeq (mips32r6,$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH_VARIANT))
ifeq ($(LOCAL_NDK_VERSION), current)
LOCAL_NDK_VERSION := r10
endif
endif

my_arch := $(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)
ifneq (,$(filter arm64 mips64 x86_64,$(my_arch)))
ifneq (,$(filter arm64 x86_64,$(my_arch)))
my_min_sdk_version := 21
else
my_min_sdk_version := $(MIN_SUPPORTED_SDK_VERSION)
Expand Down Expand Up @@ -156,17 +145,11 @@ ifneq ($(LOCAL_SDK_VERSION),)
$(my_built_ndk)/sysroot/usr/include/$(my_ndk_triple) \
$(my_ndk_sysroot)/usr/include \

# x86_64 and and mips64 are both multilib toolchains, so their libraries are
# x86_64 is a multilib toolchain, so their libraries are
# installed in /usr/lib64. Aarch64, on the other hand, is not a multilib
# compiler, so its libraries are in /usr/lib.
#
# Mips32r6 is yet another variation, with libraries installed in libr6.
#
# For the rest, the libraries are installed simply to /usr/lib.
ifneq (,$(filter x86_64 mips64,$(my_arch)))
ifneq (,$(filter x86_64,$(my_arch)))
my_ndk_libdir_name := lib64
else ifeq (mips32r6,$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH_VARIANT))
my_ndk_libdir_name := libr6
else
my_ndk_libdir_name := lib
endif
Expand All @@ -180,11 +163,7 @@ ifneq ($(LOCAL_SDK_VERSION),)
# hashes (which are much faster!), but shipping to older devices requires
# the old style hash. Fortunately, we can build with both and it'll work
# anywhere.
#
# This is not currently supported on MIPS architectures.
ifeq (,$(filter mips mips64,$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)))
my_ldflags += -Wl,--hash-style=both
endif
my_ldflags += -Wl,--hash-style=both

# We don't want to expose the relocation packer to the NDK just yet.
LOCAL_PACK_MODULE_RELOCATIONS := false
Expand All @@ -195,9 +174,6 @@ ifneq ($(LOCAL_SDK_VERSION),)
my_ndk_stl_shared_lib_fullpath :=
my_ndk_stl_static_lib :=
my_cpu_variant := $(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)CPU_ABI)
ifeq (mips32r6,$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH_VARIANT))
my_cpu_variant := mips32r6
endif
LOCAL_NDK_STL_VARIANT := $(strip $(LOCAL_NDK_STL_VARIANT))
ifeq (,$(LOCAL_NDK_STL_VARIANT))
LOCAL_NDK_STL_VARIANT := system
Expand Down
2 changes: 0 additions & 2 deletions core/build-system.html
Original file line number Diff line number Diff line change
Expand Up @@ -467,8 +467,6 @@ <h3><a name="platform-specific"/>Platform specific conditionals</h3>
<b>TARGET_ARCH</b><br/>
arm<br/>
arm64<br/>
mips<br/>
mips64<br/>
x86<br/>
x86_64
</td>
Expand Down
9 changes: 0 additions & 9 deletions core/clang/TARGET_mips.mk

This file was deleted.

9 changes: 0 additions & 9 deletions core/clang/TARGET_mips64.mk

This file was deleted.

44 changes: 0 additions & 44 deletions core/combo/TARGET_linux-mips.mk

This file was deleted.

44 changes: 0 additions & 44 deletions core/combo/TARGET_linux-mips64.mk

This file was deleted.

6 changes: 0 additions & 6 deletions core/config_sanitizers.mk
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,6 @@ ifneq ($(filter address,$(my_sanitize)),)
my_sanitize_diag := $(filter-out cfi,$(my_sanitize_diag))
endif

# CFI needs gold linker, and mips toolchain does not have one.
ifneq ($(filter mips mips64,$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)),)
my_sanitize := $(filter-out cfi,$(my_sanitize))
my_sanitize_diag := $(filter-out cfi,$(my_sanitize_diag))
endif

# Disable sanitizers which need the UBSan runtime for host targets.
ifdef LOCAL_IS_HOST_MODULE
my_sanitize := $(filter-out cfi,$(my_sanitize))
Expand Down
10 changes: 0 additions & 10 deletions core/dex_preopt_config.mk
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,6 @@ DEX2OAT_IMAGE_XMX := $(call get-product-default-property,dalvik.vm.image-dex2oat
DEX2OAT_XMS := $(call get-product-default-property,dalvik.vm.dex2oat-Xms)
DEX2OAT_XMX := $(call get-product-default-property,dalvik.vm.dex2oat-Xmx)

ifeq ($(TARGET_ARCH),$(filter $(TARGET_ARCH),mips mips64))
# MIPS specific overrides.
# For MIPS the ART image is loaded at a lower address. This causes issues
# with the image overlapping with memory on the host cross-compiling and
# building the image. We therefore limit the Xmx value. This isn't done
# via a property as we want the larger Xmx value if we're running on a
# MIPS device.
DEX2OAT_XMX := 128m
endif

ifeq ($(WRITE_SOONG_VARIABLES),true)

$(call json_start)
Expand Down
2 changes: 1 addition & 1 deletion core/envsetup.mk
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ TARGET_BUILD_APPS ?=

# ---------------------------------------------------------------
# Set up configuration for host machine. We don't do cross-
# compiles except for arm/mips, so the HOST is whatever we are
# compiles except for arm, so the HOST is whatever we are
# running on

# HOST_OS
Expand Down
2 changes: 1 addition & 1 deletion core/java_renderscript.mk
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ LOCAL_JNI_SHARED_LIBRARIES += libRSSupportIO
endif

my_arch := $(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH)
ifneq (,$(filter arm64 mips64 x86_64,$(my_arch)))
ifneq (,$(filter arm64 x86_64,$(my_arch)))
my_min_sdk_version := 21
else
my_min_sdk_version := $(MIN_SUPPORTED_SDK_VERSION)
Expand Down
10 changes: 3 additions & 7 deletions envsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Invoke ". build/envsetup.sh" from your shell to add the following functions to y
Selects <product_name> as the product to build, and <build_variant> as the variant to
build, and stores those selections in the environment to be read by subsequent
invocations of 'm' etc.
- tapas: tapas [<App1> <App2> ...] [arm|x86|mips|arm64|x86_64|mips64] [eng|userdebug|user]
- tapas: tapas [<App1> <App2> ...] [arm|x86|arm64|x86_64] [eng|userdebug|user]
- croot: Changes directory to the top of the tree, or a subdirectory thereof.
- m: Makes from the top of the tree.
- mm: Builds and installs all of the modules in the current directory, and their
Expand Down Expand Up @@ -218,8 +218,6 @@ function setpaths()
arm64) toolchaindir=aarch64/aarch64-linux-android-$targetgccversion/bin;
toolchaindir2=arm/arm-linux-androideabi-$targetgccversion2/bin
;;
mips|mips64) toolchaindir=mips/mips64el-linux-android-$targetgccversion/bin
;;
*)
echo "Can't find toolchain for unknown architecture: $ARCH"
toolchaindir=xxxxxxxxx
Expand Down Expand Up @@ -701,10 +699,10 @@ function _lunch()
function tapas()
{
local showHelp="$(echo $* | xargs -n 1 echo | \grep -E '^(help)$' | xargs)"
local arch="$(echo $* | xargs -n 1 echo | \grep -E '^(arm|x86|mips|arm64|x86_64|mips64)$' | xargs)"
local arch="$(echo $* | xargs -n 1 echo | \grep -E '^(arm|x86|arm64|x86_64)$' | xargs)"
local variant="$(echo $* | xargs -n 1 echo | \grep -E '^(user|userdebug|eng)$' | xargs)"
local density="$(echo $* | xargs -n 1 echo | \grep -E '^(ldpi|mdpi|tvdpi|hdpi|xhdpi|xxhdpi|xxxhdpi|alldpi)$' | xargs)"
local apps="$(echo $* | xargs -n 1 echo | \grep -E -v '^(user|userdebug|eng|arm|x86|mips|arm64|x86_64|mips64|ldpi|mdpi|tvdpi|hdpi|xhdpi|xxhdpi|xxxhdpi|alldpi)$' | xargs)"
local apps="$(echo $* | xargs -n 1 echo | \grep -E -v '^(user|userdebug|eng|arm|x86|arm64|x86_64|ldpi|mdpi|tvdpi|hdpi|xhdpi|xxhdpi|xxxhdpi|alldpi)$' | xargs)"

if [ "$showHelp" != "" ]; then
$(gettop)/build/make/tapasHelp.sh
Expand All @@ -727,10 +725,8 @@ function tapas()
local product=aosp_arm
case $arch in
x86) product=aosp_x86;;
mips) product=aosp_mips;;
arm64) product=aosp_arm64;;
x86_64) product=aosp_x86_64;;
mips64) product=aosp_mips64;;
esac
if [ -z "$variant" ]; then
variant=eng
Expand Down
2 changes: 1 addition & 1 deletion tapasHelp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SCRIPT_DIR="${PWD}"
cd ../..
TOP="${PWD}"

message='usage: tapas [<App1> <App2> ...] [arm|x86|mips|arm64|x86_64|mips64] [eng|userdebug|user]
message='usage: tapas [<App1> <App2> ...] [arm|x86|arm64|x86_64] [eng|userdebug|user]
tapas selects individual apps to be built by the Android build system. Unlike
"lunch", "tapas" does not request the building of images for a device.
Expand Down

0 comments on commit f71c05a

Please sign in to comment.