Paul,
i did some tests (but with newlib2.2, to be sure we have to test with your "official" version (is it 2.1?) again):
Indeed, it seems to be sufficiant to switch from -Os to -O2 to get faster functions. The RAM-usage is the same, Flash a bit more. So, the workaround is not needed i think.
It would be great if you could change the optimization (with 1.22?) , since this affects not only memcpy.
Do you use the launchpad toolchain ?, If yes, all you would have to do is to change this in
build-toolchain.sh:
Code:
[...]
popd
restoreenv
echo Task [III-3] /$HOST_NATIVE/newlib-nano/
saveenv
prepend_path PATH $INSTALLDIR_NATIVE/bin
saveenvvar CFLAGS_FOR_TARGET '-g [B][I][U]-O2 [/U][/I][/B]-ffunction-sections -fdata-sections' <-- change here
rm -rf $BUILDDIR_NATIVE/newlib-nano && mkdir -p $BUILDDIR_NATIVE/newlib-nano
pushd $BUILDDIR_NATIVE/newlib-nano
$SRCDIR/$NEWLIB_NANO/configure \
$NEWLIB_CONFIG_OPTS \
--target=$TARGET \
[...]
extra hint: you could save compilationtime and space with this:
(Line 92)
Code:
MULTILIB_LIST="--with-multilib-list=armv6-m,armv7e-m"<-- change here
(compilation only for M0+M4)
another hint:
there are updated versions of gmp, mpc and mpf (SRC directory)
If you update them, change the corresponding lines in build-common.sh
Code:
[B][I]GMP=gmp-6.0.0a[/I][/B]
NEWLIB_NANO=newlib
SAMPLES=samples
LIBELF=libelf-0.8.13
LIBICONV=libiconv-1.14
[B][I]MPC=mpc-1.0.2[/I][/B]
[B][I]MPFR=mpfr-3.1.2[/I][/B]
NEWLIB=newlib
ISL=isl-0.11.1
ZLIB=zlib-1.2.8
INSTALLATION=installation
SAMPLES=samples
BUILD_MANUAL=build-manual
CLOOG_PACK=$CLOOG.tar.gz
EXPAT_PACK=$EXPAT.tar.gz
[B][I]GMP_PACK=$GMP.tar.xz[/I][/B]
LIBELF_PACK=$LIBELF.tar.gz
LIBICONV_PACK=$LIBICONV.tar.gz
[B][I]MPC_PACK=$MPC.tar.gz
MPFR_PACK=$MPFR.tar.bz2[/I][/B]
ISL_PACK=$ISL.tar.bz2
ZLIB_PACK=$ZLIB.tar.gz
last hint: ubuntu 10.04 LTS is great for compilation