Remove unused mips workarounds.
This was never really finished, and hasn't been supported for years. Test: treehugger Change-Id: I21d4c3112aa8cf0c56e59f0cc19ff8725ef714b9
This commit is contained in:
@@ -49,7 +49,7 @@ var ClangUnknownCflags = sorted([]string{
|
||||
"-Wunused-but-set-variable",
|
||||
"-fdiagnostics-color",
|
||||
|
||||
// arm + arm64 + mips + mips64
|
||||
// arm + arm64
|
||||
"-fgcse-after-reload",
|
||||
"-frerun-cse-after-loop",
|
||||
"-frename-registers",
|
||||
@@ -68,11 +68,6 @@ var ClangUnknownCflags = sorted([]string{
|
||||
"-fno-tree-copy-prop",
|
||||
"-fno-tree-loop-optimize",
|
||||
|
||||
// mips + mips64
|
||||
"-msynci",
|
||||
"-mno-synci",
|
||||
"-mno-fused-madd",
|
||||
|
||||
// x86 + x86_64
|
||||
"-finline-limit=300",
|
||||
"-fno-inline-functions-called-once",
|
||||
|
@@ -1,147 +0,0 @@
|
||||
// Copyright 2015 Google Inc. All rights reserved.
|
||||
//
|
||||
// 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.
|
||||
|
||||
package config
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"android/soong/android"
|
||||
)
|
||||
|
||||
var (
|
||||
mips64Cflags = []string{
|
||||
"-Umips",
|
||||
|
||||
// Help catch common 32/64-bit errors.
|
||||
"-Werror=implicit-function-declaration",
|
||||
}
|
||||
|
||||
mips64ClangCflags = append(mips64Cflags, []string{
|
||||
"-fintegrated-as",
|
||||
}...)
|
||||
|
||||
mips64Cppflags = []string{}
|
||||
|
||||
mips64Ldflags = []string{
|
||||
"-Wl,--allow-shlib-undefined",
|
||||
}
|
||||
|
||||
mips64ArchVariantCflags = map[string][]string{
|
||||
"mips64r2": []string{
|
||||
"-mips64r2",
|
||||
"-msynci",
|
||||
},
|
||||
"mips64r6": []string{
|
||||
"-mips64r6",
|
||||
"-msynci",
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
const (
|
||||
mips64GccVersion = "4.9"
|
||||
)
|
||||
|
||||
func init() {
|
||||
pctx.StaticVariable("mips64GccVersion", mips64GccVersion)
|
||||
|
||||
pctx.SourcePathVariable("Mips64GccRoot",
|
||||
"prebuilts/gcc/${HostPrebuiltTag}/mips/mips64el-linux-android-${mips64GccVersion}")
|
||||
|
||||
pctx.StaticVariable("Mips64IncludeFlags", bionicHeaders("mips"))
|
||||
|
||||
// Clang cflags
|
||||
pctx.StaticVariable("Mips64ClangCflags", strings.Join(ClangFilterUnknownCflags(mips64ClangCflags), " "))
|
||||
pctx.StaticVariable("Mips64ClangLdflags", strings.Join(ClangFilterUnknownCflags(mips64Ldflags), " "))
|
||||
pctx.StaticVariable("Mips64ClangCppflags", strings.Join(ClangFilterUnknownCflags(mips64Cppflags), " "))
|
||||
|
||||
// Extended cflags
|
||||
|
||||
// Architecture variant cflags
|
||||
for variant, cflags := range mips64ArchVariantCflags {
|
||||
pctx.StaticVariable("Mips64"+variant+"VariantClangCflags",
|
||||
strings.Join(ClangFilterUnknownCflags(cflags), " "))
|
||||
}
|
||||
}
|
||||
|
||||
type toolchainMips64 struct {
|
||||
toolchain64Bit
|
||||
clangCflags string
|
||||
toolchainClangCflags string
|
||||
}
|
||||
|
||||
func (t *toolchainMips64) Name() string {
|
||||
return "mips64"
|
||||
}
|
||||
|
||||
func (t *toolchainMips64) GccRoot() string {
|
||||
return "${config.Mips64GccRoot}"
|
||||
}
|
||||
|
||||
func (t *toolchainMips64) GccTriple() string {
|
||||
return "mips64el-linux-android"
|
||||
}
|
||||
|
||||
func (t *toolchainMips64) GccVersion() string {
|
||||
return mips64GccVersion
|
||||
}
|
||||
|
||||
func (t *toolchainMips64) IncludeFlags() string {
|
||||
return "${config.Mips64IncludeFlags}"
|
||||
}
|
||||
|
||||
func (t *toolchainMips64) ClangTriple() string {
|
||||
return t.GccTriple()
|
||||
}
|
||||
|
||||
func (t *toolchainMips64) ToolchainClangCflags() string {
|
||||
return t.toolchainClangCflags
|
||||
}
|
||||
|
||||
func (t *toolchainMips64) ClangAsflags() string {
|
||||
return "-fno-integrated-as"
|
||||
}
|
||||
|
||||
func (t *toolchainMips64) ClangCflags() string {
|
||||
return t.clangCflags
|
||||
}
|
||||
|
||||
func (t *toolchainMips64) ClangCppflags() string {
|
||||
return "${config.Mips64ClangCppflags}"
|
||||
}
|
||||
|
||||
func (t *toolchainMips64) ClangLdflags() string {
|
||||
return "${config.Mips64ClangLdflags}"
|
||||
}
|
||||
|
||||
func (t *toolchainMips64) ClangLldflags() string {
|
||||
// TODO: define and use Mips64ClangLldflags
|
||||
return "${config.Mips64ClangLdflags}"
|
||||
}
|
||||
|
||||
func (toolchainMips64) LibclangRuntimeLibraryArch() string {
|
||||
return "mips64"
|
||||
}
|
||||
|
||||
func mips64ToolchainFactory(arch android.Arch) Toolchain {
|
||||
return &toolchainMips64{
|
||||
clangCflags: "${config.Mips64ClangCflags}",
|
||||
toolchainClangCflags: "${config.Mips64" + arch.ArchVariant + "VariantClangCflags}",
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
registerToolchainFactory(android.Android, android.Mips64, mips64ToolchainFactory)
|
||||
}
|
@@ -1,186 +0,0 @@
|
||||
// Copyright 2015 Google Inc. All rights reserved.
|
||||
//
|
||||
// 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.
|
||||
|
||||
package config
|
||||
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"android/soong/android"
|
||||
)
|
||||
|
||||
var (
|
||||
mipsCflags = []string{
|
||||
"-fomit-frame-pointer",
|
||||
"-Umips",
|
||||
}
|
||||
|
||||
mipsClangCflags = append(mipsCflags, []string{
|
||||
"-fPIC",
|
||||
"-fintegrated-as",
|
||||
}...)
|
||||
|
||||
mipsCppflags = []string{}
|
||||
|
||||
mipsLdflags = []string{
|
||||
"-Wl,--allow-shlib-undefined",
|
||||
}
|
||||
|
||||
mipsToolchainLdflags = []string{
|
||||
"-Wl,-melf32ltsmip",
|
||||
}
|
||||
|
||||
mipsArchVariantCflags = map[string][]string{
|
||||
"mips32-fp": []string{
|
||||
"-mips32",
|
||||
"-mfp32",
|
||||
"-modd-spreg",
|
||||
"-mno-synci",
|
||||
},
|
||||
"mips32r2-fp": []string{
|
||||
"-mips32r2",
|
||||
"-mfp32",
|
||||
"-modd-spreg",
|
||||
"-msynci",
|
||||
},
|
||||
"mips32r2-fp-xburst": []string{
|
||||
"-mips32r2",
|
||||
"-mfp32",
|
||||
"-modd-spreg",
|
||||
"-mno-fused-madd",
|
||||
"-mno-synci",
|
||||
},
|
||||
"mips32r2dsp-fp": []string{
|
||||
"-mips32r2",
|
||||
"-mfp32",
|
||||
"-modd-spreg",
|
||||
"-mdsp",
|
||||
"-msynci",
|
||||
},
|
||||
"mips32r2dspr2-fp": []string{
|
||||
"-mips32r2",
|
||||
"-mfp32",
|
||||
"-modd-spreg",
|
||||
"-mdspr2",
|
||||
"-msynci",
|
||||
},
|
||||
"mips32r6": []string{
|
||||
"-mips32r6",
|
||||
"-mfp64",
|
||||
"-mno-odd-spreg",
|
||||
"-msynci",
|
||||
},
|
||||
}
|
||||
)
|
||||
|
||||
const (
|
||||
mipsGccVersion = "4.9"
|
||||
)
|
||||
|
||||
func init() {
|
||||
pctx.StaticVariable("mipsGccVersion", mipsGccVersion)
|
||||
|
||||
pctx.SourcePathVariable("MipsGccRoot",
|
||||
"prebuilts/gcc/${HostPrebuiltTag}/mips/mips64el-linux-android-${mipsGccVersion}")
|
||||
|
||||
pctx.StaticVariable("MipsToolchainLdflags", strings.Join(mipsToolchainLdflags, " "))
|
||||
pctx.StaticVariable("MipsIncludeFlags", bionicHeaders("mips"))
|
||||
|
||||
// Clang cflags
|
||||
pctx.StaticVariable("MipsClangCflags", strings.Join(ClangFilterUnknownCflags(mipsClangCflags), " "))
|
||||
pctx.StaticVariable("MipsClangLdflags", strings.Join(ClangFilterUnknownCflags(mipsLdflags), " "))
|
||||
pctx.StaticVariable("MipsClangCppflags", strings.Join(ClangFilterUnknownCflags(mipsCppflags), " "))
|
||||
|
||||
// Extended cflags
|
||||
|
||||
// Architecture variant cflags
|
||||
for variant, cflags := range mipsArchVariantCflags {
|
||||
pctx.StaticVariable("Mips"+variant+"VariantClangCflags",
|
||||
strings.Join(ClangFilterUnknownCflags(cflags), " "))
|
||||
}
|
||||
}
|
||||
|
||||
type toolchainMips struct {
|
||||
toolchain32Bit
|
||||
clangCflags string
|
||||
toolchainClangCflags string
|
||||
}
|
||||
|
||||
func (t *toolchainMips) Name() string {
|
||||
return "mips"
|
||||
}
|
||||
|
||||
func (t *toolchainMips) GccRoot() string {
|
||||
return "${config.MipsGccRoot}"
|
||||
}
|
||||
|
||||
func (t *toolchainMips) GccTriple() string {
|
||||
return "mips64el-linux-android"
|
||||
}
|
||||
|
||||
func (t *toolchainMips) GccVersion() string {
|
||||
return mipsGccVersion
|
||||
}
|
||||
|
||||
func (t *toolchainMips) IncludeFlags() string {
|
||||
return "${config.MipsIncludeFlags}"
|
||||
}
|
||||
|
||||
func (t *toolchainMips) ClangTriple() string {
|
||||
return "mipsel-linux-android"
|
||||
}
|
||||
|
||||
func (t *toolchainMips) ToolchainClangLdflags() string {
|
||||
return "${config.MipsToolchainLdflags}"
|
||||
}
|
||||
|
||||
func (t *toolchainMips) ToolchainClangCflags() string {
|
||||
return t.toolchainClangCflags
|
||||
}
|
||||
|
||||
func (t *toolchainMips) ClangAsflags() string {
|
||||
return "-fPIC -fno-integrated-as"
|
||||
}
|
||||
|
||||
func (t *toolchainMips) ClangCflags() string {
|
||||
return t.clangCflags
|
||||
}
|
||||
|
||||
func (t *toolchainMips) ClangCppflags() string {
|
||||
return "${config.MipsClangCppflags}"
|
||||
}
|
||||
|
||||
func (t *toolchainMips) ClangLdflags() string {
|
||||
return "${config.MipsClangLdflags}"
|
||||
}
|
||||
|
||||
func (t *toolchainMips) ClangLldflags() string {
|
||||
// TODO: define and use MipsClangLldflags
|
||||
return "${config.MipsClangLdflags}"
|
||||
}
|
||||
|
||||
func (toolchainMips) LibclangRuntimeLibraryArch() string {
|
||||
return "mips"
|
||||
}
|
||||
|
||||
func mipsToolchainFactory(arch android.Arch) Toolchain {
|
||||
return &toolchainMips{
|
||||
clangCflags: "${config.MipsClangCflags}",
|
||||
toolchainClangCflags: "${config.Mips" + arch.ArchVariant + "VariantClangCflags}",
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
registerToolchainFactory(android.Android, android.Mips, mipsToolchainFactory)
|
||||
}
|
@@ -26,8 +26,6 @@ import sys
|
||||
ALL_ARCHITECTURES = (
|
||||
'arm',
|
||||
'arm64',
|
||||
'mips',
|
||||
'mips64',
|
||||
'x86',
|
||||
'x86_64',
|
||||
)
|
||||
|
@@ -438,11 +438,10 @@ func (linker *baseLinker) linkerFlags(ctx ModuleContext, flags Flags) Flags {
|
||||
}
|
||||
}
|
||||
|
||||
if ctx.useSdk() && (ctx.Arch().ArchType != android.Mips && ctx.Arch().ArchType != android.Mips64) {
|
||||
if ctx.useSdk() {
|
||||
// The bionic linker now has support gnu style 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.
|
||||
flags.Global.LdFlags = append(flags.Global.LdFlags, "-Wl,--hash-style=both")
|
||||
}
|
||||
|
||||
|
@@ -17,7 +17,6 @@ package cc
|
||||
import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/google/blueprint"
|
||||
|
||||
@@ -131,14 +130,6 @@ func (m *headerModule) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||
|
||||
m.licensePath = android.PathForModuleSrc(ctx, String(m.properties.License))
|
||||
|
||||
// When generating NDK prebuilts, skip installing MIPS headers,
|
||||
// but keep them when doing regular platform build.
|
||||
// Ndk_abis property is only set to true with build/soong/scripts/build-ndk-prebuilts.sh
|
||||
// TODO: Revert this once MIPS is supported in NDK again.
|
||||
if ctx.Config().NdkAbis() && strings.Contains(ctx.ModuleName(), "mips") {
|
||||
return
|
||||
}
|
||||
|
||||
srcFiles := android.PathsForModuleSrcExcludes(ctx, m.properties.Srcs, m.properties.Exclude_srcs)
|
||||
for _, header := range srcFiles {
|
||||
installDir := getHeaderInstallDir(ctx, header, String(m.properties.From),
|
||||
|
@@ -133,8 +133,6 @@ func normalizeNdkApiLevel(ctx android.BaseModuleContext, apiLevel string,
|
||||
firstArchVersions := map[android.ArchType]int{
|
||||
android.Arm: minVersion,
|
||||
android.Arm64: 21,
|
||||
android.Mips: minVersion,
|
||||
android.Mips64: 21,
|
||||
android.X86: minVersion,
|
||||
android.X86_64: 21,
|
||||
}
|
||||
|
@@ -307,8 +307,8 @@ func (sanitize *sanitize) begin(ctx BaseModuleContext) {
|
||||
}
|
||||
}
|
||||
|
||||
// CFI needs gold linker, and mips toolchain does not have one.
|
||||
if !ctx.Config().EnableCFI() || ctx.Arch().ArchType == android.Mips || ctx.Arch().ArchType == android.Mips64 {
|
||||
// Is CFI actually enabled?
|
||||
if !ctx.Config().EnableCFI() {
|
||||
s.Cfi = nil
|
||||
s.Diag.Cfi = nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user