diff options
Diffstat (limited to 'strata/build-essential')
-rw-r--r-- | strata/build-essential/eglibc.morph | 62 | ||||
-rw-r--r-- | strata/build-essential/glibc.morph | 86 | ||||
-rw-r--r-- | strata/build-essential/stage2-glibc.morph (renamed from strata/build-essential/stage2-eglibc.morph) | 25 |
3 files changed, 99 insertions, 74 deletions
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..1de242af --- /dev/null +++ b/strata/build-essential/glibc.morph @@ -0,0 +1,86 @@ +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 + + # 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=2.6.25 \ + --without-cvs \ + --without-selinux \ + --enable-obsolete-rpc + +build-commands: +- cd o && make localtime=UTC + +install-commands: +- cd o && make install_root="$DESTDIR" localtime=UTC install +- mkdir -p "$DESTDIR/etc" +- | + cat <<EOF > 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-glibc.morph index 3a7277ac..ffa0970b 100644 --- a/strata/build-essential/stage2-eglibc.morph +++ b/strata/build-essential/stage2-glibc.morph @@ -1,28 +1,29 @@ -name: stage2-eglibc +name: stage2-glibc 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. +# 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 && ../libc/configure \ - $(../morph-arch-config) \ - --build=$(../libc/scripts/config.guess) --host=$TARGET_STAGE1 \ + 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 \ - --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 @@ -31,12 +32,12 @@ build-commands: install-commands: - cd o && make install_root="$DESTDIR" localtime=UTC install -- sh stage2-eglibc-fix-specs +- sh stage2-glibc-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. +# built in stage 3 before the stage 3 glibc 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 +# path is hardcoded into glibc in the file # sysdeps/unix/sysv/linux/configure. - install -d $DESTDIR/lib - | |