[pango] build: Use -Bsymbolic-functions by default if available
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango] build: Use -Bsymbolic-functions by default if available
- Date: Tue, 4 Dec 2012 23:08:22 +0000 (UTC)
commit d1a8997ac29764dd160a4cad7b291669ae6f5b36
Author: Colin Walters <walters verbum org>
Date: Tue Dec 4 12:46:04 2012 -0500
build: Use -Bsymbolic-functions by default if available
Using -Bsymbolic-functions to avoid internal PLT indirection is an
easy win. This is the same code that both GLib and GTK+ have.
https://bugzilla.gnome.org/show_bug.cgi?id=689648
configure.ac | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 540603a..1bb1716 100644
--- a/configure.ac
+++ b/configure.ac
@@ -653,6 +653,27 @@ fi
AC_SUBST(LIBRARY_LIBTOOL_OPTIONS)
AC_SUBST(MODULE_LIBTOOL_OPTIONS)
+dnl
+dnl Check for -Bsymbolic-functions linker flag used to avoid
+dnl intra-library PLT jumps, if available.
+dnl
+AC_ARG_ENABLE(Bsymbolic,
+ [AS_HELP_STRING([--disable-Bsymbolic],
+ [avoid linking with -Bsymbolic])],,
+ [SAVED_LDFLAGS="${LDFLAGS}"
+ AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
+ LDFLAGS=-Wl,-Bsymbolic-functions
+ AC_TRY_LINK([], [int main (void) { return 0; }],
+ AC_MSG_RESULT(yes)
+ enable_Bsymbolic=yes,
+ AC_MSG_RESULT(no)
+ enable_Bsymbolic=no)
+ LDFLAGS="${SAVED_LDFLAGS}"])
+
+if test "x${enable_Bsymbolic}" = "xyes"; then
+ LIBRARY_LIBTOOL_OPTIONS="$LIBRARY_LIBTOOL_OPTIONS -Wl,-Bsymbolic-functions"
+fi
+
dnl ********************************************************
dnl * See whether we need to load our modules as .la files *
dnl ********************************************************
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]