This patch reverts SDECFG_ARM_SOFTFLOAT to SDECFG_SOFTFLOAT. New softfloat option is added to config menu under "Architecture, CPU and Optimization" section. It Also adds support to glibc for using softfloat, which was lacking for cross arm glibc compilation.
Feel free to provide feedback, ie. if i need to provide incremental patches instead. thanks, Toan
[ Generated by ./scripts/Create-Diff for T2 9.0-trunk ] --- ./package/base/eglibc/eglibc.conf 2011-04-18 11:21:11.000000000 -0400 +++ ./package/base/eglibc/eglibc.conf 2011-04-18 11:29:45.000000000 -0400 @@ -41,14 +41,15 @@ # glibc does not like -ffast-math var_insert GCC_WRAPPER_REMOVE " " "-ffast-math" -if [[ $arch = arm* ]]; then - if [ $SDECFG_ARM_SOFTFLOAT -eq 1 ]; then - var_append confopt ' ' '--with-fp' - else - var_append confopt ' ' '--without-fp' - fi + +if [ $SDECFG_SOFTFLOAT -eq 1 ]; then + # Disable hardware floating point + var_append confopt ' ' '--without-fp' +else + var_append confopt ' ' '--with-fp' fi + # We must use an 'objdir' directory for building glibc # Disable glibc internal debuging but build debuging and profile # code so we can use this glibc to debug other programs. --- ./package/base/glibc/glibc.conf 2011-04-18 11:32:21.000000000 -0400 +++ ./package/base/glibc/glibc.conf 2011-04-18 11:31:55.000000000 -0400 @@ -29,7 +29,15 @@ # TODO: bind to linux-header version, .22 breaks ppc due private_futex var_append confopt " " "--enable-kernel=2.6.16" -# TODO: wire up "--without-fp" + + +if [ $SDECFG_SOFTFLOAT -eq 1 ]; then + # Disable hardware floating point and use software floating point + var_append confopt ' ' '--without-fp' +else + var_append confopt ' ' '--with-fp' +fi + # use at least "-O" when build without optimisation for debugging ... var_remove GCC_WRAPPER_INSERT ' ' '-O0' --- ./architecture/arm/config.in 2011-04-18 11:16:45.000000000 -0400 +++ ./architecture/arm/config.in 2011-04-18 10:55:34.000000000 -0400 @@ -215,8 +215,6 @@ bool 'Generate code using the 16bit thumb instruction set' SDECFG_ARM_THUMB 0 -bool 'Enable software floating point' SDECFG_ARM_SOFTFLOAT 0 - SDECFG_ID="$SDECFG_ID-$SDECFG_ARM_ABI" if [ $SDECFG_ARM_OPT != generic ] ; then SDECFG_ID="$SDECFG_ID-$SDECFG_ARM_OPT" --- ./scripts/config.hlp 2011-04-19 01:40:00.000000000 -0400 +++ ./scripts/config.hlp 2011-04-18 10:38:29.000000000 -0400 @@ -42,6 +42,10 @@ This options controls the target architecture like alpha, ia64, mips, ppc, sparc or x86. +SDECFG_SOFTFLOAT + Enable this option for targets that do not have hardware floating point. + This option allows glibc/eglibc to emulate software floating point. + SDECFG_CROSSBUILD This option needs to be selected to perform a cross-build to another architecture. --- ./scripts/config.in 2011-04-18 11:19:02.000000000 -0400 +++ ./scripts/config.in 2011-04-18 10:38:49.000000000 -0400 @@ -120,6 +120,7 @@ if [ -f architecture/$SDECFG_ARCH/config.in ] then . architecture/$SDECFG_ARCH/config.in ; fi + bool 'Enable software floating point' SDECFG_SOFTFLOAT 0 bool 'This is a cross-build between architectures' SDECFG_CROSSBUILD 0 if [ "$SDECFG_CROSSBUILD" = 1 ]; then # enable all packages flagged CROSS for stage 1, --- ./architecture/arm/pkg_gcc_post.conf 2011-04-18 11:12:04.000000000 -0400 +++ ./architecture/arm/pkg_gcc_post.conf 2011-04-29 03:50:26.000000000 -0400 @@ -13,7 +13,7 @@ # --- T2-COPYRIGHT-NOTE-END --- -if [ $SDECFG_ARM_SOFTFLOAT -ne 0 ]; then +if [ $SDECFG_SOFTFLOAT -ne 0 ]; then [ $SDECFG_MULTILIB -eq 0 ] && var_append confopt ' ' '--with-float=soft' var_append confopt ' ' '--enable-cxx-flags=-msoft-flags' fi --- ./architecture/arm/gcc-options.in 2011-04-18 11:12:04.000000000 -0400 +++ ./t2-trunk/architecture/arm/gcc-options.in 2011-04-29 03:54:10.000000000 -0400 @@ -23,5 +23,5 @@ [ "$SDECFG_ARM_THUMB" = 1 ] && var_append GCC_WRAPPER_INSERT " " "-mthumb -mthumb-interwork -D__arm__" -[ "$SDECFG_ARM_SOFTFLOAT" = 1 ] && +[ "$SDECFG_SOFTFLOAT" = 1 ] && var_append GCC_WRAPPER_INSERT " " "-msoft-float"
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [email protected] with a subject of: unsubscribe t2
