summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Rosenkraenzer <bero@linaro.org>2017-09-23 21:37:51 +0200
committerBernhard Rosenkraenzer <bero@linaro.org>2017-09-23 21:37:51 +0200
commit44e372358f17aa0f94ca19e58add20643bb71035 (patch)
treec7bcdb0f466e6dbcf605b729617fa66dc5bc190c
parentd5488e80af8afcea18c52aa43645c4756a6dca1f (diff)
downloadaarch64-buildhosts-44e372358f17aa0f94ca19e58add20643bb71035.tar.gz
Update for 8.0.0_r12HEADmaster
-rw-r--r--bionic-aarch64-host.patch13
-rwxr-xr-xbuild-prebuilts18
-rw-r--r--build_soong-aarch64-host.patch178
-rwxr-xr-xdo_build2
4 files changed, 89 insertions, 122 deletions
diff --git a/bionic-aarch64-host.patch b/bionic-aarch64-host.patch
index 9af509d..2d8531a 100644
--- a/bionic-aarch64-host.patch
+++ b/bionic-aarch64-host.patch
@@ -1,16 +1,3 @@
-diff --git a/tests/Android.bp b/tests/Android.bp
-index 519c28c5d..95303cf0d 100644
---- a/tests/Android.bp
-+++ b/tests/Android.bp
-@@ -477,7 +477,7 @@ cc_test {
- "libtest_invalid-zero_shentsize.so",
- "libtest_invalid-zero_shstrndx.so",
- "libtest_invalid-textrels.so",
-- "libtest_invalid-textrels2.so",
-+// "libtest_invalid-textrels2.so",
- "preinit_getauxval_test_helper",
- "preinit_syscall_test_helper",
- "libnstest_private_external",
diff --git a/tests/Android.build.prebuilt.mk b/tests/Android.build.prebuilt.mk
index c98aee24a..9bcc411e1 100644
--- a/tests/Android.build.prebuilt.mk
diff --git a/build-prebuilts b/build-prebuilts
index 3c99285..32637ea 100755
--- a/build-prebuilts
+++ b/build-prebuilts
@@ -11,11 +11,11 @@ export OPTFLAGS="-O2"
export WITH_TESTS=true
NINJA_VERSION=1.7.2
-LLVM_REV=branches/release_50 #tags/RELEASE_401/final
+LLVM_REV=tags/RELEASE_500/final #branches/release_50
CLANG_VERSION=5.0 #4.0.1
GO_VERSION=1.8
BINUTILS_VERSION=2.28
-GCC_VERSION=linaro-snapshot-6.3-2017.05
+GCC_VERSION=linaro-snapshot-7.2-2017.09 #AOSP # 4.9.4 #linaro-snapshot-6.3-2017.05
GLIBC_VERSION=2.25
BISON_VERSION=3.0.4
FLEX_VERSION=2.5.39
@@ -28,7 +28,11 @@ MYDIR="$(realpath $(dirname $0))"
# Enough settings - let's get to work
MFLAGS="-j$(getconf _NPROCESSORS_ONLN)"
-GCC_V=$(echo ${GCC_VERSION} |sed -e 's,^[a-z-]*,,;s,-.*,,')
+if [ "$GCC_VERSION" = "AOSP" ]; then
+ GCC_V=4.9
+else
+ GCC_V=$(echo ${GCC_VERSION} |sed -e 's,^[a-z-]*,,;s,-.*,,')
+fi
mkdir -p prebuilts-tmp
cd prebuilts-tmp
@@ -332,13 +336,19 @@ if ! [ -d binutils-${BINUTILS_VERSION} ]; then
tar xf binutils-${BINUTILS_VERSION}.tar.bz2
fi
if ! [ -d gcc-${GCC_VERSION} ]; then
- if echo ${GCC_VERSION} |grep -q linaro; then
+ if [ "$GCC_VERSION" = "AOSP" ]; then
+ git clone https://android.googlesource.com/toolchain/gcc.git
+ mv gcc/gcc-4.9 .
+ rm -rf gcc
+ GCC_VERSION=4.9
+ elif echo ${GCC_VERSION} |grep -q linaro; then
V=$(echo ${GCC_VERSION} |sed -e 's,^[a-z-]*,,')
wget http://snapshots.linaro.org/components/toolchain/gcc-linaro/${V}/gcc-${GCC_VERSION}.tar.xz
tar xf gcc-${GCC_VERSION}.tar.xz
else
wget http://ftp.gnu.org/pub/gnu/gcc/gcc-${GCC_VERSION}/gcc-${GCC_VERSION}.tar.bz2
tar xf gcc-${GCC_VERSION}.tar.bz2
+ echo ${GCC_VERSION} |cut -d. -f1-2 >gcc-${GCC_VERSION}/gcc/BASE-VER
fi
fi
diff --git a/build_soong-aarch64-host.patch b/build_soong-aarch64-host.patch
index 6899b2e..16e9de2 100644
--- a/build_soong-aarch64-host.patch
+++ b/build_soong-aarch64-host.patch
@@ -1,6 +1,6 @@
-diff -up soong/android/arch.go.soong~ soong/android/arch.go
---- soong/android/arch.go.soong~ 2017-08-09 21:40:23.413357040 +0200
-+++ soong/android/arch.go 2017-08-10 12:41:03.465643399 +0200
+diff -up soong/android/arch.go.bs64~ soong/android/arch.go
+--- soong/android/arch.go.bs64~ 2017-08-22 13:20:59.294703458 +0200
++++ soong/android/arch.go 2017-09-21 08:06:26.177378656 +0200
@@ -199,7 +199,7 @@ var (
Android = NewOsType("android", Device, false)
@@ -10,7 +10,7 @@ diff -up soong/android/arch.go.soong~ soong/android/arch.go
LinuxBionic: []ArchType{X86_64},
Darwin: []ArchType{X86, X86_64},
Windows: []ArchType{X86, X86_64},
-@@ -793,6 +793,7 @@ func decodeTargetProductVariables(config
+@@ -782,6 +782,7 @@ func decodeTargetProductVariables(config
}
if config.Host_bionic != nil && *config.Host_bionic {
@@ -18,10 +18,10 @@ diff -up soong/android/arch.go.soong~ soong/android/arch.go
addTarget(LinuxBionic, "x86_64", nil, nil, nil)
}
-diff -up soong/Android.bp.soong~ soong/Android.bp
---- soong/Android.bp.soong~ 2017-08-10 00:34:29.253072572 +0200
-+++ soong/Android.bp 2017-08-10 12:41:03.465643399 +0200
-@@ -87,6 +87,7 @@ bootstrap_go_package {
+diff -up soong/Android.bp.bs64~ soong/Android.bp
+--- soong/Android.bp.bs64~ 2017-08-22 13:20:59.282703826 +0200
++++ soong/Android.bp 2017-09-21 08:06:26.177378656 +0200
+@@ -94,6 +94,7 @@ bootstrap_go_package {
"cc/config/x86_device.go",
"cc/config/x86_64_device.go",
@@ -29,10 +29,10 @@ diff -up soong/Android.bp.soong~ soong/Android.bp
"cc/config/x86_darwin_host.go",
"cc/config/x86_linux_host.go",
"cc/config/x86_linux_bionic_host.go",
-diff -up soong/android/config.go.soong~ soong/android/config.go
---- soong/android/config.go.soong~ 2017-08-09 21:40:23.414357010 +0200
-+++ soong/android/config.go 2017-08-10 12:41:03.466643368 +0200
-@@ -278,7 +278,12 @@ func (c *config) HostSystemTool(name str
+diff -up soong/android/config.go.bs64~ soong/android/config.go
+--- soong/android/config.go.bs64~ 2017-08-22 13:20:59.294703458 +0200
++++ soong/android/config.go 2017-09-21 08:06:26.177378656 +0200
+@@ -253,7 +253,12 @@ func (c *config) BlueprintToolLocation()
func (c *config) PrebuiltOS() string {
switch runtime.GOOS {
case "linux":
@@ -46,9 +46,9 @@ diff -up soong/android/config.go.soong~ soong/android/config.go
case "darwin":
return "darwin-x86"
default:
-diff -up soong/android/paths.go.soong~ soong/android/paths.go
---- soong/android/paths.go.soong~ 2017-08-09 21:40:23.415356979 +0200
-+++ soong/android/paths.go 2017-08-10 12:41:03.466643368 +0200
+diff -up soong/android/paths.go.bs64~ soong/android/paths.go
+--- soong/android/paths.go.bs64~ 2017-08-22 13:20:59.295703428 +0200
++++ soong/android/paths.go 2017-09-21 08:06:26.178378623 +0200
@@ -18,6 +18,7 @@ import (
"fmt"
"path/filepath"
@@ -57,7 +57,7 @@ diff -up soong/android/paths.go.soong~ soong/android/paths.go
"strings"
"github.com/google/blueprint"
-@@ -697,7 +698,11 @@ func PathForModuleInstall(ctx ModuleInst
+@@ -684,7 +685,11 @@ func PathForModuleInstall(ctx ModuleCont
}
outPaths = []string{"target", "product", ctx.AConfig().DeviceName(), partition}
} else {
@@ -70,39 +70,10 @@ diff -up soong/android/paths.go.soong~ soong/android/paths.go
}
if ctx.Debug() {
outPaths = append([]string{"debug"}, outPaths...)
-diff -up soong/bootstrap.bash.soong~ soong/bootstrap.bash
---- soong/bootstrap.bash.soong~ 2017-08-10 12:41:03.466643368 +0200
-+++ soong/bootstrap.bash 2017-08-10 12:42:05.554725462 +0200
-@@ -30,9 +30,24 @@ export BLUEPRINTDIR="${SRCDIR}/build/blu
- export TOPNAME="Android.bp"
- export RUN_TESTS="-t"
-
-+case $(uname -m) in
-+ x86_64)
-+ ARCH=x86
-+ export GOARCH="amd64"
-+ ;;
-+ aarch64)
-+ ARCH=arm64
-+ export GOARCH="arm64"
-+ ;;
-+ *)
-+ ARCH="$(uname -m)"
-+ export GOARCH="$ARCH"
-+ ;;
-+esac
-+
- case $(uname) in
- Linux)
-- export PREBUILTOS="linux-x86"
-+ export PREBUILTOS="linux-$ARCH"
- ;;
- Darwin)
- export PREBUILTOS="darwin-x86"
-diff -up soong/cc/binary.go.soong~ soong/cc/binary.go
---- soong/cc/binary.go.soong~ 2017-08-09 21:40:23.424356707 +0200
-+++ soong/cc/binary.go 2017-08-10 12:41:03.466643368 +0200
-@@ -244,7 +244,7 @@ func (binary *binaryDecorator) linkerFla
+diff -up soong/cc/binary.go.bs64~ soong/cc/binary.go
+--- soong/cc/binary.go.bs64~ 2017-08-22 13:20:59.307703060 +0200
++++ soong/cc/binary.go 2017-09-21 08:06:26.178378623 +0200
+@@ -245,7 +245,7 @@ func (binary *binaryDecorator) linkerFla
// The linux kernel expects the linker to be an
// absolute path
path := android.PathForOutput(ctx,
@@ -111,9 +82,9 @@ diff -up soong/cc/binary.go.soong~ soong/cc/binary.go
if p, err := filepath.Abs(path.String()); err == nil {
flags.DynamicLinker = p
} else {
-diff -up soong/cc/config/arm64_linux_host.go.soong~ soong/cc/config/arm64_linux_host.go
---- soong/cc/config/arm64_linux_host.go.soong~ 2017-08-10 12:41:05.978565751 +0200
-+++ soong/cc/config/arm64_linux_host.go 2017-08-10 12:41:05.978565751 +0200
+diff -up soong/cc/config/arm64_linux_host.go.bs64~ soong/cc/config/arm64_linux_host.go
+--- soong/cc/config/arm64_linux_host.go.bs64~ 2017-09-21 08:06:26.179378590 +0200
++++ soong/cc/config/arm64_linux_host.go 2017-09-21 08:06:26.179378590 +0200
@@ -0,0 +1,276 @@
+// Copyright 2016 Google Inc. All rights reserved.
+//
@@ -391,9 +362,9 @@ diff -up soong/cc/config/arm64_linux_host.go.soong~ soong/cc/config/arm64_linux_
+ registerToolchainFactory(android.Linux, android.Arm, linuxARMToolchainFactory)
+ registerToolchainFactory(android.Linux, android.Arm64, linuxARM64ToolchainFactory)
+}
-diff -up soong/cc/config/x86_linux_host.go.soong~ soong/cc/config/x86_linux_host.go
---- soong/cc/config/x86_linux_host.go.soong~ 2017-08-09 21:40:23.461355586 +0200
-+++ soong/cc/config/x86_linux_host.go 2017-08-10 12:41:03.467643337 +0200
+diff -up soong/cc/config/x86_linux_host.go.bs64~ soong/cc/config/x86_linux_host.go
+--- soong/cc/config/x86_linux_host.go.bs64~ 2017-08-22 13:20:59.311702938 +0200
++++ soong/cc/config/x86_linux_host.go 2017-09-21 08:06:26.179378590 +0200
@@ -15,6 +15,7 @@
package config
@@ -429,23 +400,22 @@ diff -up soong/cc/config/x86_linux_host.go.soong~ soong/cc/config/x86_linux_host
pctx.StaticVariable("LinuxCflags", strings.Join(linuxCflags, " "))
pctx.StaticVariable("LinuxLdflags", strings.Join(linuxLdflags, " "))
-diff -up soong/root.bp.soong~ soong/root.bp
---- soong/root.bp.soong~ 2017-08-09 21:50:53.664062806 +0200
-+++ soong/root.bp 2017-08-10 12:41:05.954566492 +0200
-@@ -26,7 +26,8 @@ optional_subdirs = [
+diff -up soong/root.bp.bs64~ soong/root.bp
+--- soong/root.bp.bs64~ 2017-09-21 08:06:26.179378590 +0200
++++ soong/root.bp 2017-09-21 08:07:38.321966828 +0200
+@@ -28,7 +28,7 @@ optional_subdirs = [
"libcore",
"libnativehelper",
- "packages/apps/*",
+ "packages/apps/HTMLViewer",
- "prebuilts/clang/host/linux-x86",
-+// "prebuilts/clang/host/linux-x86",
+ "prebuilts/clang/host/linux-arm64",
"prebuilts/ndk",
"prebuilts/sdk",
- "prebuilts/misc",
-diff -up soong/ui/build/config.go.soong~ soong/ui/build/config.go
---- soong/ui/build/config.go.soong~ 2017-08-09 21:40:23.597351467 +0200
-+++ soong/ui/build/config.go 2017-08-10 12:41:05.977565781 +0200
-@@ -433,7 +433,12 @@ func (c *configImpl) hostCrossOut() stri
+ "system/*",
+diff -up soong/ui/build/config.go.bs64~ soong/ui/build/config.go
+--- soong/ui/build/config.go.bs64~ 2017-08-22 13:20:59.333702264 +0200
++++ soong/ui/build/config.go 2017-09-21 08:06:26.179378590 +0200
+@@ -307,7 +307,12 @@ func (c *configImpl) SoongMakeVarsMk() s
func (c *configImpl) HostPrebuiltTag() string {
if runtime.GOOS == "linux" {
@@ -459,48 +429,48 @@ diff -up soong/ui/build/config.go.soong~ soong/ui/build/config.go
} else if runtime.GOOS == "darwin" {
return "darwin-x86"
} else {
-diff -up soong/scripts/microfactory.bash.omv~ soong/scripts/microfactory.bash
---- soong/scripts/microfactory.bash.omv~ 2017-08-10 12:46:52.081867716 +0200
-+++ soong/scripts/microfactory.bash 2017-08-10 12:47:33.672581762 +0200
-@@ -21,9 +21,20 @@
- # ${OUT_DIR_COMMON_BASE}/$(basename ${TOP})
-
- # Ensure GOROOT is set to the in-tree version.
-+case $(uname -m) in
-+ x86_64)
-+ ARCH=x86
-+ ;;
-+ aarch64)
-+ ARCH=arm64
-+ ;;
-+ *)
-+ ARCH="$(uname -m)"
-+ ;;
-+esac
+diff -up soong/soong_ui.bash.omv~ soong/soong_ui.bash
+--- soong/soong_ui.bash.omv~ 2017-09-21 08:22:54.928284298 +0200
++++ soong/soong_ui.bash 2017-09-21 08:24:14.597617535 +0200
+@@ -98,7 +98,11 @@ function run_go
+ export TOP=$(gettop)
case $(uname) in
Linux)
- export GOROOT="${TOP}/prebuilts/go/linux-x86/"
-+ export GOROOT="${TOP}/prebuilts/go/linux-$ARCH/"
++ if [ $(uname -m) = "aarch64" ]; then
++ export GOROOT="${TOP}/prebuilts/go/linux-arm64/"
++ else
++ export GOROOT="${TOP}/prebuilts/go/linux-x86/"
++ fi
;;
Darwin)
export GOROOT="${TOP}/prebuilts/go/darwin-x86/"
-diff -up soong/android/paths_test.go.omv~ soong/android/paths_test.go
---- soong/android/paths_test.go.omv~ 2017-08-10 12:53:08.612221356 +0200
-+++ soong/android/paths_test.go 2017-08-10 12:54:27.686773353 +0200
-@@ -18,6 +18,7 @@ import (
- "errors"
- "fmt"
- "reflect"
-+ "runtime"
- "strings"
- "testing"
-
-@@ -228,7 +229,7 @@ func TestPathForModuleInstall(t *testing
- },
- },
- in: []string{"bin", "my_test"},
-- out: "host/linux-x86/bin/my_test",
-+ out: "host/linux-" + runtime.GOARCH + "/bin/my_test",
- },
+diff -up soong/bootstrap.bash.omv~ soong/bootstrap.bash
+--- soong/bootstrap.bash.omv~ 2017-09-21 08:26:54.570262195 +0200
++++ soong/bootstrap.bash 2017-09-21 08:27:41.337696586 +0200
+@@ -25,7 +25,11 @@ export RUN_TESTS="-t"
+ case $(uname) in
+ Linux)
+ export GOOS="linux"
+- export PREBUILTOS="linux-x86"
++ if [ "$(uname -m)" = "aarch64" ]; then
++ export PREBUILTOS="linux-arm64"
++ else
++ export PREBUILTOS="linux-x86"
++ fi
+ ;;
+ Darwin)
+ export GOOS="darwin"
+@@ -38,7 +38,11 @@ case $(uname) in
+ *) echo "unknown OS:" $(uname) && exit 1;;
+ esac
+ export GOROOT="${SRCDIR}/prebuilts/go/$PREBUILTOS/"
+-export GOARCH="amd64"
++if [ "$(uname -m)" = "aarch64" ]; then
++ export GOARCH="arm64"
++else
++ export GOARCH="amd64"
++fi
+ export GOCHAR="6"
- {
+ if [[ $# -eq 0 ]]; then
diff --git a/do_build b/do_build
index 929feb4..67ada58 100755
--- a/do_build
+++ b/do_build
@@ -2,4 +2,4 @@
rm -rf out
. build/envsetup.sh
lunch hikey-userdebug
-make LLVM_PREBUILTS_VERSION="clang-4.0.1" LLVM_PREBUILTS_BASE="clang-4.0.1" TARGET_GCC_VERSION_EXP=6.3 FORCE_BUILD_LLVM_COMPONENTS=true droidcore
+make LLVM_PREBUILTS_VERSION="clang-5.0" TARGET_GCC_VERSION_EXP=6.3 2ND_TARGET_GCC_VERSION=6.3 FORCE_BUILD_LLVM_COMPONENTS=true droidcore