summaryrefslogtreecommitdiff
path: root/build-essential/glibc.bst
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-02-01 20:37:29 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2017-02-03 19:48:45 +0900
commitd85382e41efbe3f3f9012a08851f93bb4919de65 (patch)
treebdcdac1cd8463f6847b2b30a6b643e715144372d /build-essential/glibc.bst
parent7d6dc7242598361009ab492db2367e545fc53189 (diff)
downloaddefinitions-d85382e41efbe3f3f9012a08851f93bb4919de65.tar.gz
Manual conversion of Baserock's build-essential stratum
This huge commit is a manual conversion, notes on what was needed: o project.conf defines the arch specific stuff which was previously hardcoded into YBD, so the stage1 target and target etc are all defined by the build-essential project.conf o Direct and easy changes for git source representation o Added stage1.bst & stage2.bst "stacks", everything built in stage2 build-depends on stage1.bst, and the final build-essential products build-depend on stage2.bst (note build-depend means to depend _only_ for building, not propagated forward). o Instead of using host tools we build on the GNOME flatpak sdk/platform bundles o Some build-essential morph files use $(dirname $(pwd)) for a sysroot, which is weird, it means the morph files rely on building at one directory below the slash sysroot - in buildstream we build in /buildstream/build which is two - had to replace these with $(dirname $(dirname $(pwd))) instead o Remove the devices sections from the fhs-dirs elements, not allowed to create static device nodes in buildstream.
Diffstat (limited to 'build-essential/glibc.bst')
-rw-r--r--build-essential/glibc.bst76
1 files changed, 76 insertions, 0 deletions
diff --git a/build-essential/glibc.bst b/build-essential/glibc.bst
new file mode 100644
index 00000000..d634b5f7
--- /dev/null
+++ b/build-essential/glibc.bst
@@ -0,0 +1,76 @@
+kind: manual
+
+sources:
+- kind: git
+ url: upstream:glibc
+ track: release/2.22/master
+ ref: b995d95a5943785be3ab862b2d3276f3b4a22481
+
+depends:
+- filename: build-essential/stage2.bst
+ type: build
+- build-essential/linux-api-headers.bst
+
+environment:
+ PATH: /tools/bin:/usr/bin:/bin:/usr/sbin:/sbin
+
+config:
+
+ configure-commands:
+ - mkdir o
+
+ - |
+ case "%{bst-arch}" in
+ armv7*)
+ ARCH_FLAGS="--without-fp" ;;
+ esac
+
+ # We override the PATH here to remove /tools/bin from it.
+ # Thanks to this glibc finds bash in /bin/bash through the /bin
+ # symlink. This is important because glibc changes the path to bash
+ # of the shebang in some scripts and these scripts will be broken if
+ # they point to bash in /tools/bin/bash.
+ export PATH="/usr/bin:/sbin:/bin";
+ export CFLAGS="-O2 $CFLAGS";
+ cd o && ../configure \
+ $ARCH_FLAGS \
+ --prefix="%{prefix}" \
+ --disable-profile \
+ --enable-kernel=3.0.0 \
+ --without-cvs \
+ --without-selinux \
+ --enable-obsolete-rpc
+
+ build-commands:
+ - cd o && make localtime=UTC
+
+ install-commands:
+ - cd o && make install_root="%{install-root}" localtime=UTC install
+ - cd o && make install_root="%{install-root}" localtime=UTC localedata/install-locales
+ - mkdir -p "%{install-root}/etc"
+ - mkdir -p "%{install-root}/etc/ld.so.conf.d"
+ - |
+ cat <<EOF > nsswitch.conf
+ passwd: compat
+ group: compat
+ shadow: compat
+
+ hosts: files myhostname mdns4_minimal [NOTFOUND=return] dns mdns4
+ networks: files
+
+ protocols: db files
+ services: db files
+ ethers: db files
+ rpc: db files
+
+ netgroup: nis
+ EOF
+ - install -m 644 -o root -g root nsswitch.conf "%{install-root}/etc/nsswitch.conf"
+ - |
+ cat <<EOF > ld.so.conf
+ /lib
+ /usr/lib
+ /usr/local/lib
+ include /etc/ld.so.conf.d/*.conf
+ EOF
+ - install -m 644 -o root -g root ld.so.conf "%{install-root}/etc/ld.so.conf"