hpux.exports: $(SHLIB_EXPORT_FILE) Makefile
$(RM) hpux.tmp hpux.exports
sed "s/^/+e /" < $(SHLIB_EXPORT_FILE) > hpux.tmp
- a=""; \
- for f in . $(LIBFINIFUNC); do \
- if test "$$f" != .; then \
- a="+I $${f}__auxfini $$a"; \
- else :; fi; \
- done; echo "$$a" >> hpux.tmp
echo "+e errno" >> hpux.tmp
base=`echo "$(LIBBASE)" | sed -e 's/-/_/'`; \
echo "+e _GLOBAL__FD_lib$${base}_$(LIBMAJOR)_$(LIBMINOR)" >> hpux.tmp; \
hpux.exports: $(SHLIB_EXPORT_FILE) Makefile
$(RM) hpux.tmp hpux.exports
sed "s/^/+e /" < $(SHLIB_EXPORT_FILE) > hpux.tmp
- a=""; \
- for f in . $(LIBFINIFUNC); do \
- if test "$$f" != .; then \
- a="+I $${f}__auxfini $$a"; \
- else :; fi; \
- done; echo "$$a" >> hpux.tmp
echo "+e errno" >> hpux.tmp
mv -f hpux.tmp hpux.exports
PICFLAGS=-fPIC
SHLIB_RPATH_FLAGS='-Wl,+b,$(SHLIB_RDIRS)'
SHLIB_EXPFLAGS='-Wl,+s $(SHLIB_RPATH_FLAGS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
- LDCOMBINE='gcc -fPIC -shared -Wl,+h,$(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT) -Wl,-c,hpux.exports'
+ LDCOMBINE='gcc -fPIC -shared -Wl,+h,$(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT) -Wl,-c,hpux.exports -Wl,-B,nodelete'
else
PICFLAGS=+z
SHLIB_RPATH_FLAGS='+b $(SHLIB_RDIRS)'
SHLIB_EXPFLAGS='$(SHLIB_RPATH_FLAGS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
- LDCOMBINE='ld -b +h $(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT) -c hpux.exports'
+ LDCOMBINE='ld -b +h $(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT) -c hpux.exports -B nodelete'
fi
MAKE_SHLIB_COMMAND="${LDCOMBINE} -o \$@ \$\$objlist \$(LDFLAGS) \$(SHLIB_EXPFLAGS) ${LDCOMBINE_TAIL}"
PROG_RPATH_FLAGS='$(RPATH_FLAG)$(PROG_RPATH)'
# Do *not* set use_linker_init_option=yes here, because in the
# case where the library is specified at program link time, the
# initialization function appears not to get called, only for
- # shl_load. But for finalization functions, the shl_load case
- # is the one we care about.
- #
- # Not setting use_linker_init_option here should cause compilation
- # failures if the user tries to disable delayed initialization.
- use_linker_fini_option=yes
+ # shl_load.
+ lib_unload_prevented=yes
;;
mips-*-netbsd*)
matter what compiler we're using. Do it the same way
regardless. */
-# ifdef __hpux
-
- /* On HP-UX, we need this auxiliary function. At dynamic load or
- unload time (but *not* program startup and termination for
- link-time specified libraries), the linker-indicated function
- is called with a handle on the library and a flag indicating
- whether it's being loaded or unloaded.
-
- The "real" fini function doesn't need to be exported, so
- declare it static.
-
- As usual, the final declaration is just for syntactic
- convenience, so the top-level invocation of this macro can be
- followed by a semicolon. */
-
-# include <dl.h>
-# define MAKE_FINI_FUNCTION(NAME) \
- static void NAME(void); \
- void JOIN__2(NAME, auxfini)(shl_t, int); /* silence gcc warnings */ \
- void JOIN__2(NAME, auxfini)(shl_t h, int l) { if (!l) NAME(); } \
- static void NAME(void)
-
-# else /* not hpux */
-
# define MAKE_FINI_FUNCTION(NAME) \
void NAME(void)
-# endif
-
#elif !defined(SHARED) || defined(LIB_UNLOAD_PREVENTED)
/*