Link check_symbols with SUDO_LIBS to make sure we link with the

requisite libraries to successfully dlopen sudoers.so.  This is
needed on HP-UX where a program dlopen()ing a shared object that
uses pthreads must also be linked with pthreads (and HP-UX LDAP
uses pthreads).
This commit is contained in:
Todd C. Miller
2012-06-18 10:21:05 -04:00
parent 86cececc16
commit fdcc8e1fce
3 changed files with 9 additions and 9 deletions

8
configure vendored
View File

@@ -19929,10 +19929,10 @@ if test X"$LIBDL" != X""; then
SUDOERS_LIBS="${SUDOERS_LIBS} $LIBDL"
fi
# On HP-UX, you cannot dlopen() a shared object that uses pthreads
# unless the main program is linked against -lpthread. Since we
# have no knowledge what libraries a plugin may depend on, we always
# link against -lpthread on HP-UX if it is available.
# On HP-UX, you cannot dlopen() a shared object that uses pthreads unless
# the main program is linked against -lpthread. We have no knowledge of
# what libraries a plugin may depend on (e.g. HP-UX LDAP which uses pthreads)
# so always link against -lpthread on HP-UX if it is available.
# This check should go after all other libraries tests.
case "$host" in
*-*-hpux*)

View File

@@ -3135,10 +3135,10 @@ if test X"$LIBDL" != X""; then
SUDOERS_LIBS="${SUDOERS_LIBS} $LIBDL"
fi
# On HP-UX, you cannot dlopen() a shared object that uses pthreads
# unless the main program is linked against -lpthread. Since we
# have no knowledge what libraries a plugin may depend on, we always
# link against -lpthread on HP-UX if it is available.
# On HP-UX, you cannot dlopen() a shared object that uses pthreads unless
# the main program is linked against -lpthread. We have no knowledge of
# what libraries a plugin may depend on (e.g. HP-UX LDAP which uses pthreads)
# so always link against -lpthread on HP-UX if it is available.
# This check should go after all other libraries tests.
case "$host" in
*-*-hpux*)

View File

@@ -191,7 +191,7 @@ check_fill: $(CHECK_FILL_OBJS) $(LT_LIBS)
$(LIBTOOL) --mode=link $(CC) -o $@ $(CHECK_FILL_OBJS) $(LDFLAGS) $(LIBS)
check_symbols: $(CHECK_SYMBOLS_OBJS) $(LT_LIBS)
$(LIBTOOL) --mode=link $(CC) -o $@ $(CHECK_SYMBOLS_OBJS) $(LDFLAGS) $(LIBS)
$(LIBTOOL) --mode=link $(CC) -o $@ $(CHECK_SYMBOLS_OBJS) $(LDFLAGS) $(LIBS) @SUDO_LIBS@
check_wrap: $(CHECK_WRAP_OBJS) $(LT_LIBS)
$(LIBTOOL) --mode=link $(CC) -o $@ $(CHECK_WRAP_OBJS) $(LDFLAGS) $(LIBS)