diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2007-09-15 21:44:18 (GMT) |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2007-09-15 21:44:18 (GMT) |
commit | 3f09a4d4c6b03eaddf1fd33970745dde08c9357e (patch) | |
tree | 60a8c035aa6a7ec3cc91c21ca46f83da5ba67f3c /scripts/build | |
parent | 8ed77399dec08b10ae68f79a2a2f0cb21ba67ffd (diff) |
Further improve the architecture-specific framework.
Apply this framework into building of glibc and gcc.
(Whoo! 500th commit! Yeah!)
Diffstat (limited to 'scripts/build')
-rw-r--r-- | scripts/build/cc_gcc.sh | 29 | ||||
-rw-r--r-- | scripts/build/libc_glibc.sh | 17 |
2 files changed, 10 insertions, 36 deletions
diff --git a/scripts/build/cc_gcc.sh b/scripts/build/cc_gcc.sh index 8e042b3..dba5f2e 100644 --- a/scripts/build/cc_gcc.sh +++ b/scripts/build/cc_gcc.sh @@ -65,13 +65,7 @@ do_cc_core_static() { CT_DoLog EXTRA "Configuring static core C compiler" - extra_config="" - [ "${CT_ARCH_FLOAT_SW}" = "y" ] && extra_config="${extra_config} --with-float=soft" - [ -n "${CT_ARCH_ABI}" ] && extra_config="${extra_config} --with-abi=${CT_ARCH_ABI}" - [ -n "${CT_ARCH_ARCH}" ] && extra_config="${extra_config} --with-arch=${CT_ARCH_ARCH}" - [ -n "${CT_ARCH_CPU}" ] && extra_config="${extra_config} --with-cpu=${CT_ARCH_CPU}" - [ -n "${CT_ARCH_TUNE}" ] && extra_config="${extra_config} --with-tune=${CT_ARCH_TUNE}" - [ -n "${CT_ARCH_FPU}" ] && extra_config="${extra_config} --with-fpu=${CT_ARCH_FPU}" + extra_config="${CT_ARCH_WITH_ARCH} ${CT_ARCH_WITH_ABI} ${CT_ARCH_WITH_CPU} ${CT_ARCH_WITH_TUNE} ${CT_ARCH_WITH_FPU} ${CT_ARCH_WITH_FLOAT}" [ "${CT_CC_CXA_ATEXIT}" = "y" ] && extra_config="${extra_config} --enable-__cxa_atexit" CT_DoLog DEBUG "Extra config passed: \"${extra_config}\"" @@ -123,13 +117,7 @@ do_cc_core_shared() { CT_DoLog EXTRA "Configuring shared core C compiler" - extra_config="" - [ "${CT_ARCH_FLOAT_SW}" = "y" ] && extra_config="${extra_config} --with-float=soft" - [ -n "${CT_ARCH_ABI}" ] && extra_config="${extra_config} --with-abi=${CT_ARCH_ABI}" - [ -n "${CT_ARCH_ARCH}" ] && extra_config="${extra_config} --with-arch=${CT_ARCH_ARCH}" - [ -n "${CT_ARCH_CPU}" ] && extra_config="${extra_config} --with-cpu=${CT_ARCH_CPU}" - [ -n "${CT_ARCH_TUNE}" ] && extra_config="${extra_config} --with-tune=${CT_ARCH_TUNE}" - [ -n "${CT_ARCH_FPU}" ] && extra_config="${extra_config} --with-fpu=${CT_ARCH_FPU}" + extra_config="${CT_ARCH_WITH_ARCH} ${CT_ARCH_WITH_ABI} ${CT_ARCH_WITH_CPU} ${CT_ARCH_WITH_TUNE} ${CT_ARCH_WITH_FPU} ${CT_ARCH_WITH_FLOAT}" [ "${CT_CC_CXA_ATEXIT}" = "y" ] && extra_config="${extra_config} --enable-__cxa_atexit" CT_DoLog DEBUG "Extra config passed: \"${extra_config}\"" @@ -228,18 +216,8 @@ do_cc() { lang_opt=`echo "${lang_opt},${CT_CC_LANG_OTHERS}" |sed -r -e 's/,+/,/g; s/,*$//;'` extra_config="--enable-languages=${lang_opt}" - [ "${CT_ARCH_FLOAT_SW}" = "y" ] && extra_config="${extra_config} --with-float=soft" + extra_config="${extra_config} ${CT_ARCH_WITH_ARCH} ${CT_ARCH_WITH_ABI} ${CT_ARCH_WITH_CPU} ${CT_ARCH_WITH_TUNE} ${CT_ARCH_WITH_FPU} ${CT_ARCH_WITH_FLOAT}" [ "${CT_SHARED_LIBS}" = "y" ] || extra_config="${extra_config} --disable-shared" - [ -n "${CT_ARCH_ABI}" ] && extra_config="${extra_config} --with-abi=${CT_ARCH_ABI}" - [ -n "${CT_ARCH_CPU}" ] && extra_config="${extra_config} --with-cpu=${CT_ARCH_CPU}" - [ -n "${CT_ARCH_TUNE}" ] && extra_config="${extra_config} --with-tune=${CT_ARCH_TUNE}" - [ -n "${CT_ARCH_ARCH}" ] && extra_config="${extra_config} --with-arch=${CT_ARCH_ARCH}" - [ -n "${CT_ARCH_FPU}" ] && extra_config="${extra_config} --with-fpu=${CT_ARCH_FPU}" - if [ "${CT_TARGET_MULTILIB}" = "y" ]; then - extra_config="${extra_config} --enable-multilib" - else - extra_config="${extra_config} --disable-multilib" - fi [ "${CT_CC_CXA_ATEXIT}" == "y" ] && extra_config="${extra_config} --enable-__cxa_atexit" CT_DoLog DEBUG "Extra config passed: \"${extra_config}\"" @@ -268,7 +246,6 @@ do_cc() { make ${PARALLELMFLAGS} all-build-libiberty 2>&1 |CT_DoLog ALL fi - # Idea from <cort.dougan at gmail.com>: # Fix lib/lib64 confusion for GCC 3.3.3 on PowerPC64 and x86_64. # GCC 3.4.0 and up don't suffer from this confusion, and don't need this diff --git a/scripts/build/libc_glibc.sh b/scripts/build/libc_glibc.sh index 0fcb438..75471ff 100644 --- a/scripts/build/libc_glibc.sh +++ b/scripts/build/libc_glibc.sh @@ -155,7 +155,7 @@ do_libc_headers() { case "${CT_THREADS}" in nptl) # NOTE: for some archs, the pathes are different, but they are not - # supported by ct-ng right now. See original crosstool when they are. + # supported by crosstool-NG right now. See original crosstool when they are. pthread_h="${CT_SRC_DIR}/${CT_LIBC_FILE}/${CT_THREADS}/sysdeps/pthread/pthread.h" pthreadtypes_h="${CT_SRC_DIR}/${CT_LIBC_FILE}/nptl/sysdeps/unix/sysv/linux/${CT_KERNEL_ARCH}/bits/pthreadtypes.h" if [ ! -f "${pthreadtypes_h}" ]; then @@ -206,13 +206,9 @@ do_libc_start_files() { y) extra_config="${extra_config} --enable-shared";; *) extra_config="${extra_config} --disable-shared";; esac - case "${CT_LIBC_GLIBC_EXTRA_CONFIG}" in - *--with-fp*) ;; - *--without-fp*) ;; - *) case "${CT_ARCH_FLOAT_HW},${CT_ARCH_FLOAT_SW}" in - y,) extra_config="${extra_config} --with-fp";; - ,y) extra_config="${extra_config} --without-fp";; - esac;; + case "${CT_ARCH_FLOAT_HW},${CT_ARCH_FLOAT_SW}" in + y,) extra_config="${extra_config} --with-fp";; + ,y) extra_config="${extra_config} --without-fp";; esac # Obviously, we want threads, as we come here only for NPTL extra_config="${extra_config} --with-__thread" @@ -238,8 +234,9 @@ do_libc_start_files() { CT_DoLog DEBUG "Extra config args passed: \"${extra_config}\"" CT_DoLog DEBUG "Extra CC args passed : \"${extra_cc_args}\"" - # sh3 and sh4 really need to set configparms as of gcc-3.4/glibc-2.3.2 - # note: this is awkward, doesn't work well if you need more than one line in configparms + # Super-H really needs to set configparms as of gcc-3.4/glibc-2.3.2 + # note: this is awkward, doesn't work well if you need more than one + # line in configparms echo ${CT_LIBC_GLIBC_CONFIGPARMS} > configparms echo "libc_cv_forced_unwind=yes" > config.cache |