*-*-freebsd*|*-*-linux*)
G_THREAD_LIBS_FOR_GTHREAD="`echo $G_THREAD_LIBS | sed s/-pthread/-lpthread/`"
;;
- *-*-openbsd*)
- LDFLAGS="$LDFLAGS -pthread"
- ;;
*)
G_THREAD_LIBS_FOR_GTHREAD="$G_THREAD_LIBS"
;;
AC_ARG_ENABLE(Bsymbolic,
[AS_HELP_STRING([--disable-Bsymbolic],
[avoid linking with -Bsymbolic])],,
- [SAVED_LDFLAGS="${LDFLAGS}"
+ [SAVED_LDFLAGS="${LDFLAGS}" SAVED_LIBS="${LIBS}"
AC_MSG_CHECKING([for -Bsymbolic-functions linker flag])
LDFLAGS=-Wl,-Bsymbolic-functions
+ LIBS=
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}"])
+ LDFLAGS="${SAVED_LDFLAGS}" LIBS="${SAVED_LIBS}"])
if test "x${enable_Bsymbolic}" = "xyes"; then
GLIB_LINK_FLAGS=-Wl,-Bsymbolic-functions
AC_SUBST(GLIB_LINK_FLAGS)
dnl
+dnl Check for -z,nodelete linker flag: the type system assumes that
+dnl libgobject stays loaded for the lifetime of the process.
+dnl Since ld.bfd does not treat wrong -z options as fatal by default,
+dnl we also try to check for the --fatal-warnings linker flag if
+dnl auto-detecting.
+dnl
+
+AC_ARG_ENABLE([znodelete],
+ [AS_HELP_STRING([--disable-znodelete],
+ [avoid linking with -z,nodelete])],,
+ [SAVED_LDFLAGS="${LDFLAGS}" SAVED_LIBS="${LIBS}"
+ AC_MSG_CHECKING([for --fatal-warnings linker flag])
+ LDFLAGS=-Wl,--fatal-warnings
+ LIBS=
+ AC_TRY_LINK([], [int main (void) { return 0; }],
+ AC_MSG_RESULT(yes)
+ [ldflags_fatal=-Wl,--fatal-warnings],
+ AC_MSG_RESULT(no)
+ ldflags_fatal=)
+ AC_MSG_CHECKING([for -z,nodelete linker flag])
+ LDFLAGS="$ldflags_fatal -Wl,-z,nodelete"
+ AC_TRY_LINK([], [int main (void) { return 0; }],
+ AC_MSG_RESULT(yes)
+ enable_znodelete=yes,
+ AC_MSG_RESULT(no)
+ enable_znodelete=no)
+ LDFLAGS="${SAVED_LDFLAGS}" LIBS="${SAVED_LIBS}"])
+
+if test "x${enable_znodelete}" = "xyes"; then
+ GOBJECT_LINK_FLAGS=-Wl,-z,nodelete
+fi
+
+AC_SUBST(GOBJECT_LINK_FLAGS)
+
+dnl
dnl Check for -fvisibility=hidden to determine if we can do GNU-style
dnl visibility attributes for symbol export control
dnl
build/win32/vs9/Makefile
build/win32/vs10/Makefile
build/win32/vs11/Makefile
+build/win32/vs12/Makefile
glib/Makefile
glib/glib.stp
glib/libcharset/Makefile