This is an automated email from Gerrit.

Evan Hunter ([email protected]) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/953

-- gerrit

commit 3538ff8c6a3ef16fd04618caf6bce3b3f03eea75
Author: Evan Hunter <[email protected]>
Date:   Fri Nov 2 09:38:44 2012 +1100

    configure: Garbage collect unused functions and variables
    
    Avoids linker errors for unused functions/variables and reduces binary size
    Enabled by default
    
    Change-Id: I76bcb517cc59096bc173699e0ef3f5ec80858e70
    Signed-off-by: Evan Hunter <[email protected]>

diff --git a/configure.ac b/configure.ac
index d61dcc1..5deb310 100644
--- a/configure.ac
+++ b/configure.ac
@@ -300,6 +300,10 @@ AC_ARG_ENABLE([werror],
   AS_HELP_STRING([--disable-werror], [Do not treat warnings as errors]),
   [gcc_werror=$enableval], [gcc_werror=$gcc_warnings])
 
+AC_ARG_ENABLE([gbgcol],
+  AS_HELP_STRING([--disable-gbgcol], [Disable garbage collection of unused 
functions/variables]),
+  [gcc_gbgcol=$enableval], [gcc_gbgcol=yes])
+
 # set default verbose options, overridden by following options
 debug_jtag_io=no
 debug_usb_io=no
@@ -1256,6 +1260,12 @@ if test "${gcc_werror}" = yes; then
   GCC_WARNINGS="${GCC_WARNINGS} -Werror"
 fi
 
+# garbage collection flags
+if test "${gcc_gbgcol}" = yes; then
+  CFLAGS="$CFLAGS -ffunction-sections -fdata-sections"
+  LDFLAGS="$LDFLAGS -Wl,--gc-sections"
+fi
+
 # overide default gcc cflags
 if test $gcc_warnings = yes; then
   CFLAGS="$CFLAGS $GCC_WARNINGS"

-- 

------------------------------------------------------------------------------
LogMeIn Central: Instant, anywhere, Remote PC access and management.
Stay in control, update software, and manage PCs from one command center
Diagnose problems and improve visibility into emerging IT issues
Automate, monitor and manage. Do more in less time with Central
http://p.sf.net/sfu/logmein12331_d2d
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to