1.1 --- a/config/libc/glibc-eglibc.in-common Sun Jan 30 19:31:51 2011 +0100
1.2 +++ b/config/libc/glibc-eglibc.in-common Mon Jan 31 19:52:18 2011 +0100
1.3 @@ -77,6 +77,21 @@
1.4
1.5 If this option is not set, (e)glibc will choose for you.
1.6
1.7 +config LIBC_GLIBC_FORCE_UNWIND
1.8 + bool
1.9 + prompt "Force unwind support (READ HELP!)"
1.10 + default n
1.11 + help
1.12 + If your toolchain fails building while building the C library
1.13 + start files, or the complete C library, with a message like:
1.14 + configure: error: forced unwind support is required
1.15 +
1.16 + then you may try setting this to 'y'. Otherwise, leave it to 'n'.
1.17 +
1.18 + The issue seems to be related to building NPTL on old versions
1.19 + of glibc (and possibly eglibc as well) on some architectures
1.20 + (seen on s390, s390x and x86_64).
1.21 +
1.22 config LIBC_GLIBC_USE_PORTS
1.23 bool
1.24 prompt "Use the ports addon"
2.1 --- a/scripts/build/libc/glibc-eglibc.sh-common Sun Jan 30 19:31:51 2011 +0100
2.2 +++ b/scripts/build/libc/glibc-eglibc.sh-common Mon Jan 31 19:52:18 2011 +0100
2.3 @@ -29,6 +29,15 @@
2.4 CT_DoLog DEBUG "Using ar for target: '${cross_ar}'"
2.5 CT_DoLog DEBUG "Using ranlib for target: '${cross_ranlib}'"
2.6
2.7 + touch config.cache
2.8 + if [ "${CT_LIBC_GLIBC_FORCE_UNWIND}" = "y" ]; then
2.9 + echo "libc_cv_forced_unwind=yes" >>config.cache
2.10 + echo "libc_cv_c_cleanup=yes" >>config.cache
2.11 + fi
2.12 +
2.13 + # Pre-seed the configparms file with values from the config option
2.14 + printf "${CT_LIBC_GLIBC_CONFIGPARMS}\n" > configparms
2.15 +
2.16 BUILD_CC="${CT_BUILD}-gcc" \
2.17 CC=${cross_cc} \
2.18 CXX=${cross_cxx} \
2.19 @@ -40,6 +49,7 @@
2.20 --with-headers="${CT_HEADERS_DIR}" \
2.21 --build="${CT_BUILD}" \
2.22 --host="${CT_TARGET}" \
2.23 + --cache-file="$(pwd)/config.cache" \
2.24 --disable-profile \
2.25 --without-gd \
2.26 --without-cvs \
2.27 @@ -173,6 +183,12 @@
2.28
2.29 extra_cc_args="${extra_cc_args} ${CT_ARCH_ENDIAN_OPT}"
2.30
2.31 + touch config.cache
2.32 + if [ "${CT_LIBC_GLIBC_FORCE_UNWIND}" = "y" ]; then
2.33 + echo "libc_cv_forced_unwind=yes" >>config.cache
2.34 + echo "libc_cv_c_cleanup=yes" >>config.cache
2.35 + fi
2.36 +
2.37 # Pre-seed the configparms file with values from the config option
2.38 printf "${CT_LIBC_GLIBC_CONFIGPARMS}\n" > configparms
2.39
2.40 @@ -194,7 +210,7 @@
2.41 # Should this change in a future eglibc release, we'd better
2.42 # directly mangle the generated scripts _after_ they get built,
2.43 # or even after they get installed... eglibc is such a sucker...
2.44 - echo "ac_cv_path_BASH_SHELL=/bin/bash" >config.cache
2.45 + echo "ac_cv_path_BASH_SHELL=/bin/bash" >>config.cache
2.46
2.47 # Configure with --prefix the way we want it on the target...
2.48 # There are a whole lot of settings here. You'll probably want
2.49 @@ -214,10 +230,10 @@
2.50 --prefix=/usr \
2.51 --build=${CT_BUILD} \
2.52 --host=${CT_TARGET} \
2.53 + --cache-file="$(pwd)/config.cache" \
2.54 --without-cvs \
2.55 --disable-profile \
2.56 --without-gd \
2.57 - --cache-file=config.cache \
2.58 --with-headers="${CT_HEADERS_DIR}" \
2.59 "${extra_config[@]}" \
2.60 ${CT_LIBC_GLIBC_EXTRA_CONFIG}