mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Bug 1872748 - Move linker checks from old-configure to configure r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D199224
This commit is contained in:
parent
c61629d946
commit
aa9cfa20f9
@ -163,6 +163,12 @@ def check_build_id_sha1(developer_options):
|
||||
check_and_add_linker_flag("-Wl,--build-id=uuid", when=check_build_id_uuid)
|
||||
check_and_add_linker_flag("-Wl,--build-id=sha1", when=check_build_id_sha1)
|
||||
|
||||
check_and_add_linker_flag("-Wl,-z,noexecstack", when=is_gnu_cc)
|
||||
check_and_add_linker_flag("-Wl,-z,text", when=is_gnu_cc)
|
||||
check_and_add_linker_flag("-Wl,-z,relro", when=is_gnu_cc)
|
||||
check_and_add_linker_flag("-Wl,-z,now", when=is_gnu_cc)
|
||||
check_and_add_linker_flag("-Wl,-z,nocopyreloc", when=is_gnu_cc)
|
||||
|
||||
|
||||
@depends("--enable-address-sanitizer", is_gnu_cc)
|
||||
def check_Bsymbolic(enable_asan, is_gnu_cc):
|
||||
|
@ -201,47 +201,6 @@ if test "$GNU_CC"; then
|
||||
[ASFLAGS="$ASFLAGS -Wa,--noexecstack"],
|
||||
AC_MSG_RESULT([no]))
|
||||
CFLAGS=$_SAVE_CFLAGS
|
||||
AC_MSG_CHECKING([for -z noexecstack option to ld])
|
||||
_SAVE_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -Wl,-z,noexecstack"
|
||||
AC_TRY_LINK(,,AC_MSG_RESULT([yes]),
|
||||
AC_MSG_RESULT([no])
|
||||
LDFLAGS=$_SAVE_LDFLAGS)
|
||||
|
||||
AC_MSG_CHECKING([for -z text option to ld])
|
||||
_SAVE_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -Wl,-z,text"
|
||||
AC_TRY_LINK(,,AC_MSG_RESULT([yes]),
|
||||
AC_MSG_RESULT([no])
|
||||
LDFLAGS=$_SAVE_LDFLAGS)
|
||||
|
||||
AC_MSG_CHECKING([for -z relro option to ld])
|
||||
_SAVE_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -Wl,-z,relro"
|
||||
AC_TRY_LINK(,,AC_MSG_RESULT([yes]),
|
||||
AC_MSG_RESULT([no])
|
||||
LDFLAGS=$_SAVE_LDFLAGS)
|
||||
|
||||
AC_MSG_CHECKING([for -z now option to ld])
|
||||
_SAVE_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -Wl,-z,now"
|
||||
AC_TRY_LINK(,,AC_MSG_RESULT([yes]),
|
||||
AC_MSG_RESULT([no])
|
||||
LDFLAGS=$_SAVE_LDFLAGS)
|
||||
|
||||
AC_MSG_CHECKING([for -z nocopyreloc option to ld])
|
||||
_SAVE_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -Wl,-z,nocopyreloc"
|
||||
AC_TRY_LINK(,,AC_MSG_RESULT([yes]),
|
||||
AC_MSG_RESULT([no])
|
||||
LDFLAGS=$_SAVE_LDFLAGS)
|
||||
|
||||
AC_MSG_CHECKING([for -Bsymbolic-functions option to ld])
|
||||
_SAVE_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions"
|
||||
AC_TRY_LINK(,,AC_MSG_RESULT([yes]),
|
||||
AC_MSG_RESULT([no])
|
||||
LDFLAGS=$_SAVE_LDFLAGS)
|
||||
|
||||
_DEFINES_CFLAGS="-include $jsconfdefs -DMOZILLA_CLIENT"
|
||||
fi
|
||||
|
@ -200,47 +200,6 @@ if test "$GNU_CC"; then
|
||||
[ASFLAGS="$ASFLAGS -Wa,--noexecstack"],
|
||||
AC_MSG_RESULT([no]))
|
||||
CFLAGS=$_SAVE_CFLAGS
|
||||
AC_MSG_CHECKING([for -z noexecstack option to ld])
|
||||
_SAVE_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -Wl,-z,noexecstack"
|
||||
AC_TRY_LINK(,,AC_MSG_RESULT([yes]),
|
||||
AC_MSG_RESULT([no])
|
||||
LDFLAGS=$_SAVE_LDFLAGS)
|
||||
|
||||
AC_MSG_CHECKING([for -z text option to ld])
|
||||
_SAVE_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -Wl,-z,text"
|
||||
AC_TRY_LINK(,,AC_MSG_RESULT([yes]),
|
||||
AC_MSG_RESULT([no])
|
||||
LDFLAGS=$_SAVE_LDFLAGS)
|
||||
|
||||
AC_MSG_CHECKING([for -z relro option to ld])
|
||||
_SAVE_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -Wl,-z,relro"
|
||||
AC_TRY_LINK(,,AC_MSG_RESULT([yes]),
|
||||
AC_MSG_RESULT([no])
|
||||
LDFLAGS=$_SAVE_LDFLAGS)
|
||||
|
||||
AC_MSG_CHECKING([for -z now option to ld])
|
||||
_SAVE_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -Wl,-z,now"
|
||||
AC_TRY_LINK(,,AC_MSG_RESULT([yes]),
|
||||
AC_MSG_RESULT([no])
|
||||
LDFLAGS=$_SAVE_LDFLAGS)
|
||||
|
||||
AC_MSG_CHECKING([for -z nocopyreloc option to ld])
|
||||
_SAVE_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -Wl,-z,nocopyreloc"
|
||||
AC_TRY_LINK(,,AC_MSG_RESULT([yes]),
|
||||
AC_MSG_RESULT([no])
|
||||
LDFLAGS=$_SAVE_LDFLAGS)
|
||||
|
||||
AC_MSG_CHECKING([for -Bsymbolic-functions option to ld])
|
||||
_SAVE_LDFLAGS=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions"
|
||||
AC_TRY_LINK(,,AC_MSG_RESULT([yes]),
|
||||
AC_MSG_RESULT([no])
|
||||
LDFLAGS=$_SAVE_LDFLAGS)
|
||||
|
||||
AC_MSG_CHECKING([for --ignore-unresolved-symbol option to ld])
|
||||
HAVE_LINKER_SUPPORT_IGNORE_UNRESOLVED=
|
||||
|
Loading…
Reference in New Issue
Block a user