From cc968d5e85f93e5cfcec7f681e7a0acd75794963 Mon Sep 17 00:00:00 2001 From: Andrew Hsieh Date: Fri, 6 Jun 2014 20:23:18 +0800 Subject: Set gcc4.9 as the default compilers for 64-bit Support for 64-bit aarch64 and mips64 are not great in gcc4.8, and x86_64 follows suite (to use gcc4.9 as the default) for the sake of consistency. gcc-4.8 is removed from 64-bit. As a result, clang with 64-bit target now sets -gcc-toolchain to gcc-4.9 Change-Id: I47babe9bc34d041ea2a99b8839c8ca1688edb055 --- build/core/setup-toolchain.mk | 6 +- build/tools/dev-defaults.sh | 6 +- toolchains/aarch64-linux-android-4.8/config.mk | 20 ------- toolchains/aarch64-linux-android-4.8/setup.mk | 62 -------------------- toolchains/aarch64-linux-android-clang3.4/setup.mk | 2 +- toolchains/mips64el-linux-android-4.8/config.mk | 20 ------- toolchains/mips64el-linux-android-4.8/setup.mk | 66 ---------------------- .../mips64el-linux-android-clang3.4/setup.mk | 2 +- toolchains/x86_64-4.8/config.mk | 20 ------- toolchains/x86_64-4.8/setup.mk | 65 --------------------- toolchains/x86_64-clang3.4/setup.mk | 2 +- 11 files changed, 9 insertions(+), 262 deletions(-) delete mode 100644 toolchains/aarch64-linux-android-4.8/config.mk delete mode 100644 toolchains/aarch64-linux-android-4.8/setup.mk delete mode 100644 toolchains/mips64el-linux-android-4.8/config.mk delete mode 100644 toolchains/mips64el-linux-android-4.8/setup.mk delete mode 100644 toolchains/x86_64-4.8/config.mk delete mode 100644 toolchains/x86_64-4.8/setup.mk diff --git a/build/core/setup-toolchain.mk b/build/core/setup-toolchain.mk index c141e3813..8a0f1419a 100644 --- a/build/core/setup-toolchain.mk +++ b/build/core/setup-toolchain.mk @@ -38,8 +38,8 @@ ifndef NDK_TOOLCHAIN # Filter out 4.7, 4.8 and 4.9 which are newer than the defaultat this moment TARGET_TOOLCHAIN_LIST := $(filter-out %4.7 %4.8 %4.9,$(TARGET_TOOLCHAIN_LIST)) else - # Filter out 4.6 and 4.7 which don't have good 64-bit support in all supported arch - TARGET_TOOLCHAIN_LIST := $(filter-out %4.6 %4.7,$(TARGET_TOOLCHAIN_LIST)) + # Filter out 4.6, 4.7 and 4.8 which don't have good 64-bit support in all supported arch + TARGET_TOOLCHAIN_LIST := $(filter-out %4.6 %4.7 %4.8,$(TARGET_TOOLCHAIN_LIST)) endif ifndef TARGET_TOOLCHAIN_LIST @@ -49,7 +49,7 @@ ifndef NDK_TOOLCHAIN $(call __ndk_error,Aborting) endif # Select the last toolchain from the sorted list. - # For now, this is enough to select by default gcc4.6 for 32-bit, and 4.8 for 64-bit, the the + # For now, this is enough to select by default gcc4.6 for 32-bit, and 4.9 for 64-bit, the the # latest llvm if no gcc ifneq (,$(filter-out llvm-%,$(TARGET_TOOLCHAIN_LIST))) TARGET_TOOLCHAIN := $(firstword $(TARGET_TOOLCHAIN_LIST)) diff --git a/build/tools/dev-defaults.sh b/build/tools/dev-defaults.sh index e39f9e95b..d9bd4088a 100644 --- a/build/tools/dev-defaults.sh +++ b/build/tools/dev-defaults.sh @@ -47,10 +47,10 @@ DEFAULT_GCC_VERSION_LIST="4.6 4.8 4.9" # The default GCC version for 32-bit NDK is the first item in $DEFAULT_GCC_VERSION_LIST DEFAULT_GCC32_VERSION=$(echo "$DEFAULT_GCC_VERSION_LIST" | tr ' ' '\n' | head -n 1) -# The default GCC version for 64-bit is the second item in $DEFAULT_GCC_VERSION_LIST -DEFAULT_GCC64_VERSION=$(echo "$DEFAULT_GCC_VERSION_LIST" | tr ' ' '\n' | head -n 2 | tail -n 1) +# The default GCC version for 64-bit is the last item in $DEFAULT_GCC_VERSION_LIST +DEFAULT_GCC64_VERSION=$(echo "$DEFAULT_GCC_VERSION_LIST" | tr ' ' '\n' | tail -n 1) -# The default GCC version for "clang -gcc-toolchain", is also the second item in $DEFAULT_GCC_VERSION_LIST +# The default GCC version for "clang -gcc-toolchain", is the second item in $DEFAULT_GCC_VERSION_LIST DEFAULT_LLVM_GCC_VERSION=$(echo "$DEFAULT_GCC_VERSION_LIST" | tr ' ' '\n' | head -n 2 | tail -n 1) DEFAULT_BINUTILS_VERSION=2.21 diff --git a/toolchains/aarch64-linux-android-4.8/config.mk b/toolchains/aarch64-linux-android-4.8/config.mk deleted file mode 100644 index 4f5d22057..000000000 --- a/toolchains/aarch64-linux-android-4.8/config.mk +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (C) 2014 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. -# - -# config file for the arm64 gcc-4.8 toolchain for the Android NDK -# the real meat is in the setup.mk file adjacent to this one -# -TOOLCHAIN_ARCH := arm64 -TOOLCHAIN_ABIS := arm64-v8a diff --git a/toolchains/aarch64-linux-android-4.8/setup.mk b/toolchains/aarch64-linux-android-4.8/setup.mk deleted file mode 100644 index e2c5d389d..000000000 --- a/toolchains/aarch64-linux-android-4.8/setup.mk +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright (C) 2014 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. -# - -# this file is used to prepare the NDK to build with the arm64 gcc-4.8 -# toolchain any number of source files -# -# its purpose is to define (or re-define) templates used to build -# various sources into target object files, libraries or executables. -# -# Note that this file may end up being parsed several times in future -# revisions of the NDK. -# - -TOOLCHAIN_NAME := aarch64-linux-android-4.8 -TOOLCHAIN_PREFIX := $(TOOLCHAIN_PREBUILT_ROOT)/bin/aarch64-linux-android- - -TARGET_CFLAGS := \ - -fpic \ - -ffunction-sections \ - -funwind-tables \ - -fstack-protector \ - -no-canonical-prefixes - -TARGET_C_INCLUDES := \ - $(SYSROOT_INC)/usr/include - -TARGET_LDFLAGS := -no-canonical-prefixes - -TARGET_arm64_release_CFLAGS := -O2 \ - -g \ - -DNDEBUG \ - -fomit-frame-pointer \ - -fstrict-aliasing \ - -funswitch-loops \ - -finline-limit=300 - -TARGET_arm64_debug_CFLAGS := $(TARGET_arm64_release_CFLAGS) \ - -O0 \ - -UNDEBUG \ - -fno-omit-frame-pointer \ - -fno-strict-aliasing - -# This function will be called to determine the target CFLAGS used to build -# a C or Assembler source file, based on its tags. -# -TARGET-process-src-files-tags = \ -$(eval __debug_sources := $(call get-src-files-with-tag,debug)) \ -$(eval __release_sources := $(call get-src-files-without-tag,debug)) \ -$(call set-src-files-target-cflags, $(__debug_sources), $(TARGET_x86_64_debug_CFLAGS)) \ -$(call set-src-files-target-cflags, $(__release_sources),$(TARGET_x86_64_release_CFLAGS)) \ diff --git a/toolchains/aarch64-linux-android-clang3.4/setup.mk b/toolchains/aarch64-linux-android-clang3.4/setup.mk index e9c1cb6f0..d297f2967 100644 --- a/toolchains/aarch64-linux-android-clang3.4/setup.mk +++ b/toolchains/aarch64-linux-android-clang3.4/setup.mk @@ -33,7 +33,7 @@ LLVM_TOOLCHAIN_ROOT := $(NDK_ROOT)/toolchains/$(LLVM_NAME) LLVM_TOOLCHAIN_PREBUILT_ROOT := $(call host-prebuilt-tag,$(LLVM_TOOLCHAIN_ROOT)) LLVM_TOOLCHAIN_PREFIX := $(LLVM_TOOLCHAIN_PREBUILT_ROOT)/bin/ -TOOLCHAIN_VERSION := 4.8 +TOOLCHAIN_VERSION := 4.9 TOOLCHAIN_NAME := aarch64-linux-android-$(TOOLCHAIN_VERSION) TOOLCHAIN_ROOT := $(NDK_ROOT)/toolchains/$(TOOLCHAIN_NAME) TOOLCHAIN_PREBUILT_ROOT := $(call host-prebuilt-tag,$(TOOLCHAIN_ROOT)) diff --git a/toolchains/mips64el-linux-android-4.8/config.mk b/toolchains/mips64el-linux-android-4.8/config.mk deleted file mode 100644 index 1b0afc758..000000000 --- a/toolchains/mips64el-linux-android-4.8/config.mk +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (C) 2014 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. -# - -# config file for the mips64el gcc-4.8 toolchain for the Android NDK -# the real meat is in the setup.mk file adjacent to this one -# -TOOLCHAIN_ARCH := mips64 -TOOLCHAIN_ABIS := mips64 diff --git a/toolchains/mips64el-linux-android-4.8/setup.mk b/toolchains/mips64el-linux-android-4.8/setup.mk deleted file mode 100644 index 814c455d4..000000000 --- a/toolchains/mips64el-linux-android-4.8/setup.mk +++ /dev/null @@ -1,66 +0,0 @@ -# Copyright (C) 2014 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. -# - -# this file is used to prepare the NDK to build with the mips64el gcc-4.8 -# toolchain any number of source files -# -# its purpose is to define (or re-define) templates used to build -# various sources into target object files, libraries or executables. -# -# Note that this file may end up being parsed several times in future -# revisions of the NDK. -# - -TARGET_CFLAGS := \ - -fpic \ - -fno-strict-aliasing \ - -finline-functions \ - -ffunction-sections \ - -funwind-tables \ - -fmessage-length=0 \ - -fno-inline-functions-called-once \ - -fgcse-after-reload \ - -frerun-cse-after-loop \ - -frename-registers \ - -no-canonical-prefixes - -TARGET_LDFLAGS := -no-canonical-prefixes - -TARGET_C_INCLUDES := \ - $(SYSROOT_INC)/usr/include - -TARGET_mips64_release_CFLAGS := -O2 \ - -g \ - -DNDEBUG \ - -fomit-frame-pointer \ - -funswitch-loops \ - -finline-limit=300 - -TARGET_mips64_debug_CFLAGS := -O0 \ - -g \ - -fno-omit-frame-pointer - - -# This function will be called to determine the target CFLAGS used to build -# a C or Assembler source file, based on its tags. -TARGET-process-src-files-tags = \ -$(eval __debug_sources := $(call get-src-files-with-tag,debug)) \ -$(eval __release_sources := $(call get-src-files-without-tag,debug)) \ -$(call set-src-files-target-cflags, \ - $(__debug_sources),\ - $(TARGET_mips64_debug_CFLAGS)) \ -$(call set-src-files-target-cflags,\ - $(__release_sources),\ - $(TARGET_mips64_release_CFLAGS)) \ diff --git a/toolchains/mips64el-linux-android-clang3.4/setup.mk b/toolchains/mips64el-linux-android-clang3.4/setup.mk index 1c8a8d33d..f0d3e6cf1 100644 --- a/toolchains/mips64el-linux-android-clang3.4/setup.mk +++ b/toolchains/mips64el-linux-android-clang3.4/setup.mk @@ -33,7 +33,7 @@ LLVM_TOOLCHAIN_ROOT := $(NDK_ROOT)/toolchains/$(LLVM_NAME) LLVM_TOOLCHAIN_PREBUILT_ROOT := $(call host-prebuilt-tag,$(LLVM_TOOLCHAIN_ROOT)) LLVM_TOOLCHAIN_PREFIX := $(LLVM_TOOLCHAIN_PREBUILT_ROOT)/bin/ -TOOLCHAIN_VERSION := 4.8 +TOOLCHAIN_VERSION := 4.9 TOOLCHAIN_NAME := mip64sel-linux-android-$(TOOLCHAIN_VERSION) TOOLCHAIN_ROOT := $(NDK_ROOT)/toolchains/$(TOOLCHAIN_NAME) TOOLCHAIN_PREBUILT_ROOT := $(call host-prebuilt-tag,$(TOOLCHAIN_ROOT)) diff --git a/toolchains/x86_64-4.8/config.mk b/toolchains/x86_64-4.8/config.mk deleted file mode 100644 index 2082f6262..000000000 --- a/toolchains/x86_64-4.8/config.mk +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright (C) 2009 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. -# - -# config file for the x86_64 gcc-4.8 toolchain for the Android NDK -# the real meat is in the setup.mk file adjacent to this one -# -TOOLCHAIN_ARCH := x86_64 -TOOLCHAIN_ABIS := x86_64 diff --git a/toolchains/x86_64-4.8/setup.mk b/toolchains/x86_64-4.8/setup.mk deleted file mode 100644 index 4cb9f1c77..000000000 --- a/toolchains/x86_64-4.8/setup.mk +++ /dev/null @@ -1,65 +0,0 @@ -# Copyright (C) 2009 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. -# - -# this file is used to prepare the NDK to build with the x86_64 gcc-4.8 -# toolchain any number of source files -# -# its purpose is to define (or re-define) templates used to build -# various sources into target object files, libraries or executables. -# -# Note that this file may end up being parsed several times in future -# revisions of the NDK. -# - -TOOLCHAIN_NAME := x86_64-4.8 -TOOLCHAIN_PREFIX := $(TOOLCHAIN_PREBUILT_ROOT)/bin/x86_64-linux-android- - -TARGET_CFLAGS := \ - -ffunction-sections \ - -funwind-tables \ - -fstack-protector \ - -no-canonical-prefixes - -TARGET_C_INCLUDES := \ - $(SYSROOT_INC)/usr/include - -TARGET_LDFLAGS := -no-canonical-prefixes - -TARGET_x86_64_release_CFLAGS := -O2 \ - -g \ - -DNDEBUG \ - -fomit-frame-pointer \ - -fstrict-aliasing \ - -funswitch-loops \ - -finline-limit=300 - -TARGET_x86_64_debug_CFLAGS := $(TARGET_x86_64_release_CFLAGS) \ - -O0 \ - -UNDEBUG \ - -fno-omit-frame-pointer \ - -fno-strict-aliasing - -# This function will be called to determine the target CFLAGS used to build -# a C or Assembler source file, based on its tags. -# -TARGET-process-src-files-tags = \ -$(eval __debug_sources := $(call get-src-files-with-tag,debug)) \ -$(eval __release_sources := $(call get-src-files-without-tag,debug)) \ -$(call set-src-files-target-cflags, $(__debug_sources), $(TARGET_x86_64_debug_CFLAGS)) \ -$(call set-src-files-target-cflags, $(__release_sources),$(TARGET_x86_64_release_CFLAGS)) \ - -# The ABI-specific sub-directory that the SDK tools recognize for -# this toolchain's generated binaries -TARGET_ABI_SUBDIR := x86_64 diff --git a/toolchains/x86_64-clang3.4/setup.mk b/toolchains/x86_64-clang3.4/setup.mk index 4f132b663..2b8c96326 100644 --- a/toolchains/x86_64-clang3.4/setup.mk +++ b/toolchains/x86_64-clang3.4/setup.mk @@ -33,7 +33,7 @@ LLVM_TOOLCHAIN_ROOT := $(NDK_ROOT)/toolchains/$(LLVM_NAME) LLVM_TOOLCHAIN_PREBUILT_ROOT := $(call host-prebuilt-tag,$(LLVM_TOOLCHAIN_ROOT)) LLVM_TOOLCHAIN_PREFIX := $(LLVM_TOOLCHAIN_PREBUILT_ROOT)/bin/ -TOOLCHAIN_VERSION := 4.8 +TOOLCHAIN_VERSION := 4.9 TOOLCHAIN_NAME := x86_64-$(TOOLCHAIN_VERSION) TOOLCHAIN_ROOT := $(NDK_ROOT)/toolchains/$(TOOLCHAIN_NAME) TOOLCHAIN_PREBUILT_ROOT := $(call host-prebuilt-tag,$(TOOLCHAIN_ROOT)) -- cgit v1.2.3