mirror of
https://github.com/brl/mutter.git
synced 2025-02-16 21:34:09 +00:00
build: Allow disabling linking with -Bsymbolic
Some debugging tools might require full visibility for the Clutter symbols; for this reason, and to match what the Clutter dependencies already allow, we should provide a configure switch to disable linking with the -Bsymbolic flag.
This commit is contained in:
parent
3e74f42f07
commit
6c1559b611
3
README
3
README
@ -153,6 +153,9 @@ Clutter has additional command line options for the configure script:
|
|||||||
--enable-conform=[yes/no]
|
--enable-conform=[yes/no]
|
||||||
Build the Clutter conformance test suite.
|
Build the Clutter conformance test suite.
|
||||||
|
|
||||||
|
--disable-Bsymbolic
|
||||||
|
Disable linking with -Bsymbolic.
|
||||||
|
|
||||||
--with-flavour=[glx/eglx/eglnative/osx/win32/fruity]
|
--with-flavour=[glx/eglx/eglnative/osx/win32/fruity]
|
||||||
Select the Clutter backend: (default=glx)
|
Select the Clutter backend: (default=glx)
|
||||||
|
|
||||||
|
35
configure.ac
35
configure.ac
@ -100,19 +100,28 @@ AM_PATH_GLIB_2_0([2.18.0], [have_glib=yes], [have_glib=no],
|
|||||||
AS_IF([test "x$have_glib" = "xno"], AC_MSG_ERROR([glib-2.0 is required]))
|
AS_IF([test "x$have_glib" = "xno"], AC_MSG_ERROR([glib-2.0 is required]))
|
||||||
|
|
||||||
# Check for -Bsymbolic-functions to avoid intra-library PLT jumps
|
# Check for -Bsymbolic-functions to avoid intra-library PLT jumps
|
||||||
clutter_LDFLAGS="${LDFLAGS}"
|
AC_ARG_ENABLE([Bsymbolic],
|
||||||
AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
|
[AC_HELP_STRING([--disable-Bsymbolic],
|
||||||
LDFLAGS=-Wl,-Bsymbolic-functions
|
[Avoid linking with -Bsymbolic])],
|
||||||
AC_TRY_LINK([], [int main (void) { return 0; }],
|
[],
|
||||||
[
|
[
|
||||||
CLUTTER_LINK_FLAGS=-Wl[,]-Bsymbolic-functions
|
saved_LDFLAGS="${LDFLAGS}"
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
|
||||||
],
|
LDFLAGS=-Wl,-Bsymbolic-functions
|
||||||
[
|
AC_TRY_LINK([], [int main (void) { return 0; }],
|
||||||
CLUTTER_LINK_FLAGS=
|
[
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([yes])
|
||||||
])
|
enable_Bsymbolic=yes
|
||||||
LDFLAGS="${clutter_LDFLAGS}"
|
],
|
||||||
|
[
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
enable_Bsymbolic=no
|
||||||
|
])
|
||||||
|
LDFLAGS="${saved_LDFLAGS}"
|
||||||
|
])
|
||||||
|
|
||||||
|
AS_IF([test "x$enable_Bsymbolic" = "xyes"],
|
||||||
|
[CLUTTER_LINK_FLAGS=-Wl[,]-Bsymbolic-functions])
|
||||||
AC_SUBST(CLUTTER_LINK_FLAGS)
|
AC_SUBST(CLUTTER_LINK_FLAGS)
|
||||||
|
|
||||||
dnl ========================================================================
|
dnl ========================================================================
|
||||||
|
Loading…
x
Reference in New Issue
Block a user