# HG changeset patch # User "Yann E. MORIN" # Date 1296499938 -3600 # Node ID 165eff2a1e10137e22929256b7799bb199dd34ef # Parent e5a0fe2dae5f4a3119ffe90af076c8ba47b28505 libc/glibc: add option to force unwind We make it an option, as not all combinations of architectures vs. compiler vs. glibc/eglibc exhibit the issue. Mostly visible on old glibc versions, it seems... This is a missing part from the glibc/eglibc merger... :-/ Signed-off-by: "Yann E. MORIN" diff -r e5a0fe2dae5f -r 165eff2a1e10 config/libc/glibc-eglibc.in-common --- a/config/libc/glibc-eglibc.in-common Sun Jan 30 19:31:51 2011 +0100 +++ b/config/libc/glibc-eglibc.in-common Mon Jan 31 19:52:18 2011 +0100 @@ -77,6 +77,21 @@ If this option is not set, (e)glibc will choose for you. +config LIBC_GLIBC_FORCE_UNWIND + bool + prompt "Force unwind support (READ HELP!)" + default n + help + If your toolchain fails building while building the C library + start files, or the complete C library, with a message like: + configure: error: forced unwind support is required + + then you may try setting this to 'y'. Otherwise, leave it to 'n'. + + The issue seems to be related to building NPTL on old versions + of glibc (and possibly eglibc as well) on some architectures + (seen on s390, s390x and x86_64). + config LIBC_GLIBC_USE_PORTS bool prompt "Use the ports addon" diff -r e5a0fe2dae5f -r 165eff2a1e10 scripts/build/libc/glibc-eglibc.sh-common --- a/scripts/build/libc/glibc-eglibc.sh-common Sun Jan 30 19:31:51 2011 +0100 +++ b/scripts/build/libc/glibc-eglibc.sh-common Mon Jan 31 19:52:18 2011 +0100 @@ -29,6 +29,15 @@ CT_DoLog DEBUG "Using ar for target: '${cross_ar}'" CT_DoLog DEBUG "Using ranlib for target: '${cross_ranlib}'" + touch config.cache + if [ "${CT_LIBC_GLIBC_FORCE_UNWIND}" = "y" ]; then + echo "libc_cv_forced_unwind=yes" >>config.cache + echo "libc_cv_c_cleanup=yes" >>config.cache + fi + + # Pre-seed the configparms file with values from the config option + printf "${CT_LIBC_GLIBC_CONFIGPARMS}\n" > configparms + BUILD_CC="${CT_BUILD}-gcc" \ CC=${cross_cc} \ CXX=${cross_cxx} \ @@ -40,6 +49,7 @@ --with-headers="${CT_HEADERS_DIR}" \ --build="${CT_BUILD}" \ --host="${CT_TARGET}" \ + --cache-file="$(pwd)/config.cache" \ --disable-profile \ --without-gd \ --without-cvs \ @@ -173,6 +183,12 @@ extra_cc_args="${extra_cc_args} ${CT_ARCH_ENDIAN_OPT}" + touch config.cache + if [ "${CT_LIBC_GLIBC_FORCE_UNWIND}" = "y" ]; then + echo "libc_cv_forced_unwind=yes" >>config.cache + echo "libc_cv_c_cleanup=yes" >>config.cache + fi + # Pre-seed the configparms file with values from the config option printf "${CT_LIBC_GLIBC_CONFIGPARMS}\n" > configparms @@ -194,7 +210,7 @@ # Should this change in a future eglibc release, we'd better # directly mangle the generated scripts _after_ they get built, # or even after they get installed... eglibc is such a sucker... - echo "ac_cv_path_BASH_SHELL=/bin/bash" >config.cache + echo "ac_cv_path_BASH_SHELL=/bin/bash" >>config.cache # Configure with --prefix the way we want it on the target... # There are a whole lot of settings here. You'll probably want @@ -214,10 +230,10 @@ --prefix=/usr \ --build=${CT_BUILD} \ --host=${CT_TARGET} \ + --cache-file="$(pwd)/config.cache" \ --without-cvs \ --disable-profile \ --without-gd \ - --cache-file=config.cache \ --with-headers="${CT_HEADERS_DIR}" \ "${extra_config[@]}" \ ${CT_LIBC_GLIBC_EXTRA_CONFIG}