build-sys: don't use the nodelete linker flag on executables

The nodelete flag indicates that we don't want our libraries to be
unloaded. It's only relevant on libraries, so let's not use it for
executables. Trying to use it on executables breaks things on some
platforms.

BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=90878
This commit is contained in:
Shawn Walker 2015-08-11 16:22:37 +02:00 committed by Arun Raghavan
parent 69a5d4913c
commit b727dd540b
2 changed files with 20 additions and 18 deletions

View file

@ -212,7 +212,7 @@ AC_SUBST([IMMEDIATE_LDFLAGS])
# On ELF systems we don't want the libraries to be unloaded since we don't clean them up properly,
# so we request the nodelete flag to be enabled.
# On other systems, we don't really know how to do that, but it's welcome if somebody can tell.
AX_APPEND_LINK_FLAGS([-Wl,-z,nodelete], [NODELETE_LDFLAGS])
AX_APPEND_LINK_FLAGS([-Wl,-z,nodelete], [NODELETE_LDFLAGS], [-shared])
AC_SUBST([NODELETE_LDFLAGS])
# Check for the proper way to build libraries that have no undefined symbols