From 0467bcd3d690160543edabe0bf1a9b28fc7a6d29 Mon Sep 17 00:00:00 2001 From: Dave Murphy Date: Wed, 11 Jan 2017 19:04:39 +0000 Subject: [PATCH] use dead code elimination options --- dkarm-eabi/scripts/build-gcc.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dkarm-eabi/scripts/build-gcc.sh b/dkarm-eabi/scripts/build-gcc.sh index b47a6b6..02855bd 100755 --- a/dkarm-eabi/scripts/build-gcc.sh +++ b/dkarm-eabi/scripts/build-gcc.sh @@ -43,7 +43,13 @@ cd $target/gcc if [ ! -f configured-gcc ] then - CFLAGS="$cflags" CXXFLAGS="$cflags" LDFLAGS="$ldflags" CFLAGS_FOR_TARGET="-O2" CXXFLAGS_FOR_TARGET="-O2" LDFLAGS_FOR_TARGET="" ../../gcc-$GCC_VER/configure \ + CFLAGS="$cflags" \ + CXXFLAGS="$cflags" \ + LDFLAGS="$ldflags" \ + CFLAGS_FOR_TARGET="-O2 -ffunction-sections -fdata-sections" \ + CXXFLAGS_FOR_TARGET="-O2 -ffunction-sections -fdata-sections" \ + LDFLAGS_FOR_TARGET="" \ + ../../gcc-$GCC_VER/configure \ --enable-languages=c,c++,objc,obj-c++ \ --with-gnu-as --with-gnu-ld --with-gcc \ --with-march=armv4t\ @@ -90,6 +96,7 @@ cd $target/newlib if [ ! -f configured-newlib ] then + CFLAGS_FOR_TARGET="-O2 -ffunction-sections -fdata-sections" \ ../../newlib-$NEWLIB_VER/configure \ --disable-newlib-supplied-syscalls \ --enable-newlib-mb \