summaryrefslogtreecommitdiff
path: root/elements/gnu-toolchain/glibc.bst
diff options
context:
space:
mode:
Diffstat (limited to 'elements/gnu-toolchain/glibc.bst')
-rw-r--r--elements/gnu-toolchain/glibc.bst77
1 files changed, 77 insertions, 0 deletions
diff --git a/elements/gnu-toolchain/glibc.bst b/elements/gnu-toolchain/glibc.bst
new file mode 100644
index 00000000..48e9262e
--- /dev/null
+++ b/elements/gnu-toolchain/glibc.bst
@@ -0,0 +1,77 @@
+kind: manual
+
+sources:
+- kind: git
+ url: upstream:glibc
+ track: release/2.25/master
+ ref: adc7e06fb412a2a1ee52f8cb788caf436335b9f3
+
+depends:
+- filename: gnu-toolchain/stage2.bst
+ type: build
+- gnu-toolchain/fhs-dirs.bst
+- gnu-toolchain/linux-api-headers.bst
+
+environment:
+ PATH: /usr/bin:/bin:/usr/sbin:/sbin:/tools/bin:/tools/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"