1.1 --- a/scripts/build/libc/glibc.sh Thu Nov 11 01:11:17 2010 +0100
1.2 +++ b/scripts/build/libc/glibc.sh Mon Jan 03 23:40:22 2011 +0100
1.3 @@ -144,33 +144,6 @@
1.4
1.5 CT_DoLog EXTRA "Installing C library headers"
1.6
1.7 - if grep -q GLIBC_2.3 "${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}/ChangeLog"; then
1.8 - # glibc-2.3.x passes cross options to $(CC) when generating errlist-compat.c,
1.9 - # which fails without a real cross-compiler.
1.10 - # Fortunately, we don't need errlist-compat.c, since we just need .h
1.11 - # files, so work around this by creating a fake errlist-compat.c and
1.12 - # satisfying its dependencies.
1.13 - # Another workaround might be to tell configure to not use any cross
1.14 - # options to $(CC).
1.15 - # The real fix would be to get install-headers to not generate
1.16 - # errlist-compat.c.
1.17 - # Note: BOOTSTRAP_GCC is used by:
1.18 - # patches/glibc-2.3.5/glibc-mips-bootstrap-gcc-header-install.patch
1.19 -
1.20 - libc_cv_ppc_machine=yes \
1.21 - CT_DoExecLog ALL \
1.22 - make CFLAGS="-O2 -DBOOTSTRAP_GCC" \
1.23 - OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \
1.24 - PARALLELMFLAGS="${PARALLELMFLAGS}" \
1.25 - sysdeps/gnu/errlist.c
1.26 - mkdir -p stdio-common
1.27 -
1.28 - # sleep for 2 seconds for benefit of filesystems with lousy time
1.29 - # resolution, like FAT, so make knows for sure errlist-compat.c doesn't
1.30 - # need generating
1.31 - sleep 2
1.32 - CT_DoExecLog ALL touch stdio-common/errlist-compat.c
1.33 - fi
1.34 # Note: BOOTSTRAP_GCC (see above)
1.35 libc_cv_ppc_machine=yes \
1.36 CT_DoExecLog ALL \
1.37 @@ -464,29 +437,6 @@
1.38 "${extra_config[@]}" \
1.39 ${CT_LIBC_GLIBC_EXTRA_CONFIG}
1.40
1.41 - if grep -l '^install-lib-all:' "${CT_SRC_DIR}/glibc-${CT_LIBC_VERSION}/Makerules" > /dev/null; then
1.42 - # nptl-era glibc.
1.43 - # If the install-lib-all target (which is added by our make-install-lib-all.patch)
1.44 - # is present, it means we're building glibc-2.3.3 or later, and we can't
1.45 - # build programs yet, as they require libeh, which won't be installed
1.46 - # until full build of gcc
1.47 - # YEM-FIXME: This comment is misleading: latest glibc-s do not have the
1.48 - # make-install-lib-all.patch applied, so do not pass through this
1.49 - # part of the if statement; nonetheless, they do build, and
1.50 - # the result is useable (maybe the dual-pass core gcc is
1.51 - # responsible for this).
1.52 - GLIBC_INITIAL_BUILD_RULE=lib
1.53 - GLIBC_INITIAL_INSTALL_RULE="install-lib-all install-headers"
1.54 - GLIBC_INSTALL_APPS_LATER=yes
1.55 - else
1.56 - # classic glibc.
1.57 - # We can build and install everything with the bootstrap compiler.
1.58 - # YEM-FIXME: See the above FIXME as well.
1.59 - GLIBC_INITIAL_BUILD_RULE=all
1.60 - GLIBC_INITIAL_INSTALL_RULE=install
1.61 - GLIBC_INSTALL_APPS_LATER=no
1.62 - fi
1.63 -
1.64 # glibc initial build hacks
1.65 # http://sourceware.org/ml/crossgcc/2008-10/msg00068.html
1.66 case "${CT_ARCH},${CT_ARCH_CPU}" in
1.67 @@ -506,14 +456,14 @@
1.68 OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \
1.69 ASFLAGS="${GLIBC_INITIAL_BUILD_ASFLAGS}" \
1.70 PARALLELMFLAGS="${PARALLELMFLAGS}" \
1.71 - ${GLIBC_INITIAL_BUILD_RULE}
1.72 + all
1.73
1.74 CT_DoLog EXTRA "Installing C library"
1.75 CT_DoExecLog ALL make install_root="${CT_SYSROOT_DIR}" \
1.76 ${LIBC_SYSROOT_ARG} \
1.77 OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \
1.78 PARALLELMFLAGS="${PARALLELMFLAGS}" \
1.79 - ${GLIBC_INITIAL_INSTALL_RULE}
1.80 + install
1.81
1.82 # This doesn't seem to work when building a crosscompiler,
1.83 # as it tries to execute localedef using the just-built ld.so!?
1.84 @@ -544,34 +494,7 @@
1.85
1.86 # This function finishes the glibc install
1.87 do_libc_finish() {
1.88 - # Finally, build and install glibc programs, now that libeh (if any) is installed
1.89 - # Don't do this unless needed, 'cause it causes glibc-2.{1.3,2.2} to fail here with
1.90 - # .../gcc-3.4.1-glibc-2.1.3/build-glibc/libc.so.6: undefined reference to `__deregister_frame_info'
1.91 - # .../gcc-3.4.1-glibc-2.1.3/build-glibc/libc.so.6: undefined reference to `__register_frame_info'
1.92 - [ "${GLIBC_INSTALL_APPS_LATER}" = "yes" ] || return 0
1.93 -
1.94 - CT_DoStep INFO "Finishing C library"
1.95 -
1.96 - cd "${CT_BUILD_DIR}/build-libc"
1.97 -
1.98 - CT_DoLog EXTRA "Re-building C library"
1.99 - CT_DoExecLog ALL make LD=${CT_TARGET}-ld \
1.100 - RANLIB=${CT_TARGET}-ranlib \
1.101 - OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \
1.102 - ASFLAGS="${GLIBC_INITIAL_BUILD_ASFLAGS}" \
1.103 - PARALLELMFLAGS="${PARALLELMFLAGS}"
1.104 -
1.105 - CT_DoLog EXTRA "Installing missing C library components"
1.106 - # note: should do full install and then fix linker scripts, but this is faster
1.107 - for t in bin rootsbin sbin data others; do
1.108 - CT_DoExecLog ALL make install_root="${CT_SYSROOT_DIR}" \
1.109 - ${LIBC_SYSROOT_ARG} \
1.110 - OBJDUMP_FOR_HOST="${CT_TARGET}-objdump" \
1.111 - PARALLELMFLAGS="${PARALLELMFLAGS}" \
1.112 - install-${t}
1.113 - done
1.114 -
1.115 - CT_EndStep
1.116 + :
1.117 }
1.118
1.119 # Build up the addons list, separated with $1