Add ability to build in "see what symbols aren't used" mode
authorIra W. Snyder <devel@irasnyder.com>
Fri, 18 Jan 2008 02:01:37 +0000 (18:01 -0800)
committerIra W. Snyder <devel@irasnyder.com>
Fri, 18 Jan 2008 02:01:37 +0000 (18:01 -0800)
This is a very performance-degrading option, if turned on. Luckily, it's
only at build time. Since this project isn't autoconfed yet, we'll just
uncomment the proper options by hand.

Makefile

index c743125..e3c574a 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,10 @@
 GCC=gcc
+
+# Normal CFLAGS
 CFLAGS=-ggdb -O1 -pipe -DDEBUG=1
+LDFLAGS=-Wl,-O1 -Wl,--sort-common -Wl,--as-needed
+#CFLAGS=-ggdb -O1 -pipe -DDEBUG=1 -ffunction-sections -fdata-sections
+#LDFLAGS=-Wl,--gc-sections -Wl,--print-gc-sections
 GOBJ_CFLAGS=`pkg-config --cflags gobject-2.0`
 GOBJ_LIBS=`pkg-config --libs gobject-2.0`
 
@@ -11,7 +16,7 @@ ALL_LIBS=`pkg-config --libs gtk+-2.0 vte dbus-glib-1`
 all: tilda
 
 tilda: tilda.o tilda-window.o tilda-terminal.o tomboykeybinder.o tomboyutil.o eggaccelerators.o
-       $(GCC) $(CFLAGS) $^ -o $@ $(ALL_LIBS)
+       $(GCC) $(CFLAGS) $(LDFLAGS) $^ -o $@ $(ALL_LIBS)
 
 tilda.o: tilda.c
        $(GCC) $(CFLAGS) -c -o $@ $< $(ALL_CFLAGS)