Bug 537857: Remove dead symbols in linker. r=ted
☠☠ backed out by d05aa79f947a ☠ ☠
authorTaras Glek <tglek@mozilla.com>
Sun, 23 May 2010 10:47:10 -0700
changeset 42577 bfcdd30e82bf2e318caaa4c5be72fe0bf68e69ff
parent 42576 997b4e70089628369a79dba3c852ac238b5a5256
child 42578 f4f9d45743a8b9a5ccf0d2cfe7d34a6df7af3e47
child 42635 d05aa79f947adb5eecc46cb1b6b414a2148513a1
push id13408
push userme@kylehuey.com
push dateSun, 23 May 2010 17:49:48 +0000
treeherdermozilla-central@f4f9d45743a8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs537857
milestone1.9.3a5pre
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
Bug 537857: Remove dead symbols in linker. r=ted
configure.in
--- a/configure.in
+++ b/configure.in
@@ -1560,16 +1560,19 @@ if test "$GNU_CC"; then
     # FIXME: Let us build with strict aliasing. bug 414641.
     CFLAGS="$CFLAGS -fno-strict-aliasing"
     MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@'
     MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@'
     DSO_LDOPTS='-shared'
     if test "$GCC_USE_GNU_LD"; then
         # Don't allow undefined symbols in libraries
         DSO_LDOPTS="$DSO_LDOPTS -Wl,-z,defs"
+        LDFLAGS="$LDFLAGS -Wl,--gc-sections"
+        CFLAGS="$CFLAGS -ffunction-sections -fdata-sections"
+        CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections"
     fi
     WARNINGS_AS_ERRORS='-Werror'
     DSO_CFLAGS=''
     DSO_PIC_CFLAGS='-fPIC'
     ASFLAGS="$ASFLAGS -fPIC"
     _MOZ_RTTI_FLAGS_ON=${_COMPILER_PREFIX}-frtti
     _MOZ_RTTI_FLAGS_OFF=${_COMPILER_PREFIX}-fno-rtti
     _MOZ_EXCEPTIONS_FLAGS_ON='-fhandle-exceptions'