Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Backout ac97f18b88cb (bug 670659) because of android bustage

  • Loading branch information...
commit 8ff44a7fc60f9d574a8353895b1bbcbff9c5ea88 1 parent 133ad48
@glandium glandium authored
Showing with 4 additions and 43 deletions.
  1. +4 −43 configure.in
View
47 configure.in
@@ -1549,8 +1549,10 @@ if test "$GNU_CC"; then
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"
+ # Don't allow undefined symbols in libraries, and remove dead symbols
+ DSO_LDOPTS="$DSO_LDOPTS -Wl,-z,defs -Wl,--gc-sections"
+ CFLAGS="$CFLAGS -ffunction-sections -fdata-sections"
+ CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections"
fi
WARNINGS_AS_ERRORS='-Werror'
DSO_CFLAGS=''
@@ -7297,47 +7299,6 @@ if test -n "$MOZ_DEBUG" -o -n "$MOZ_DEBUG_SYMBOLS"; then
fi
dnl ========================================================
-dnl = Automatically remove dead symbols
-dnl ========================================================
-
-if test "$GNU_CC" -a "$GCC_USE_GNU_LD" -a -n "$MOZ_DEBUG_FLAGS"; then
- dnl See bug 670659
- AC_CACHE_CHECK([whether removing dead symbols breaks debugging],
- GC_SECTIONS_BREAKS_DEBUG_RANGES,
- [echo 'int foo() {return 42;}' \
- 'int bar() {return 1;}' \
- 'int main() {return foo();}' > conftest.${ac_ext}
- if AC_TRY_COMMAND([${CC-cc} -o conftest.${ac_objext} $CFLAGS $MOZ_DEBUG_FLAGS -ffunction-sections conftest.${ac_ext} 1>&2]) &&
- AC_TRY_COMMAND([${CC-cc} -o conftest${ac_exeext} $LDFLAGS $MOZ_DEBUG_FLAGS -ffunction-sections -Wl,--gc-sections conftest.${ac_ext} $LIBS 1>&2]) &&
- test -s conftest${ac_exeext} -a -s conftest.${ac_objext}; then
- dnl objdump -WR would be much simpler, but ancient objdump
- dnl doesn't support it.
- debug_ranges_lines() {
- awk '/^Contents/ { content=0 } /^Contents of the \.debug_ranges/ { content=1 } content { n += 1 } END { print n }'
- }
- dnl We expect the number of lines after "Contents of the
- dnl .debug_ranges" to be the same in the object file and the
- dnl linked program. If it's not, then we are hitting the linker
- dnl bug.
- if test `objdump -W conftest.${ac_objext} 2> /dev/null | debug_ranges_lines` = \
- `objdump -W conftest${ac_exeext} 2> /dev/null | debug_ranges_lines`; then
- GC_SECTIONS_BREAKS_DEBUG_RANGES=no
- else
- GC_SECTIONS_BREAKS_DEBUG_RANGES=yes
- fi
- else
- dnl We really don't expect to get here, but just in case
- AC_ERROR([couldn't compile a simple C file])
- fi
- rm -rf conftest*])
- if test "$GC_SECTIONS_BREAKS_DEBUG_RANGES" = no; then
- DSO_LDOPTS="$DSO_LDOPTS -Wl,--gc-sections"
- CFLAGS="$CFLAGS -ffunction-sections -fdata-sections"
- CXXFLAGS="$CXXFLAGS -ffunction-sections -fdata-sections"
- fi
-fi
-
-dnl ========================================================
dnl = Disable any treating of compile warnings as errors
dnl ========================================================
MOZ_ARG_DISABLE_BOOL(warnings-as-errors,
Please sign in to comment.
Something went wrong with that request. Please try again.