summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenda Xu <heroxbd@gentoo.org>2018-08-12 17:31:20 +0900
committerBenda Xu <heroxbd@gentoo.org>2018-08-12 17:31:36 +0900
commit44013ded5230f5ddef9b6183678da7a69b0fa2c1 (patch)
treeb09ecb4f5a1534ddffb3a291785e37ea5c29596c
parentsys-libs/bionic: disable relocation packer. (diff)
downloadandroid-44013ded5230f5ddef9b6183678da7a69b0fa2c1.tar.gz
android-44013ded5230f5ddef9b6183678da7a69b0fa2c1.tar.bz2
android-44013ded5230f5ddef9b6183678da7a69b0fa2c1.zip
dev-util/soong: use gentoo host path for toolchain and helpers.
Package-Manager: Portage-2.3.40, Repoman-2.3.9
-rw-r--r--dev-util/soong/Manifest7
-rw-r--r--dev-util/soong/files/soong-gentoo-host-bin.patch29
-rw-r--r--dev-util/soong/files/soong-gentoo-toolchain.patch16
-rw-r--r--dev-util/soong/files/soong-no-bootstrap.patch20
-rw-r--r--dev-util/soong/soong-9999.ebuild8
5 files changed, 69 insertions, 11 deletions
diff --git a/dev-util/soong/Manifest b/dev-util/soong/Manifest
index 9e97326..d3f485f 100644
--- a/dev-util/soong/Manifest
+++ b/dev-util/soong/Manifest
@@ -1,12 +1,13 @@
AUX blueprint-test-go-1.10.patch 1533 BLAKE2B 3f764ea5ac68cdce8ecadb0dc40f4e676d8db21095b88cf99d7aa6c950ffd578029782d075d59290fc4898544458cab730471f9f0581dccefccc5a2951aa7234 SHA512 2846a098840b4543ec34466d5e97d0f6f8b05ba8dbb01e23c4a802a2bc3995fbb64020e88fa49ded8d7cac527cbfbb5614447165f7f17b392925f4f02556d480
AUX soong-9999-bootstrap-clean.patch 1539 BLAKE2B 95c06e8242d4d2e7a65d0f5e25b77bfe8079edf71213be318465250c78a1869e0b9ac0a7bb7be8123f586d1150a86951fb30b021230f3e3857ecdbdadab61d63 SHA512 b08a6314e3bee2b6d3ee7fa60afe3678a61d08c4930f9e55a643cf3bbe3373fef08d245b048a03a246d9cb0f9b3974b7e1dcb3f44f614cd9fd7f062d5c096384
AUX soong-bootstrap-clean.patch 1588 BLAKE2B ec20e7fece7c126a19586d1a6db7264f64f2b427c7386a6a9f2df77d5171a024185e119683ae2d5e87f483937bc05d40b6d3ffd4132826ff7e42448348d96e75 SHA512 bb39af5fd5d8ec310506b8a3bb782389e9a3c4a31429d6cf32f4681b5fee64d41c01ecf05f692060bcf15ff53952a31d1d6ffe2ee4de6a6e65ee8f44cca42972
-AUX soong-gentoo-toolchain.patch 3081 BLAKE2B 9f13b1851f74289e0d0f0bff674a2dc9a33df2d99dff32781e6347567022b6b2815ac0ce77e622298c618e5cc145a15dd0dbe8e6f425dd1fac6dab75682a2589 SHA512 c01803d050527baedf358aa08db34f432019bf76cdfd3f78ddb1cf22c644ead9e368e77e269db99a6fbedf944d7b1b3d6d3120891108d6d268bde1b85c746a99
-AUX soong-no-bootstrap.patch 719 BLAKE2B 2d6bef0e256f4bf1c7bac48b1a725aaf53f061ec04b67dcc47a94fcb406cc32499557c9c97198748a904a6ab5e9a5ff4d375de2ca0f030deabe31e177795b8bd SHA512 05617b717c05eecd1b6971a4e72302341904a23481fccca83beb9b329ba91afda562b0d594600e2a91d784995dcf125fc71c955da60d0a1648128c71ec751c33
+AUX soong-gentoo-host-bin.patch 1141 BLAKE2B d15738ce12aeb54e63e2f540b992fb6ed1989dfbb53a1b53f8cb0a99b3d30be2ae8ce598fb37f13fd68053e1b2deae0a4e112ab243186bf656662484ae278ca2 SHA512 c6eda77f2f2db1c0fe9b2556966b3015bda409198766a22dfca73dfbca2ed944355e129570e626e1849ee00353a9f229678091f66fed4a61bc5b7e270e33169c
+AUX soong-gentoo-toolchain.patch 3277 BLAKE2B a80102f14af1b73768e8efa441bd050ef0ca425c4d0af4ee2c2991b9c41de09446c4cc2b9dc5694e65e84ba12b129790ec56b6286f0ce7a76077cd7a81f66a55 SHA512 b31787d6045ba003be519102a3a2a79c08d4eda1f664f9637f59daada3ea761b0b502642054120b27dd4544f742aafc420ed44ea0a00409030fa72f1092a5437
+AUX soong-no-bootstrap.patch 1519 BLAKE2B 26b70aa67ed07e6ff5166d04f2d11e40b6c9c6a444cb4b8171f3b2d99ea35de194ed3916eb0027d80d2c61b0ae4ece89fa7d61bf48564de11ab40f6faba5d8aa SHA512 f90988259f308a5bc3843965391bad1a2be0f4a64eaa31284a7522d21832bf5e9095c08c3509acbc0ece982888dcb6f90e77116839eadd48be71eb53224e167f
AUX soong-no-kernel-header.patch 346 BLAKE2B 9e830f028a47a031b46c5cefbc4ddafc922b1506756ba36266aa97f48e670efd1bae8a438f712add004b17fff3bf3c3f4c059a48039ee6ef619afc39163445d2 SHA512 b0ae8e277050911baf262a54c7324f03d69e5f8dd87505942d0a554451e69c6d6f0668801b83d66ac5c69d7827ea7d613d1d55e376c761c7e1f54c3b1ff286be
DIST blueprint-8.1.0_p41.tar.gz 114222 BLAKE2B cb2335fd766212d1c3279ae4d6ee91df5f3c3a9522230ca70cbc080eed9b387a7d567963ba8ea5ffc4a48b01400958cc1d619b9da897e0f90a29b4446becdf46 SHA512 8ada4f309767567e7e08e6c8e61f0e442eb14a59333323bb6b47bb72c2b923bbb342166cddf6d31ec05a27f70ae60a981c0c8b4a3438820ce20ef47028e9f02b
DIST soong-8.1.0_p41.tar.gz 355543 BLAKE2B 0d2b47c30d0515426cffa19c73495f68633dcdbcd5fc33fbbabb8892b712eb85ec68657ea73e07b34573af525055c0f791cd6b54ca58dedd5c14bd4af1a37623 SHA512 50f65ac86f4466adfed6fddf6e8288e16fdc0c1717ba57e59d40395115d4f55ceed3407ce6542ef0173c2076783a7bdc908ff0aac6f19aad7c62a8f63daef6e3
DIST vendor-lineage-15.1.tar.gz 49859452 BLAKE2B c4de3918fa6aff6f24b27fdbde5434b2cfb9d8fb8632e64ce007857de3ad08f3a48d50cc8cee158df3daf29d2330f63ae71b433b0cde888ce3f13d152aab8563 SHA512 6f67ddaa087da4c2d379331367b839025aed75a976c05c1f3562f715d05de387a938969488e2979be8286eed1db4a90652c73eec5e58c728174aa50197229fa7
EBUILD soong-8.1.0_p41.ebuild 1676 BLAKE2B f262faa3e8dbe45414160220975c8ca5c64104f3479f8b4fc2bc2fe50b79ce2af3a732375616906c7db1a13b0295dc21e937a208f670aa37d404badd79d2ed68 SHA512 da536c2b5f000739a70c8a932f921ef2d52e3e73e4062dfa4b4c13b56612a6e95346b5cc425f8bfe79493c04e52a79e759d8abf704ae090caaa1f6a5b0a64aca
-EBUILD soong-9999.ebuild 2096 BLAKE2B 0c20f2a06591ccf03299b145b791b5ec26a10c6780faa1080c0ec81cbc4d45dc622fa3568c13712b35f006edac5557740b2d0e0b99ca72af9e37f7a02c7f6f0a SHA512 01bb0ad883c8d577ade15408a855e052f41ecb725374da81b0866f14039aa0529f504c4105794691bbfcdc734cfee6760c78bddf95f0253847b8a024cd792576
+EBUILD soong-9999.ebuild 2235 BLAKE2B efaa432fd695b59851af050c259490e78c8621ea07636d4d2216581d25c0e068893537ff2481f9af198bb3393e71536fd67764f859d14082c40440153322a5be SHA512 627bdd454f463969bab5d3e7061eb353746882f204207bcae0d592eba806680321e850902dd816c19e5bbd3f5405a8a34c29011e9efb1566e59472fc58ce331a
MISC metadata.xml 242 BLAKE2B 08b4880748ab6d685ce28f65a9f6cc5ad62deff8f85d4e0a55a3dc12aa8bd63cf1de56b28ff89929e054a6831e223d6ef0207e8b19c6887f09ee22621bd76928 SHA512 ae57aaeecc094cffa640d88329a0baa6c2b0703330d84f6406f3f68d8bb9b724d2e19a8478be8708de284db9ac452f95f225a9f79cd1c5d0236aa2f9935b9b21
diff --git a/dev-util/soong/files/soong-gentoo-host-bin.patch b/dev-util/soong/files/soong-gentoo-host-bin.patch
new file mode 100644
index 0000000..d53a266
--- /dev/null
+++ b/dev-util/soong/files/soong-gentoo-host-bin.patch
@@ -0,0 +1,29 @@
+Index: soong-9999/build/soong/android/package_ctx.go
+===================================================================
+--- soong-9999.orig/build/soong/android/package_ctx.go
++++ soong-9999/build/soong/android/package_ctx.go
+@@ -82,11 +82,10 @@ func (p AndroidPackageContext) SourcePat
+ func (p AndroidPackageContext) HostBinToolVariable(name, path string) blueprint.Variable {
+ return p.VariableFunc(name, func(config interface{}) (string, error) {
+ ctx := &configErrorWrapper{p, config.(Config), []error{}}
+- p := PathForOutput(ctx, "host", ctx.config.PrebuiltOS(), "bin", path)
+ if len(ctx.errors) > 0 {
+ return "", ctx.errors[0]
+ }
+- return p.String(), nil
++ return path, nil
+ })
+ }
+
+Index: soong-9999/build/soong/genrule/genrule.go
+===================================================================
+--- soong-9999.orig/build/soong/genrule/genrule.go
++++ soong-9999/build/soong/genrule/genrule.go
+@@ -229,7 +229,6 @@ func (g *generator) GenerateAndroidBuild
+
+ ruleParams := blueprint.RuleParams{
+ Command: sandboxCommand,
+- CommandDeps: []string{"$sboxCmd"},
+ }
+ var args []string
+ if g.properties.Depfile {
diff --git a/dev-util/soong/files/soong-gentoo-toolchain.patch b/dev-util/soong/files/soong-gentoo-toolchain.patch
index f9f1a7c..7a7c179 100644
--- a/dev-util/soong/files/soong-gentoo-toolchain.patch
+++ b/dev-util/soong/files/soong-gentoo-toolchain.patch
@@ -41,7 +41,11 @@ Index: soong-9999/build/soong/cc/builder.go
Rspfile: "${out}.rsp",
RspfileContent: "${in}",
},
-@@ -101,14 +96,11 @@ var (
+@@ -97,18 +92,14 @@ var (
+ prefixSymbols = pctx.AndroidStaticRule("prefixSymbols",
+ blueprint.RuleParams{
+ Command: "$objcopyCmd --prefix-symbols=${prefix} ${in} ${out}",
+- CommandDeps: []string{"$objcopyCmd"},
},
"objcopyCmd", "prefix")
@@ -57,7 +61,7 @@ Index: soong-9999/build/soong/cc/builder.go
},
"args", "crossCompile")
-@@ -124,7 +116,7 @@ var (
+@@ -124,7 +115,7 @@ var (
Depfile: "${out}.d",
Deps: blueprint.DepsGCC,
Command: "$copyGccLibPath $out $ccCmd $cFlags -print-file-name=${libName}",
@@ -66,7 +70,7 @@ Index: soong-9999/build/soong/cc/builder.go
},
"ccCmd", "cFlags", "libName")
-@@ -385,7 +377,6 @@ func TransformSourceToObj(ctx android.Mo
+@@ -385,7 +376,6 @@ func TransformSourceToObj(ctx android.Mo
ccDesc := ccCmd
if flags.clang {
@@ -74,7 +78,7 @@ Index: soong-9999/build/soong/cc/builder.go
} else {
ccCmd = gccCmd(flags.toolchain, ccCmd)
}
-@@ -568,7 +559,7 @@ func TransformObjToDynamicBinary(ctx and
+@@ -568,7 +558,7 @@ func TransformObjToDynamicBinary(ctx and
var ldCmd string
if flags.clang {
@@ -83,7 +87,7 @@ Index: soong-9999/build/soong/cc/builder.go
} else {
ldCmd = gccCmd(flags.toolchain, "g++")
}
-@@ -714,7 +705,7 @@ func TransformObjsToObj(ctx android.Modu
+@@ -714,7 +704,7 @@ func TransformObjsToObj(ctx android.Modu
var ldCmd string
if flags.clang {
@@ -92,7 +96,7 @@ Index: soong-9999/build/soong/cc/builder.go
} else {
ldCmd = gccCmd(flags.toolchain, "g++")
}
-@@ -817,7 +808,7 @@ func CopyGccLib(ctx android.ModuleContex
+@@ -817,7 +807,7 @@ func CopyGccLib(ctx android.ModuleContex
}
func gccCmd(toolchain config.Toolchain, cmd string) string {
diff --git a/dev-util/soong/files/soong-no-bootstrap.patch b/dev-util/soong/files/soong-no-bootstrap.patch
index 3104e68..50a0663 100644
--- a/dev-util/soong/files/soong-no-bootstrap.patch
+++ b/dev-util/soong/files/soong-no-bootstrap.patch
@@ -10,3 +10,23 @@ Index: soong-9999/build/blueprint/bootstrap/command.go
ctx.RegisterSingletonType("glob", globSingletonFactory(ctx))
+Index: soong-9999/build/blueprint/bootstrap/glob.go
+===================================================================
+--- soong-9999.orig/build/blueprint/bootstrap/glob.go
++++ soong-9999/build/blueprint/bootstrap/glob.go
+@@ -40,14 +40,13 @@ import (
+ // in a build failure with a "missing and no known rule to make it" error.
+
+ var (
+- globCmd = filepath.Join("$BinDir", "bpglob")
++ globCmd = "bpglob"
+
+ // globRule rule traverses directories to produce a list of files that match $glob
+ // and writes it to $out if it has changed, and writes the directories to $out.d
+ GlobRule = pctx.StaticRule("GlobRule",
+ blueprint.RuleParams{
+ Command: fmt.Sprintf(`%s -o $out $excludes "$glob"`, globCmd),
+- CommandDeps: []string{globCmd},
+ Description: "glob $glob",
+
+ Restat: true,
diff --git a/dev-util/soong/soong-9999.ebuild b/dev-util/soong/soong-9999.ebuild
index 2a6cb31..8cc8c07 100644
--- a/dev-util/soong/soong-9999.ebuild
+++ b/dev-util/soong/soong-9999.ebuild
@@ -28,6 +28,7 @@ PATCHES=(
"${FILESDIR}"/soong-no-kernel-header.patch
"${FILESDIR}"/soong-no-bootstrap.patch
"${FILESDIR}"/soong-gentoo-toolchain.patch
+ "${FILESDIR}"/soong-gentoo-host-bin.patch
)
src_unpack() {
@@ -58,15 +59,18 @@ src_compile() {
eninja -v -f out/.minibootstrap/build.ninja
eninja -v -f out/.bootstrap/build.ninja
+ cd "${S}"/build/${PN}/cmd/sbox
+ go build -v -work
# go run cmd/microfactory/microfactory.go -s cmd/microfactory \
# -pkg-path android/soong=. -o out/soong_ui android/soong/cmd/soong_ui
# eninja -v -f .bootstrap/build.ninja
}
src_install() {
- dobin out/.bootstrap/bin/*
+ dobin out/.bootstrap/bin/* build/${PN}/cmd/sbox/sbox
+
sed -n '/\/\/.*host bionic/,$p' < build/soong/Android.bp > "${T}"/Android.bp
- sed '/build = \[/,+3d' < build/soong/root.bp > "${T}"/root.bp
+ sed -e '/build = \[/,+3d' -e '/vendor/d' < build/soong/root.bp > "${T}"/root.bp
insinto /usr/share/soong
doins "${T}"/{Android,root}.bp
doins -r build/soong/scripts