From 355df882712697364d7ff75773ddf422ace7be7b Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Sun, 19 Oct 2014 09:25:53 +0000 Subject: Use glibc instead of eglibc --- strata/build-essential.morph | 80 ++++++++++++++---------------- strata/build-essential/eglibc.morph | 62 ----------------------- strata/build-essential/glibc.morph | 79 +++++++++++++++++++++++++++++ strata/build-essential/stage2-eglibc.morph | 56 --------------------- strata/build-essential/stage2-glibc.morph | 57 +++++++++++++++++++++ 5 files changed, 174 insertions(+), 160 deletions(-) delete mode 100644 strata/build-essential/eglibc.morph create mode 100644 strata/build-essential/glibc.morph delete mode 100644 strata/build-essential/stage2-eglibc.morph create mode 100644 strata/build-essential/stage2-glibc.morph diff --git a/strata/build-essential.morph b/strata/build-essential.morph index 90ccdd22..c908aa36 100644 --- a/strata/build-essential.morph +++ b/strata/build-essential.morph @@ -36,7 +36,7 @@ products: include: - fhs-dirs-.* - busybox-.* - - eglibc-nss + - glibc-nss chunks: - name: stage1-binutils morph: strata/build-essential/stage1-binutils.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 @@ -200,15 +198,14 @@ chunks: unpetrify-ref: baserock/bash-4.3-patch-27 build-depends: - stage2-busybox -- name: eglibc - morph: strata/build-essential/eglibc.morph - repo: upstream:eglibc2 - ref: df0258044f321990eadd647e03095a48ad04c1a8 - unpetrify-ref: baserock/2.15-build-essential +- name: glibc + morph: strata/build-essential/glibc.morph + repo: upstream:glibc + ref: baserock/pedroalvarez/build-essential build-depends: - stage2-binutils - stage2-busybox - - stage2-eglibc + - stage2-glibc - stage2-fhs-dirs - stage2-gawk - stage2-gcc @@ -218,9 +215,9 @@ chunks: - linux-api-headers - fake-bash artifacts: - eglibc-gconv: build-essential-runtime - eglibc-libs: build-essential-minimal - eglibc-nss: build-essential-runtime + glibc-gconv: build-essential-runtime + glibc-libs: build-essential-minimal + glibc-nss: build-essential-runtime - name: zlib morph: strata/build-essential/zlib.morph repo: upstream:zlib @@ -229,14 +226,14 @@ chunks: build-depends: - stage2-binutils - stage2-busybox - - stage2-eglibc + - stage2-glibc - stage2-fhs-dirs - stage2-gawk - stage2-gcc - stage2-linux-api-headers - stage2-make - stage2-reset-specs - - eglibc + - glibc artifacts: zlib-libs: build-essential-minimal - name: binutils @@ -247,31 +244,30 @@ chunks: build-depends: - stage2-binutils - stage2-busybox - - stage2-eglibc + - stage2-glibc - stage2-fhs-dirs - stage2-gawk - stage2-gcc - stage2-linux-api-headers - stage2-make - stage2-reset-specs - - eglibc + - glibc - zlib - 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 - stage2-linux-api-headers - stage2-make - stage2-reset-specs - - eglibc + - glibc - name: gawk morph: strata/build-essential/gawk.morph repo: upstream:gawk @@ -280,14 +276,14 @@ chunks: build-depends: - stage2-binutils - stage2-busybox - - stage2-eglibc + - stage2-glibc - stage2-fhs-dirs - stage2-gawk - stage2-gcc - stage2-linux-api-headers - stage2-make - stage2-reset-specs - - eglibc + - glibc - name: gcc morph: strata/build-essential/gcc.morph repo: upstream:gcc-tarball @@ -296,14 +292,14 @@ chunks: build-depends: - stage2-binutils - stage2-busybox - - stage2-eglibc + - stage2-glibc - stage2-fhs-dirs - stage2-gawk - stage2-gcc - stage2-linux-api-headers - stage2-make - stage2-reset-specs - - eglibc + - glibc - zlib artifacts: gcc-libs: build-essential-minimal @@ -315,14 +311,14 @@ chunks: build-depends: - stage2-binutils - stage2-busybox - - stage2-eglibc + - stage2-glibc - stage2-fhs-dirs - stage2-gawk - stage2-gcc - stage2-linux-api-headers - stage2-make - stage2-reset-specs - - eglibc + - glibc - name: ccache morph: strata/build-essential/ccache.morph repo: upstream:ccache @@ -331,12 +327,12 @@ chunks: build-depends: - stage2-binutils - stage2-busybox - - stage2-eglibc + - stage2-glibc - stage2-fhs-dirs - stage2-gawk - stage2-gcc - stage2-linux-api-headers - stage2-make - stage2-reset-specs - - eglibc + - glibc - zlib diff --git a/strata/build-essential/eglibc.morph b/strata/build-essential/eglibc.morph deleted file mode 100644 index cc827ef9..00000000 --- a/strata/build-essential/eglibc.morph +++ /dev/null @@ -1,62 +0,0 @@ -name: eglibc -kind: chunk -products: -- artifact: eglibc-nss - include: - - etc/nsswitch.conf - - (usr/)?lib/libnss.* -- artifact: eglibc-gconv - include: - - (usr/)?lib/gconv/.* -- artifact: eglibc-libs - include: - - sbin/ldconfig - - lib(32|64)?/ld-.* - - (usr/)?lib(exec)?/pt_chown -- artifact: eglibc-bins - include: - - (usr/)?s?bin/.* - - (usr/)?libexec/getconf/.* - - (usr/)?lib/libSegFault\.so(\.\d+)*$ -- artifact: eglibc-libs - include: - - (usr/)?lib(32|64)?/lib[^/]*\.so(\.\d+)*$ -- artifact: eglibc-devel - include: - - (usr/)?include/.* - - (usr/)?lib(32|64)?/lib.*\.a - - (usr/)?lib(32|64)?/lib.*\.la - - (usr/)?(lib(32|64)?|share)/pkgconfig/.*\.pc - - (usr/)?lib(32|64)?/.*\.o -- artifact: eglibc-locale - include: - - (usr/)?share/locale/.* - - (usr/)?share/i18n/.* - - (usr/)?share/zoneinfo/.* -- artifact: eglibc-misc - include: - - .* -configure-commands: -- mkdir o - -# Necessary for ARM port -- cd libc && ln -s ../ports ports - -- | - export CFLAGS="-O2 $CFLAGS"; cd o && - ../libc/configure \ - $(../morph-arch-config) \ - --prefix="$PREFIX" \ - --disable-profile \ - --enable-kernel=2.6.25 \ - --enable-add-ons=nptl,ports \ - --without-cvs \ - --without-selinux - -build-commands: -- cd o && make localtime=UTC - -install-commands: -- cd o && make install_root="$DESTDIR" localtime=UTC install -- mkdir -p "$DESTDIR/etc" -- install -m 644 -o root -g root nsswitch.conf "$DESTDIR/etc/nsswitch.conf" diff --git a/strata/build-essential/glibc.morph b/strata/build-essential/glibc.morph new file mode 100644 index 00000000..6869737d --- /dev/null +++ b/strata/build-essential/glibc.morph @@ -0,0 +1,79 @@ +name: glibc +kind: chunk +products: +- artifact: glibc-nss + include: + - etc/nsswitch.conf + - (usr/)?lib/libnss.* +- artifact: glibc-gconv + include: + - (usr/)?lib/gconv/.* +- artifact: glibc-libs + include: + - sbin/ldconfig + - lib(32|64)?/ld-.* + - (usr/)?lib(exec)?/pt_chown +- artifact: glibc-bins + include: + - (usr/)?s?bin/.* + - (usr/)?libexec/getconf/.* + - (usr/)?lib/libSegFault\.so(\.\d+)*$ +- artifact: glibc-libs + include: + - (usr/)?lib(32|64)?/lib[^/]*\.so(\.\d+)*$ +- artifact: glibc-devel + include: + - (usr/)?include/.* + - (usr/)?lib(32|64)?/lib.*\.a + - (usr/)?lib(32|64)?/lib.*\.la + - (usr/)?(lib(32|64)?|share)/pkgconfig/.*\.pc + - (usr/)?lib(32|64)?/.*\.o +- artifact: glibc-locale + include: + - (usr/)?share/locale/.* + - (usr/)?share/i18n/.* + - (usr/)?share/zoneinfo/.* +- artifact: glibc-misc + include: + - .* +configure-commands: +- mkdir o + +- | + case "$MORPH_ARCH" in + armv7*) + ARCH_FLAGS="--without-fp" ;; + esac + export PATH="/usr/bin:/sbin:/bin"; + export CFLAGS="-O2 $CFLAGS"; + cd o && ../configure \ + $ARCH_FLAGS \ + --prefix="$PREFIX" \ + --disable-profile \ + --enable-kernel=2.6.25 \ + --without-cvs \ + --without-selinux + +build-commands: +- cd o && make localtime=UTC + +install-commands: +- cd o && make install_root="$DESTDIR" localtime=UTC install +- mkdir -p "$DESTDIR/etc" +- | + cat < nsswitch.conf + passwd: compat + group: compat + shadow: compat + + hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 myhostname + 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 "$DESTDIR/etc/nsswitch.conf" diff --git a/strata/build-essential/stage2-eglibc.morph b/strata/build-essential/stage2-eglibc.morph deleted file mode 100644 index 3a7277ac..00000000 --- a/strata/build-essential/stage2-eglibc.morph +++ /dev/null @@ -1,56 +0,0 @@ -name: stage2-eglibc -kind: chunk - -configure-commands: -- mkdir o - -# 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 && ../libc/configure \ - $(../morph-arch-config) \ - --build=$(../libc/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 \ - --enable-add-ons=nptl,ports --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_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 diff --git a/strata/build-essential/stage2-glibc.morph b/strata/build-essential/stage2-glibc.morph new file mode 100644 index 00000000..7393e91b --- /dev/null +++ b/strata/build-essential/stage2-glibc.morph @@ -0,0 +1,57 @@ +name: stage2-glibc +kind: chunk + +configure-commands: +- mkdir o + +# Configure flag notes: +# 1. Avoid installing to PREFIX/lib64 on x86_64. +# 2. Location of linux-api-headers. +# 3. Normal flags. See glibc.morph. +# 4. Force configuration values of certain things that can't be detected +# in a cross-compile. +- | + case "$MORPH_ARCH" in + armv7*) + ARCH_FLAGS="--without-fp" ;; + esac + + export CFLAGS="-O2 $CFLAGS"; export CXX=false; \ + cd o && ../configure \ + $ARCH_FLAGS \ + --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 + +build-commands: +- cd o && make localtime=UTC + +install-commands: +- 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 -- cgit v1.2.1