summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-07-30 23:20:06 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-07-23 17:53:27 +0000
commit0b3c42cbc848726d83cea953a41c333856182cf9 (patch)
tree02239eb52b57f9ede18dd35a427deb95ca115147
parent717bc3a3b7ea2d8835523d01ba020332fb76ac5a (diff)
parent6670e24aed1ca66f21a6af759a0d156bb3df1739 (diff)
downloadbuild-0b3c42cbc848726d83cea953a41c333856182cf9.zip
build-0b3c42cbc848726d83cea953a41c333856182cf9.tar.gz
build-0b3c42cbc848726d83cea953a41c333856182cf9.tar.bz2
Merge "[MIPS] Unite mipsel and mips64el 4.9 gcc toolchains"
-rw-r--r--core/clang/TARGET_mips.mk2
-rw-r--r--core/clang/mips.mk11
-rw-r--r--core/clang/mips64.mk8
-rw-r--r--core/combo/TARGET_linux-mips.mk24
-rw-r--r--core/combo/TARGET_linux-mips64.mk20
-rw-r--r--core/combo/arch/mips/mips32-fp.mk8
-rw-r--r--core/combo/arch/mips/mips32.mk12
-rw-r--r--core/combo/arch/mips/mips32r2-fp-xburst.mk8
-rw-r--r--core/combo/arch/mips/mips32r2-fp.mk8
-rw-r--r--core/combo/arch/mips/mips32r2.mk13
-rw-r--r--core/combo/arch/mips/mips32r2dsp-fp.mk8
-rw-r--r--core/combo/arch/mips/mips32r2dsp.mk17
-rw-r--r--core/combo/arch/mips/mips32r2dspr2-fp.mk8
-rw-r--r--core/combo/arch/mips/mips32r2dspr2.mk17
-rw-r--r--core/combo/arch/mips64/mips64r2.mk8
-rw-r--r--envsetup.sh7
-rw-r--r--target/board/generic_mips/Android.mk17
17 files changed, 29 insertions, 167 deletions
diff --git a/core/clang/TARGET_mips.mk b/core/clang/TARGET_mips.mk
index de615b0..0107519 100644
--- a/core/clang/TARGET_mips.mk
+++ b/core/clang/TARGET_mips.mk
@@ -3,7 +3,7 @@ include $(BUILD_SYSTEM)/clang/mips.mk
CLANG_CONFIG_mips_TARGET_TRIPLE := mipsel-linux-android
CLANG_CONFIG_mips_TARGET_TOOLCHAIN_PREFIX := \
- $($(clang_2nd_arch_prefix)TARGET_TOOLCHAIN_ROOT)/$(CLANG_CONFIG_mips_TARGET_TRIPLE)/bin
+ $($(clang_2nd_arch_prefix)TARGET_TOOLCHAIN_ROOT)/mips64el-linux-android/bin
CLANG_CONFIG_mips_TARGET_EXTRA_ASFLAGS := \
$(CLANG_CONFIG_EXTRA_ASFLAGS) \
diff --git a/core/clang/mips.mk b/core/clang/mips.mk
index cef7823..88721e9 100644
--- a/core/clang/mips.mk
+++ b/core/clang/mips.mk
@@ -7,18 +7,17 @@ CLANG_CONFIG_mips_EXTRA_LDFLAGS :=
# Include common unknown flags
CLANG_CONFIG_mips_UNKNOWN_CFLAGS := \
$(CLANG_CONFIG_UNKNOWN_CFLAGS) \
- -EL \
-mips32 \
-mips32r2 \
- -mhard-float \
+ -mfp32 \
+ -mfp64 \
+ -mfpxx \
+ -modd-spreg \
+ -mno-odd-spreg \
-fno-strict-volatile-bitfields \
-fgcse-after-reload \
-frerun-cse-after-loop \
-frename-registers \
- -march=mips32r2 \
- -mtune=mips32r2 \
- -march=mips32 \
- -mtune=mips32 \
-msynci \
-mno-fused-madd
diff --git a/core/clang/mips64.mk b/core/clang/mips64.mk
index 9d1117b..d087b9b 100644
--- a/core/clang/mips64.mk
+++ b/core/clang/mips64.mk
@@ -9,18 +9,10 @@ CLANG_CONFIG_mips64_EXTRA_LDFLAGS :=
# Include common unknown flags
CLANG_CONFIG_mips64_UNKNOWN_CFLAGS := \
$(CLANG_CONFIG_UNKNOWN_CFLAGS) \
- -EL \
- -mips32 \
- -mips32r2 \
- -mhard-float \
-fno-strict-volatile-bitfields \
-fgcse-after-reload \
-frerun-cse-after-loop \
-frename-registers \
- -march=mips32r2 \
- -mtune=mips32r2 \
- -march=mips32 \
- -mtune=mips32 \
-msynci \
-mno-fused-madd
diff --git a/core/combo/TARGET_linux-mips.mk b/core/combo/TARGET_linux-mips.mk
index 96ec210..0069bd0 100644
--- a/core/combo/TARGET_linux-mips.mk
+++ b/core/combo/TARGET_linux-mips.mk
@@ -38,7 +38,7 @@ endif
$(combo_2nd_arch_prefix)TARGET_NDK_GCC_VERSION := 4.8
ifeq ($(strip $(TARGET_GCC_VERSION_EXP)),)
-$(combo_2nd_arch_prefix)TARGET_GCC_VERSION := 4.8
+$(combo_2nd_arch_prefix)TARGET_GCC_VERSION := 4.9
else
$(combo_2nd_arch_prefix)TARGET_GCC_VERSION := $(TARGET_GCC_VERSION_EXP)
endif
@@ -53,8 +53,8 @@ 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)/mips/mipsel-linux-android-$($(combo_2nd_arch_prefix)TARGET_GCC_VERSION)
-$(combo_2nd_arch_prefix)TARGET_TOOLS_PREFIX := $($(combo_2nd_arch_prefix)TARGET_TOOLCHAIN_ROOT)/bin/mipsel-linux-android-
+$(combo_2nd_arch_prefix)TARGET_TOOLCHAIN_ROOT := prebuilts/gcc/$(HOST_PREBUILT_TAG)/mips/mips64el-linux-android-$($(combo_2nd_arch_prefix)TARGET_GCC_VERSION)
+$(combo_2nd_arch_prefix)TARGET_TOOLS_PREFIX := $($(combo_2nd_arch_prefix)TARGET_TOOLCHAIN_ROOT)/bin/mips64el-linux-android-
endif
$(combo_2nd_arch_prefix)TARGET_CC := $($(combo_2nd_arch_prefix)TARGET_TOOLS_PREFIX)gcc$(HOST_EXECUTABLE_SUFFIX)
@@ -97,24 +97,6 @@ $(combo_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS += \
-include $(android_config_h) \
-I $(dir $(android_config_h))
-# This warning causes dalvik not to build with gcc 4.6+ and -Werror.
-# We cannot turn it off blindly since the option is not available
-# in gcc-4.4.x.
-ifneq ($(filter 4.6 4.6.% 4.7 4.7.% 4.8, $($(combo_2nd_arch_prefix)TARGET_GCC_VERSION)),)
-$(combo_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS += -Wno-unused-but-set-variable \
- -fno-strict-volatile-bitfields
-endif
-
-# This is to avoid the dreaded warning compiler message:
-# note: the mangling of 'va_list' has changed in GCC 4.4
-#
-# The fact that the mangling changed does not affect the NDK ABI
-# very fortunately (since none of the exposed APIs used va_list
-# in their exported C++ functions). Also, GCC 4.5 has already
-# removed the warning from the compiler.
-#
-$(combo_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS += -Wno-psabi
-
ifneq ($(ARCH_MIPS_PAGE_SHIFT),)
$(combo_2nd_arch_prefix)TARGET_GLOBAL_CFLAGS += -DPAGE_SHIFT=$(ARCH_MIPS_PAGE_SHIFT)
endif
diff --git a/core/combo/TARGET_linux-mips64.mk b/core/combo/TARGET_linux-mips64.mk
index 15f0cb4..463c7a4 100644
--- a/core/combo/TARGET_linux-mips64.mk
+++ b/core/combo/TARGET_linux-mips64.mk
@@ -38,7 +38,7 @@ endif
TARGET_NDK_GCC_VERSION := 4.8
ifeq ($(strip $(TARGET_GCC_VERSION_EXP)),)
-TARGET_GCC_VERSION := 4.8
+TARGET_GCC_VERSION := 4.9
else
TARGET_GCC_VERSION := $(TARGET_GCC_VERSION_EXP)
endif
@@ -97,24 +97,6 @@ TARGET_GLOBAL_CFLAGS += \
-include $(android_config_h) \
-I $(dir $(android_config_h))
-# This warning causes dalvik not to build with gcc 4.6+ and -Werror.
-# We cannot turn it off blindly since the option is not available
-# in gcc-4.4.x.
-ifneq ($(filter 4.6 4.6.% 4.7 4.7.% 4.8, $(TARGET_GCC_VERSION)),)
-TARGET_GLOBAL_CFLAGS += -Wno-unused-but-set-variable \
- -fno-strict-volatile-bitfields
-endif
-
-# This is to avoid the dreaded warning compiler message:
-# note: the mangling of 'va_list' has changed in GCC 4.4
-#
-# The fact that the mangling changed does not affect the NDK ABI
-# very fortunately (since none of the exposed APIs used va_list
-# in their exported C++ functions). Also, GCC 4.5 has already
-# removed the warning from the compiler.
-#
-TARGET_GLOBAL_CFLAGS += -Wno-psabi
-
ifneq ($(ARCH_MIPS_PAGE_SHIFT),)
TARGET_GLOBAL_CFLAGS += -DPAGE_SHIFT=$(ARCH_MIPS_PAGE_SHIFT)
endif
diff --git a/core/combo/arch/mips/mips32-fp.mk b/core/combo/arch/mips/mips32-fp.mk
index e60bdac..8320e93 100644
--- a/core/combo/arch/mips/mips32-fp.mk
+++ b/core/combo/arch/mips/mips32-fp.mk
@@ -4,11 +4,9 @@
ARCH_MIPS_HAS_FPU :=true
ARCH_HAVE_ALIGNED_DOUBLES :=true
arch_variant_cflags := \
- -EL \
- -march=mips32 \
- -mtune=mips32 \
-mips32 \
- -mhard-float
+ -mfp32 \
+ -modd-spreg \
arch_variant_ldflags := \
- -EL
+ -Wl,-melf32ltsmip
diff --git a/core/combo/arch/mips/mips32.mk b/core/combo/arch/mips/mips32.mk
deleted file mode 100644
index 35ef0d8..0000000
--- a/core/combo/arch/mips/mips32.mk
+++ /dev/null
@@ -1,12 +0,0 @@
-# Configuration for Android on MIPS.
-# Generating binaries for MIPS32/soft-float/little-endian
-
-arch_variant_cflags := \
- -EL \
- -march=mips32 \
- -mtune=mips32 \
- -mips32 \
- -msoft-float
-
-arch_variant_ldflags := \
- -EL
diff --git a/core/combo/arch/mips/mips32r2-fp-xburst.mk b/core/combo/arch/mips/mips32r2-fp-xburst.mk
index 8b0fef1..2b4f714 100644
--- a/core/combo/arch/mips/mips32r2-fp-xburst.mk
+++ b/core/combo/arch/mips/mips32r2-fp-xburst.mk
@@ -5,13 +5,11 @@
ARCH_MIPS_HAS_FPU :=true
ARCH_HAVE_ALIGNED_DOUBLES :=true
arch_variant_cflags := \
- -EL \
- -march=mips32r2 \
- -mtune=mips32r2 \
-mips32r2 \
- -mhard-float \
+ -mfp32 \
+ -modd-spreg \
-mno-fused-madd \
-Wa,-mmxu
arch_variant_ldflags := \
- -EL
+ -Wl,-melf32ltsmip
diff --git a/core/combo/arch/mips/mips32r2-fp.mk b/core/combo/arch/mips/mips32r2-fp.mk
index 08d91df..9acb018 100644
--- a/core/combo/arch/mips/mips32r2-fp.mk
+++ b/core/combo/arch/mips/mips32r2-fp.mk
@@ -4,12 +4,10 @@
ARCH_MIPS_HAS_FPU :=true
ARCH_HAVE_ALIGNED_DOUBLES :=true
arch_variant_cflags := \
- -EL \
- -march=mips32r2 \
- -mtune=mips32r2 \
-mips32r2 \
- -mhard-float \
+ -mfp32 \
+ -modd-spreg \
-msynci
arch_variant_ldflags := \
- -EL
+ -Wl,-melf32ltsmip
diff --git a/core/combo/arch/mips/mips32r2.mk b/core/combo/arch/mips/mips32r2.mk
deleted file mode 100644
index 16ce76f..0000000
--- a/core/combo/arch/mips/mips32r2.mk
+++ /dev/null
@@ -1,13 +0,0 @@
-# Configuration for Android on MIPS.
-# Generating binaries for MIPS32R2/soft-float/little-endian
-
-arch_variant_cflags := \
- -EL \
- -march=mips32r2 \
- -mtune=mips32r2 \
- -mips32r2 \
- -msoft-float \
- -msynci
-
-arch_variant_ldflags := \
- -EL
diff --git a/core/combo/arch/mips/mips32r2dsp-fp.mk b/core/combo/arch/mips/mips32r2dsp-fp.mk
index fe2b1fe..c4b49b6 100644
--- a/core/combo/arch/mips/mips32r2dsp-fp.mk
+++ b/core/combo/arch/mips/mips32r2dsp-fp.mk
@@ -6,13 +6,11 @@ ARCH_MIPS_DSP_REV :=1
ARCH_MIPS_HAS_FPU :=true
ARCH_HAVE_ALIGNED_DOUBLES :=true
arch_variant_cflags := \
- -EL \
- -march=mips32r2 \
- -mtune=mips32r2 \
-mips32r2 \
- -mhard-float \
+ -mfp32 \
+ -modd-spreg \
-mdsp \
-msynci
arch_variant_ldflags := \
- -EL
+ -Wl,-melf32ltsmip
diff --git a/core/combo/arch/mips/mips32r2dsp.mk b/core/combo/arch/mips/mips32r2dsp.mk
deleted file mode 100644
index 8a8976c..0000000
--- a/core/combo/arch/mips/mips32r2dsp.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-# Configuration for Android on MIPS.
-# Generating binaries for MIPS32R2/soft-float/little-endian/dsp
-
-ARCH_MIPS_HAS_DSP :=true
-ARCH_MIPS_DSP_REV :=1
-
-arch_variant_cflags := \
- -EL \
- -march=mips32r2 \
- -mtune=mips32r2 \
- -mips32r2 \
- -msoft-float \
- -mdsp \
- -msynci
-
-arch_variant_ldflags := \
- -EL
diff --git a/core/combo/arch/mips/mips32r2dspr2-fp.mk b/core/combo/arch/mips/mips32r2dspr2-fp.mk
index 7e882b3..8b05ffc 100644
--- a/core/combo/arch/mips/mips32r2dspr2-fp.mk
+++ b/core/combo/arch/mips/mips32r2dspr2-fp.mk
@@ -6,13 +6,11 @@ ARCH_MIPS_DSP_REV :=2
ARCH_MIPS_HAS_FPU :=true
ARCH_HAVE_ALIGNED_DOUBLES :=true
arch_variant_cflags := \
- -EL \
- -march=mips32r2 \
- -mtune=mips32r2 \
-mips32r2 \
- -mhard-float \
+ -mfp32 \
+ -modd-spreg \
-mdspr2 \
-msynci
arch_variant_ldflags := \
- -EL
+ -Wl,-melf32ltsmip
diff --git a/core/combo/arch/mips/mips32r2dspr2.mk b/core/combo/arch/mips/mips32r2dspr2.mk
deleted file mode 100644
index c311523..0000000
--- a/core/combo/arch/mips/mips32r2dspr2.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-# Configuration for Android on MIPS.
-# Generating binaries for MIPS32R2/soft-float/little-endian/dsp
-
-ARCH_MIPS_HAS_DSP :=true
-ARCH_MIPS_DSP_REV :=2
-
-arch_variant_cflags := \
- -EL \
- -march=mips32r2 \
- -mtune=mips32r2 \
- -mips32r2 \
- -msoft-float \
- -mdspr2 \
- -msynci
-
-arch_variant_ldflags := \
- -EL
diff --git a/core/combo/arch/mips64/mips64r2.mk b/core/combo/arch/mips64/mips64r2.mk
index 298aeaf..c5710d0 100644
--- a/core/combo/arch/mips64/mips64r2.mk
+++ b/core/combo/arch/mips64/mips64r2.mk
@@ -1,14 +1,10 @@
# Configuration for Android on mips64r2.
+# This target is for temporary use only, until mips64r6 is supported by Android's qemu.
+
ARCH_MIPS_HAS_FPU :=true
ARCH_HAVE_ALIGNED_DOUBLES :=true
arch_variant_cflags := \
- -EL \
- -march=mips64r2 \
- -mtune=mips64r2 \
-mips64r2 \
- -mhard-float \
-msynci
-arch_variant_ldflags := \
- -EL
diff --git a/envsetup.sh b/envsetup.sh
index 6188f26..5c66a9e 100644
--- a/envsetup.sh
+++ b/envsetup.sh
@@ -136,9 +136,7 @@ function setpaths()
arm64) toolchaindir=aarch64/aarch64-linux-android-$targetgccversion/bin;
toolchaindir2=arm/arm-linux-androideabi-$targetgccversion2/bin
;;
- mips) toolchaindir=mips/mipsel-linux-android-$targetgccversion/bin
- ;;
- mips64) toolchaindir=mips/mips64el-linux-android-$targetgccversion/bin
+ mips|mips64) toolchaindir=mips/mips64el-linux-android-$targetgccversion/bin
;;
*)
echo "Can't find toolchain for unknown architecture: $ARCH"
@@ -980,8 +978,7 @@ function gdbclient()
case "$ARCH" in
arm) GDB=arm-linux-androideabi-gdb;;
arm64) GDB=arm-linux-androideabi-gdb; GDB64=aarch64-linux-android-gdb;;
- mips) GDB=mipsel-linux-android-gdb;;
- mips64) GDB=mipsel-linux-android-gdb;;
+ mips|mips64) GDB=mips64el-linux-android-gdb;;
x86) GDB=x86_64-linux-android-gdb;;
x86_64) GDB=x86_64-linux-android-gdb;;
*) echo "Unknown arch $ARCH"; return 1;;
diff --git a/target/board/generic_mips/Android.mk b/target/board/generic_mips/Android.mk
deleted file mode 100644
index abf8d57..0000000
--- a/target/board/generic_mips/Android.mk
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Copyright (C) 2011 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.
-#
-
-LOCAL_PATH := $(call my-dir)