summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alvarez <pedro.alvarez@codethink.co.uk>2014-10-19 09:25:53 +0000
committerPedro Alvarez <pedro.alvarez@codethink.co.uk>2014-10-19 09:25:53 +0000
commit6a4fd0cc18a6511876f8221076c58a0edf35ae2d (patch)
tree4b1675187bec496f38e40b6224b5599d17875f69
parent5d4dc49b9060132ea84c40a2a38c59b8b7b1bbdb (diff)
downloaddefinitions-6a4fd0cc18a6511876f8221076c58a0edf35ae2d.tar.gz
Use glibc instead of eglibc
-rw-r--r--strata/build-essential.morph49
-rw-r--r--strata/build-essential/stage2-glibc.morph65
2 files changed, 88 insertions, 26 deletions
diff --git a/strata/build-essential.morph b/strata/build-essential.morph
index 7886b610..23757b74 100644
--- a/strata/build-essential.morph
+++ b/strata/build-essential.morph
@@ -65,11 +65,10 @@ chunks:
- stage1-gcc
build-mode: bootstrap
prefix: /tools
-- name: stage2-eglibc
- morph: strata/build-essential/stage2-eglibc.morph
- repo: upstream:eglibc2
- ref: 43ee5d250ad47d2bee8ec17954efb7f22d2b804c
- unpetrify-ref: baserock/2.15-build-essential
+- name: stage2-glibc
+ morph: strata/build-essential/stage2-glibc.morph
+ repo: upstream:glibc
+ ref: baserock/pedroalvarez/build-essential
build-depends:
- stage1-binutils
- stage1-gcc
@@ -84,7 +83,7 @@ chunks:
build-depends:
- stage1-binutils
- stage1-gcc
- - stage2-eglibc
+ - stage2-glibc
build-mode: bootstrap
prefix: /tools
- name: stage2-gcc-fixed-headers
@@ -95,7 +94,7 @@ chunks:
build-depends:
- stage1-binutils
- stage1-gcc
- - stage2-eglibc
+ - stage2-glibc
build-mode: bootstrap
prefix: /tools
- name: stage2-gcc
@@ -106,19 +105,18 @@ chunks:
build-depends:
- stage1-binutils
- stage1-gcc
- - stage2-eglibc
+ - stage2-glibc
- stage2-gcc-fixed-headers
build-mode: bootstrap
prefix: /tools
- name: stage2-busybox
morph: strata/build-essential/stage2-busybox.morph
repo: upstream:busybox
- ref: eeb9014f28e3aa00673a0fad127e7420da4392db
- unpetrify-ref: baserock/build-essential
+ ref: baserock/pedroalvarez/build-essential
build-depends:
- stage1-binutils
- stage1-gcc
- - stage2-eglibc
+ - stage2-glibc
build-mode: bootstrap
prefix: /tools
- name: stage2-fhs-dirs
@@ -137,7 +135,7 @@ chunks:
build-depends:
- stage1-binutils
- stage1-gcc
- - stage2-eglibc
+ - stage2-glibc
build-mode: bootstrap
prefix: /tools
- name: stage2-make
@@ -148,7 +146,7 @@ chunks:
build-depends:
- stage1-binutils
- stage1-gcc
- - stage2-eglibc
+ - stage2-glibc
build-mode: bootstrap
prefix: /tools
- name: stage2-reset-specs
@@ -160,7 +158,7 @@ chunks:
- stage1-binutils
- stage1-gcc
- stage2-linux-api-headers
- - stage2-eglibc
+ - stage2-glibc
build-mode: bootstrap
prefix: /tools
- name: fhs-dirs
@@ -171,7 +169,7 @@ chunks:
build-depends:
- stage2-binutils
- stage2-busybox
- - stage2-eglibc
+ - stage2-glibc
- stage2-fhs-dirs
- stage2-gawk
- stage2-gcc
@@ -186,7 +184,7 @@ chunks:
build-depends:
- stage2-binutils
- stage2-busybox
- - stage2-eglibc
+ - stage2-glibc
- stage2-fhs-dirs
- stage2-gawk
- stage2-gcc
@@ -201,7 +199,7 @@ chunks:
build-depends:
- stage2-binutils
- stage2-busybox
- - stage2-eglibc
+ - stage2-glibc
- stage2-fhs-dirs
- stage2-gawk
- stage2-gcc
@@ -221,7 +219,7 @@ chunks:
build-depends:
- stage2-binutils
- stage2-busybox
- - stage2-eglibc
+ - stage2-glibc
- stage2-fhs-dirs
- stage2-gawk
- stage2-gcc
@@ -239,7 +237,7 @@ chunks:
build-depends:
- stage2-binutils
- stage2-busybox
- - stage2-eglibc
+ - stage2-glibc
- stage2-fhs-dirs
- stage2-gawk
- stage2-gcc
@@ -251,12 +249,11 @@ chunks:
- name: busybox
morph: strata/build-essential/busybox.morph
repo: upstream:busybox
- ref: bf06394ab87ff22662084c82c1821847c25b7f21
- unpetrify-ref: baserock/build-essential
+ ref: baserock/pedroalvarez/build-essential
build-depends:
- stage2-binutils
- stage2-busybox
- - stage2-eglibc
+ - stage2-glibc
- stage2-fhs-dirs
- stage2-gawk
- stage2-gcc
@@ -272,7 +269,7 @@ chunks:
build-depends:
- stage2-binutils
- stage2-busybox
- - stage2-eglibc
+ - stage2-glibc
- stage2-fhs-dirs
- stage2-gawk
- stage2-gcc
@@ -288,7 +285,7 @@ chunks:
build-depends:
- stage2-binutils
- stage2-busybox
- - stage2-eglibc
+ - stage2-glibc
- stage2-fhs-dirs
- stage2-gawk
- stage2-gcc
@@ -307,7 +304,7 @@ chunks:
build-depends:
- stage2-binutils
- stage2-busybox
- - stage2-eglibc
+ - stage2-glibc
- stage2-fhs-dirs
- stage2-gawk
- stage2-gcc
@@ -323,7 +320,7 @@ chunks:
build-depends:
- stage2-binutils
- stage2-busybox
- - stage2-eglibc
+ - stage2-glibc
- stage2-fhs-dirs
- stage2-gawk
- stage2-gcc
diff --git a/strata/build-essential/stage2-glibc.morph b/strata/build-essential/stage2-glibc.morph
new file mode 100644
index 00000000..8a15147e
--- /dev/null
+++ b/strata/build-essential/stage2-glibc.morph
@@ -0,0 +1,65 @@
+name: stage2-glibc
+kind: chunk
+
+configure-commands:
+- mkdir o
+- |
+ cd o && ../configure \
+ --build=$(../scripts/config.guess) --host=$TARGET_STAGE1 \
+ --prefix="$PREFIX" \
+ `# [1]` --libdir="$PREFIX/lib" \
+ `# [2]` --with-headers="$(pwd)/../../$PREFIX/include" \
+ `# [3]` --disable-profile --enable-kernel=2.6.25 \
+ `# [4]` libc_cv_c_cleanup=yes libc_cv_ctors_header=yes \
+ libc_cv_forced_unwind=yes libc_cv_ssp=no
+
+## Necessary for ARM port
+#- cd libc && ln -s ../ports ports
+#
+## Configure flag notes:
+## 1. Avoid installing to PREFIX/lib64 on x86_64.
+## 2. Location of linux-api-headers.
+## 3. Normal flags. See eglibc.morph.
+## 4. Force configuration values of certain things that can't be detected
+## in a cross-compile.
+#- |
+# export CFLAGS="-O2 $CFLAGS"; export CXX=false; \
+# cd o && ../configure \
+# --build=$(../scripts/config.guess) --host=$TARGET_STAGE1 \
+# --prefix="$PREFIX" \
+# `# [1]` --libdir="$PREFIX/lib" \
+# `# [2]` --with-headers="$(pwd)/../../$PREFIX/include" \
+# `# [3]` --disable-profile --enable-kernel=2.6.25 \
+# --without-cvs --without-selinux \
+# `# [4]` libc_cv_c_cleanup=yes libc_cv_ctors_header=yes \
+# libc_cv_forced_unwind=yes libc_cv_ssp=no
+
+build-commands:
+- cd o && make localtime=UTC
+
+install-commands:
+#- cd o && make install DESTDIR=$DESTDIR
+- cd o && make install_root="$DESTDIR" localtime=UTC install
+- sh stage2-eglibc-fix-specs
+
+## Install a symlink for the program interpreter (ld.so) so that binaries
+## built in stage 3 before the stage 3 eglibc is built can use it.
+## FIXME: get a better way of finding the name of the loader. The lib64
+## path is hardcoded into eglibc in the file
+## sysdeps/unix/sysv/linux/configure.
+- install -d $DESTDIR/lib
+- |
+ cpu=$(echo $TARGET | cut -d '-' -f 1)
+ case "$cpu" in
+ x86_64)
+ install -d "$DESTDIR/lib64"
+ ln -s "$PREFIX/lib/ld-linux-x86-64.so.2" \
+ "$DESTDIR/lib64/ld-linux-x86-64.so.2" ;;
+ ppc64)
+ install -d "$DESTDIR/lib64"
+ ln -s "$PREFIX/lib/ld64.so.1" \
+ "$DESTDIR/lib64/ld64.so.1" ;;
+ *)
+ loader=$(basename $(ls "$DESTDIR$PREFIX"/lib/ld-linux*))
+ ln -s "$PREFIX/lib/$loader" "$DESTDIR/lib/$loader"
+ esac