Bug 818903 - Link with --build-id when available. r=ted

This commit is contained in:
Mike Hommey 2012-12-09 09:34:01 +01:00
parent 34ff2e18cd
commit f96ed5a637
2 changed files with 14 additions and 0 deletions

View File

@ -1426,6 +1426,13 @@ if test "$GNU_CC"; then
AC_TRY_LINK(,,AC_MSG_RESULT([yes]),
AC_MSG_RESULT([no])
LDFLAGS=$_SAVE_LDFLAGS)
AC_MSG_CHECKING([for --build-id option to ld])
_SAVE_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,--build-id"
AC_TRY_LINK(,,AC_MSG_RESULT([yes]),
AC_MSG_RESULT([no])
LDFLAGS=$_SAVE_LDFLAGS)
# Check for -mssse3 on $CC
AC_MSG_CHECKING([if toolchain supports -mssse3 option])

View File

@ -1194,6 +1194,13 @@ if test "$GNU_CC"; then
DSO_PIC_CFLAGS='-fPIC'
ASFLAGS="$ASFLAGS -fPIC"
AC_MSG_CHECKING([for --build-id option to ld])
_SAVE_LDFLAGS=$LDFLAGS
LDFLAGS="$LDFLAGS -Wl,--build-id"
AC_TRY_LINK(,,AC_MSG_RESULT([yes]),
AC_MSG_RESULT([no])
LDFLAGS=$_SAVE_LDFLAGS)
# Turn on GNU-specific warnings:
# -Wall - turn on a lot of warnings
# -pedantic - this is turned on below