summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2013-02-08 15:29:01 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2013-03-14 11:10:14 +0000
commit7e69ba13132df002c166c4c6efb6e2568450c2b0 (patch)
treede9d57915e59b904c0d8f3577da91d6e8aec449b
parentfe0cf73ba9641cb217485f486d55d2b64d2c0c7e (diff)
downloaddefinitions-7e69ba13132df002c166c4c6efb6e2568450c2b0.tar.gz
Add new build-essential morphology
-rw-r--r--build-essential.morph261
-rw-r--r--build-essential.morph.yaml270
2 files changed, 508 insertions, 23 deletions
diff --git a/build-essential.morph b/build-essential.morph
index 5a3fb2c0..49843af6 100644
--- a/build-essential.morph
+++ b/build-essential.morph
@@ -4,58 +4,273 @@
"kind": "stratum",
"chunks": [
{
- "name": "binutils",
+ "name": "stage1-binutils",
"repo": "upstream:binutils-redhat",
- "ref": "baserock/build-essential",
+ "ref": "baserock/samthursfield/build-essential-2-rebase",
+ "build-mode": "bootstrap",
+ "prefix": "/tools",
"build-depends": []
},
{
- "name": "busybox",
- "repo": "upstream:busybox",
- "ref": "baserock/build-essential",
- "build-depends": []
+ "name": "stage1-gcc",
+ "repo": "upstream:gcc-tarball",
+ "ref": "baserock/samthursfield/build-essential-2-rebase",
+ "build-mode": "bootstrap",
+ "prefix": "/tools",
+ "build-depends": [
+ "stage1-binutils"
+ ]
},
{
- "name": "eglibc",
+ "name": "stage2-linux-api-headers",
+ "repo": "upstream:linux",
+ "ref": "baserock/samthursfield/build-essential-2-rebase",
+ "build-mode": "bootstrap",
+ "prefix": "/tools",
+ "build-depends": [
+ "stage1-binutils",
+ "stage1-gcc"
+ ]
+ },
+ {
+ "name": "stage2-eglibc",
"repo": "upstream:eglibc2",
- "ref": "baserock/2.15-build-essential",
- "build-depends": []
+ "ref": "baserock/samthursfield/build-essential-2-rebase",
+ "build-mode": "bootstrap",
+ "prefix": "/tools",
+ "build-depends": [
+ "stage1-binutils",
+ "stage1-gcc",
+ "stage2-linux-api-headers"
+ ]
},
{
- "name": "fhs-dirs",
- "repo": "baserock:baserock/fhs-dirs",
- "ref": "master",
- "build-depends": []
+ "name": "stage2-binutils",
+ "repo": "upstream:binutils-redhat",
+ "ref": "baserock/samthursfield/build-essential-2-rebase",
+ "build-mode": "bootstrap",
+ "prefix": "/tools",
+ "build-depends": [
+ "stage1-binutils",
+ "stage1-gcc",
+ "stage2-eglibc"
+ ]
},
{
- "name": "gcc",
+ "name": "stage2-gcc",
"repo": "upstream:gcc-tarball",
- "ref": "baserock/build-essential",
+ "ref": "baserock/samthursfield/build-essential-2-rebase",
+ "build-mode": "bootstrap",
+ "prefix": "/tools",
+ "build-depends": [
+ "stage1-binutils",
+ "stage1-gcc",
+ "stage2-eglibc"
+ ]
+ },
+ {
+ "name": "stage2-busybox",
+ "repo": "upstream:busybox",
+ "ref": "baserock/samthursfield/build-essential-2-rebase",
+ "build-mode": "bootstrap",
+ "prefix": "/tools",
+ "build-depends": [
+ "stage1-binutils",
+ "stage1-gcc",
+ "stage2-eglibc"
+ ]
+ },
+ {
+ "name": "stage2-fhs-dirs",
+ "repo": "baserock:baserock/fhs-dirs",
+ "ref": "baserock/samthursfield/build-essential-2-rebase",
+ "build-mode": "bootstrap",
+ "prefix": "/tools",
"build-depends": []
},
{
+ "name": "stage2-gawk",
+ "repo": "upstream:gawk",
+ "ref": "baserock/samthursfield/build-essential-2-rebase",
+ "build-mode": "bootstrap",
+ "prefix": "/tools",
+ "build-depends": [
+ "stage1-binutils",
+ "stage1-gcc",
+ "stage2-eglibc"
+ ]
+ },
+ {
+ "name": "stage2-make",
+ "repo": "upstream:make",
+ "ref": "baserock/samthursfield/build-essential-2-rebase",
+ "build-mode": "bootstrap",
+ "prefix": "/tools",
+ "build-depends": [
+ "stage1-binutils",
+ "stage1-gcc",
+ "stage2-eglibc"
+ ]
+ },
+ {
+ "name": "fhs-dirs",
+ "repo": "baserock:baserock/fhs-dirs",
+ "ref": "baserock/samthursfield/build-essential-2-rebase",
+ "build-mode": "staging",
+ "prefix": "/usr",
+ "build-depends": [
+ "stage2-binutils",
+ "stage2-busybox",
+ "stage2-eglibc",
+ "stage2-fhs-dirs",
+ "stage2-gawk",
+ "stage2-gcc",
+ "stage2-linux-api-headers",
+ "stage2-make"
+ ]
+ },
+ {
"name": "linux-api-headers",
"repo": "upstream:linux",
- "ref": "baserock/build-essential",
- "build-depends": []
+ "ref": "baserock/samthursfield/build-essential-2-rebase",
+ "build-mode": "staging",
+ "prefix": "/usr",
+ "build-depends": [
+ "stage2-binutils",
+ "stage2-busybox",
+ "stage2-eglibc",
+ "stage2-fhs-dirs",
+ "stage2-gawk",
+ "stage2-gcc",
+ "stage2-linux-api-headers",
+ "stage2-make"
+ ]
+ },
+ {
+ "name": "eglibc",
+ "repo": "upstream:eglibc2",
+ "ref": "baserock/2.15-build-essential",
+ "build-mode": "staging",
+ "prefix": "/usr",
+ "build-depends": [
+ "stage2-binutils",
+ "stage2-busybox",
+ "stage2-eglibc",
+ "stage2-fhs-dirs",
+ "stage2-gawk",
+ "stage2-gcc",
+ "stage2-linux-api-headers",
+ "stage2-make",
+ "linux-api-headers"
+ ]
+ },
+ {
+ "name": "binutils",
+ "repo": "upstream:binutils-redhat",
+ "ref": "baserock/samthursfield/build-essential-2-rebase",
+ "build-mode": "staging",
+ "prefix": "/usr",
+ "build-depends": [
+ "stage2-binutils",
+ "stage2-busybox",
+ "stage2-eglibc",
+ "stage2-fhs-dirs",
+ "stage2-gawk",
+ "stage2-gcc",
+ "stage2-linux-api-headers",
+ "stage2-make",
+ "eglibc"
+ ]
+ },
+ {
+ "name": "busybox",
+ "repo": "upstream:busybox",
+ "ref": "baserock/samthursfield/build-essential-2-rebase",
+ "build-mode": "staging",
+ "prefix": "/usr",
+ "build-depends": [
+ "stage2-binutils",
+ "stage2-busybox",
+ "stage2-eglibc",
+ "stage2-fhs-dirs",
+ "stage2-gawk",
+ "stage2-gcc",
+ "stage2-linux-api-headers",
+ "stage2-make",
+ "eglibc"
+ ]
},
{
"name": "gawk",
"repo": "upstream:gawk",
- "ref": "baserock/build-essential",
- "build-depends": []
+ "ref": "baserock/samthursfield/build-essential-2-rebase",
+ "build-mode": "staging",
+ "prefix": "/usr",
+ "build-depends": [
+ "stage2-binutils",
+ "stage2-busybox",
+ "stage2-eglibc",
+ "stage2-fhs-dirs",
+ "stage2-gawk",
+ "stage2-gcc",
+ "stage2-linux-api-headers",
+ "stage2-make",
+ "eglibc"
+ ]
+ },
+ {
+ "name": "gcc",
+ "repo": "upstream:gcc-tarball",
+ "ref": "baserock/samthursfield/build-essential-2-rebase",
+ "build-mode": "staging",
+ "prefix": "/usr",
+ "build-depends": [
+ "stage2-binutils",
+ "stage2-busybox",
+ "stage2-eglibc",
+ "stage2-fhs-dirs",
+ "stage2-gawk",
+ "stage2-gcc",
+ "stage2-linux-api-headers",
+ "stage2-make",
+ "eglibc"
+ ]
},
{
"name": "make",
"repo": "upstream:make",
- "ref": "baserock/build-essential",
- "build-depends": []
+ "ref": "baserock/samthursfield/build-essential-2-rebase",
+ "build-mode": "staging",
+ "prefix": "/usr",
+ "build-depends": [
+ "stage2-binutils",
+ "stage2-busybox",
+ "stage2-eglibc",
+ "stage2-fhs-dirs",
+ "stage2-gawk",
+ "stage2-gcc",
+ "stage2-linux-api-headers",
+ "stage2-make",
+ "eglibc"
+ ]
},
{
"name": "ccache",
"repo": "upstream:ccache",
- "ref": "baserock/build-essential",
- "build-depends": []
+ "ref": "baserock/samthursfield/build-essential-2-rebase",
+ "build-mode": "staging",
+ "prefix": "/usr",
+ "build-depends": [
+ "stage2-binutils",
+ "stage2-busybox",
+ "stage2-eglibc",
+ "stage2-fhs-dirs",
+ "stage2-gawk",
+ "stage2-gcc",
+ "stage2-linux-api-headers",
+ "stage2-make",
+ "eglibc"
+ ]
}
]
}
diff --git a/build-essential.morph.yaml b/build-essential.morph.yaml
new file mode 100644
index 00000000..e81d9ae5
--- /dev/null
+++ b/build-essential.morph.yaml
@@ -0,0 +1,270 @@
+name: build-essential
+description: Toolchain stratum
+kind: stratum
+
+chunks:
+ # Stage 1: build a minimal cross compiler with the host's tools.
+ #
+ # Starting with a cross compiler ensures that (a) nothing from the host
+ # can leak into the build-essential artifacts, and (b) cross-compiling
+ # build-essential is fully tested and supported, since we always use the
+ # cross code paths.
+
+ - name: stage1-binutils
+ repo: upstream:binutils-redhat
+ ref: baserock/samthursfield/build-essential-2-rebase
+ build-mode: bootstrap
+ prefix: /tools
+ build-depends: []
+
+ - name: stage1-gcc
+ repo: upstream:gcc-tarball
+ ref: baserock/samthursfield/build-essential-2-rebase
+ build-mode: bootstrap
+ prefix: /tools
+ build-depends:
+ - stage1-binutils
+
+ # Stage 2: cross-build the whole of build-essential, using the host's tools
+ # but the cross-compiler toolchain.
+ #
+ # Stage 2 GCC outputs code for the same 'bootstrap' machine as stage 1 GCC,
+ # but because stage 2 GCC is also built to *run* on the bootstrap machine
+ # it can only execute inside the stage 3 chroot (due to being built against
+ # a libc with a non-standard prefix).
+
+ - name: stage2-linux-api-headers
+ repo: upstream:linux
+ ref: baserock/samthursfield/build-essential-2-rebase
+ build-mode: bootstrap
+ prefix: /tools
+ build-depends:
+ - stage1-binutils
+ - stage1-gcc
+
+ - name: stage2-eglibc
+ repo: upstream:eglibc2
+ ref: baserock/samthursfield/build-essential-2-rebase
+ build-mode: bootstrap
+ prefix: /tools
+ build-depends:
+ - stage1-binutils
+ - stage1-gcc
+ - stage2-linux-api-headers
+
+ - name: stage2-binutils
+ repo: upstream:binutils-redhat
+ ref: baserock/samthursfield/build-essential-2-rebase
+ build-mode: bootstrap
+ prefix: /tools
+ build-depends:
+ - stage1-binutils
+ - stage1-gcc
+ - stage2-eglibc
+
+ - name: stage2-gcc
+ repo: upstream:gcc-tarball
+ ref: baserock/samthursfield/build-essential-2-rebase
+ build-mode: bootstrap
+ prefix: /tools
+ build-depends:
+ - stage1-binutils
+ - stage1-gcc
+ - stage2-eglibc
+
+ - name: stage2-busybox
+ repo: upstream:busybox
+ ref: baserock/samthursfield/build-essential-2-rebase
+ build-mode: bootstrap
+ prefix: /tools
+ build-depends:
+ - stage1-binutils
+ - stage1-gcc
+ - stage2-eglibc
+
+ - name: stage2-fhs-dirs
+ repo: baserock:baserock/fhs-dirs
+ ref: baserock/samthursfield/build-essential-2-rebase
+ build-mode: bootstrap
+ prefix: /tools
+ build-depends: []
+
+ - name: stage2-gawk
+ repo: upstream:gawk
+ ref: baserock/samthursfield/build-essential-2-rebase
+ build-mode: bootstrap
+ prefix: /tools
+ build-depends:
+ - stage1-binutils
+ - stage1-gcc
+ - stage2-eglibc
+
+ - name: stage2-make
+ repo: upstream:make
+ ref: baserock/samthursfield/build-essential-2-rebase
+ build-mode: bootstrap
+ prefix: /tools
+ build-depends:
+ - stage1-binutils
+ - stage1-gcc
+ - stage2-eglibc
+
+ # Stage 3: build the whole of build-essential again, this time using a
+ # staging area containing only the output of stage 2. The result of this
+ # build is fully reproducible.
+ #
+ # We do a switch-a-roo between stage 2 and 3: stages 2 chunks are all built
+ # to run on a host *-bootstrap-* while stage 3 chunks are built are native
+ # built for a *-baserock-* machine. This works, because the cross build was
+ # all for show (and cleanliness) and the binaries actually still run on the
+ # the host.
+ #
+ # After build-essential is built we do another trick: stage2-fhs-dirs
+ # symlinks /bin to /tools/bin and /lib to /tools/lib, while the stage 3
+ # chunks actually install things to those directories. FIXME: which breaks
+ # everything!!! This will have to change.
+ #
+
+ - name: fhs-dirs
+ repo: baserock:baserock/fhs-dirs
+ ref: baserock/samthursfield/build-essential-2-rebase
+ build-mode: staging
+ prefix: /usr
+ build-depends:
+ - stage2-binutils
+ - stage2-busybox
+ - stage2-eglibc
+ - stage2-fhs-dirs
+ - stage2-gawk
+ - stage2-gcc
+ - stage2-linux-api-headers
+ - stage2-make
+
+ - name: linux-api-headers
+ repo: upstream:linux
+ ref: baserock/samthursfield/build-essential-2-rebase
+ build-mode: staging
+ prefix: /usr
+ build-depends:
+ - stage2-binutils
+ - stage2-busybox
+ - stage2-eglibc
+ - stage2-fhs-dirs
+ - stage2-gawk
+ - stage2-gcc
+ - stage2-linux-api-headers
+ - stage2-make
+
+ - name: eglibc
+ repo: upstream:eglibc2
+ ref: baserock/2.15-build-essential
+ build-mode: staging
+ prefix: /usr
+ build-depends:
+ - stage2-binutils
+ - stage2-busybox
+ - stage2-eglibc
+ - stage2-fhs-dirs
+ - stage2-gawk
+ - stage2-gcc
+ - stage2-linux-api-headers
+ - stage2-make
+ - linux-api-headers
+
+ - name: binutils
+ repo: upstream:binutils-redhat
+ ref: baserock/samthursfield/build-essential-2-rebase
+ build-mode: staging
+ prefix: /usr
+ build-depends:
+ - stage2-binutils
+ - stage2-busybox
+ - stage2-eglibc
+ - stage2-fhs-dirs
+ - stage2-gawk
+ - stage2-gcc
+ - stage2-linux-api-headers
+ - stage2-make
+ - eglibc
+
+ - name: busybox
+ repo: upstream:busybox
+ ref: baserock/samthursfield/build-essential-2-rebase
+ build-mode: staging
+ prefix: /usr
+ build-depends:
+ - stage2-binutils
+ - stage2-busybox
+ - stage2-eglibc
+ - stage2-fhs-dirs
+ - stage2-gawk
+ - stage2-gcc
+ - stage2-linux-api-headers
+ - stage2-make
+ - eglibc
+
+ - name: gawk
+ repo: upstream:gawk
+ ref: baserock/samthursfield/build-essential-2-rebase
+ build-mode: staging
+ prefix: /usr
+ build-depends:
+ - stage2-binutils
+ - stage2-busybox
+ - stage2-eglibc
+ - stage2-fhs-dirs
+ - stage2-gawk
+ - stage2-gcc
+ - stage2-linux-api-headers
+ - stage2-make
+ - eglibc
+
+ - name: gcc
+ repo: upstream:gcc-tarball
+ ref: baserock/samthursfield/build-essential-2-rebase
+ build-mode: staging
+ prefix: /usr
+ build-depends:
+ - stage2-binutils
+ - stage2-busybox
+ - stage2-eglibc
+ - stage2-fhs-dirs
+ - stage2-gawk
+ - stage2-gcc
+ - stage2-linux-api-headers
+ - stage2-make
+ - eglibc
+
+ - name: make
+ repo: upstream:make
+ ref: baserock/samthursfield/build-essential-2-rebase
+ build-mode: staging
+ prefix: /usr
+ build-depends:
+ - stage2-binutils
+ - stage2-busybox
+ - stage2-eglibc
+ - stage2-fhs-dirs
+ - stage2-gawk
+ - stage2-gcc
+ - stage2-linux-api-headers
+ - stage2-make
+ - eglibc
+
+ # Extras that need to be in build-essential but don't need bootstrapping.
+
+ - name: ccache
+ repo: upstream:ccache
+ ref: baserock/samthursfield/build-essential-2-rebase
+ build-mode: staging
+ prefix: /usr
+ build-depends:
+ - stage2-binutils
+ - stage2-busybox
+ - stage2-eglibc
+ - stage2-fhs-dirs
+ - stage2-gawk
+ - stage2-gcc
+ - stage2-linux-api-headers
+ - stage2-make
+ - eglibc