krb5 commit [krb5-1.13]: Fix HP-UX build support
Tom Yu
tlyu at mit.edu
Thu Aug 21 18:11:01 EDT 2014
https://github.com/krb5/krb5/commit/234b9459eb851bdf2d64861e596cf0a8acbb1e92
commit 234b9459eb851bdf2d64861e596cf0a8acbb1e92
Author: Michael Osipov <1983-01-06 at gmx.net>
Date: Thu Aug 14 15:48:11 2014 +0200
Fix HP-UX build support
Rename hpux10.exports to hpux.exports. In the HP-UX section of
shlib.conf, remove '+s' because it just specifies a default, add a
MAKE_SHLIB_COMMAND, and set SHLIBEXT based on the host CPU.
[ghudson at mit.edu: squashed commits, condensed commit message]
(cherry picked from commit fdd1c69471bbe5fec0da9f9bcaa9d0a7739db77f)
ticket: 7990
version_fixed: 1.13
status: resolved
.gitignore | 1 +
src/config/lib.in | 18 +++++++++---------
src/config/libnover.in | 14 +++++++-------
src/config/shlib.conf | 24 +++++++++++++++---------
4 files changed, 32 insertions(+), 25 deletions(-)
diff --git a/.gitignore b/.gitignore
index 96cf3c3..716b322 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,7 @@
*.so
binutils.versions
darwin.exports
+hpux.exports
lib*.so.*
Makefile
OBJS.*
diff --git a/src/config/lib.in b/src/config/lib.in
index 8dd5475..c041571 100644
--- a/src/config/lib.in
+++ b/src/config/lib.in
@@ -72,20 +72,20 @@ osf1.exports: $(SHLIB_EXPORT_FILE) Makefile
done; echo " $$a" >> osf1.tmp
mv -f osf1.tmp osf1.exports
-hpux10.exports: $(SHLIB_EXPORT_FILE) Makefile
- $(RM) hpux10.tmp hpux10.exports
- sed "s/^/+e /" < $(SHLIB_EXPORT_FILE) > hpux10.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" >> hpux10.tmp
- echo "+e errno" >> hpux10.tmp
+ done; echo "$$a" >> hpux.tmp
+ echo "+e errno" >> hpux.tmp
base=`echo "$(LIBBASE)" | sed -e 's/-/_/'`; \
- echo "+e _GLOBAL__FD_lib$${base}_$(LIBMAJOR)_$(LIBMINOR)" >> hpux10.tmp; \
- echo "+e _GLOBAL__FI_lib$${base}_$(LIBMAJOR)_$(LIBMINOR)" >> hpux10.tmp
- mv -f hpux10.tmp hpux10.exports
+ echo "+e _GLOBAL__FD_lib$${base}_$(LIBMAJOR)_$(LIBMINOR)" >> hpux.tmp; \
+ echo "+e _GLOBAL__FI_lib$${base}_$(LIBMAJOR)_$(LIBMINOR)" >> hpux.tmp
+ mv -f hpux.tmp hpux.exports
lib$(LIBBASE)$(PFLIBEXT): $(PFOBJLISTS)
$(RM) $@
@@ -120,7 +120,7 @@ clean-libs:
$(RM) lib$(LIBBASE)$(SHLIBSEXT)
$(RM) lib$(LIBBASE)$(SHLIBEXT)
$(RM) lib$(LIBBASE)$(PFLIBEXT)
- $(RM) binutils.versions osf1.exports darwin.exports hpux10.exports
+ $(RM) binutils.versions osf1.exports darwin.exports hpux.exports
clean-liblinks:
$(RM) $(TOPLIBD)/lib$(LIBBASE)$(STLIBEXT)
diff --git a/src/config/libnover.in b/src/config/libnover.in
index b55a427..e18c19f 100644
--- a/src/config/libnover.in
+++ b/src/config/libnover.in
@@ -61,17 +61,17 @@ osf1.exports: $(SHLIB_EXPORT_FILE) Makefile
done; echo " $$a" >> osf1.tmp; \
mv -f osf1.tmp osf1.exports
-hpux10.exports: $(SHLIB_EXPORT_FILE) Makefile
- $(RM) hpux10.tmp hpux10.exports
- sed "s/^/+e /" < $(SHLIB_EXPORT_FILE) > hpux10.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" >> hpux10.tmp
- echo "+e errno" >> hpux10.tmp
- mv -f hpux10.tmp hpux10.exports
+ done; echo "$$a" >> hpux.tmp
+ echo "+e errno" >> hpux.tmp
+ mv -f hpux.tmp hpux.exports
darwin.exports: $(SHLIB_EXPORT_FILE) Makefile
$(RM) darwin.exports
@@ -101,7 +101,7 @@ all-libs: $(PLUGIN)
clean-libs:
$(RM) $(LIBBASE)$(DYNOBJEXT)
- $(RM) binutils.versions osf1.exports darwin.exports hpux10.exports
+ $(RM) binutils.versions osf1.exports darwin.exports hpux.exports
clean-liblinks:
$(RM) $(PLUGINLINK)
diff --git a/src/config/shlib.conf b/src/config/shlib.conf
index 9236d86..55f16be 100644
--- a/src/config/shlib.conf
+++ b/src/config/shlib.conf
@@ -101,8 +101,6 @@ alpha*-dec-osf*)
RUN_VARS='LD_LIBRARY_PATH _RLD_ROOT'
;;
-# HPUX *seems* to work under 10.20.
-#
# Note: "-Wl,+s" when building executables enables the use of the
# SHLIB_PATH environment variable for finding shared libraries
# in non-standard directories. If a non-standard search-path for
@@ -121,7 +119,14 @@ alpha*-dec-osf*)
# apparently turns that off
*-*-hpux*)
INSTALL_SHLIB='$(INSTALL)'
- SHLIBEXT=.sl
+ case $host_cpu in
+ hppa*)
+ SHLIBEXT=.sl
+ ;;
+ ia64*)
+ SHLIBEXT=.so
+ ;;
+ esac
SHLIBVEXT='.$(LIBMAJOR).$(LIBMINOR)'
SHLIBSEXT='.$(LIBMAJOR)'
RPATH_FLAG='-Wl,+b,'
@@ -129,21 +134,22 @@ alpha*-dec-osf*)
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,hpux10.exports'
+ LDCOMBINE='gcc -fPIC -shared -Wl,+h,$(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT) -Wl,-c,hpux.exports'
else
PICFLAGS=+z
SHLIB_RPATH_FLAGS='+b $(SHLIB_RDIRS)'
- SHLIB_EXPFLAGS='+s $(SHLIB_RPATH_FLAGS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
- LDCOMBINE='ld -b +h $(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT) -c hpux10.exports'
+ SHLIB_EXPFLAGS='$(SHLIB_RPATH_FLAGS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
+ LDCOMBINE='ld -b +h $(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT) -c hpux.exports'
fi
+ MAKE_SHLIB_COMMAND="${LDCOMBINE} -o \$@ \$\$objlist \$(LDFLAGS) \$(SHLIB_EXPFLAGS) ${LDCOMBINE_TAIL}"
PROG_RPATH_FLAGS='$(RPATH_FLAG)$(PROG_RPATH)'
- CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,+s $(PROG_RPATH_FLAGS) $(CFLAGS) $(LDFLAGS)'
+ CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) $(PROG_RPATH_FLAGS) $(CFLAGS) $(LDFLAGS)'
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(CFLAGS) $(LDFLAGS)'
- CXX_LINK_SHARED='$(CXX) $(PROG_LIBPATH) -Wl,+s $(PROG_RPATH_FLAGS) $(CXXFLAGS) $(LDFLAGS)'
+ CXX_LINK_SHARED='$(CXX) $(PROG_LIBPATH) $(PROG_RPATH_FLAGS) $(CXXFLAGS) $(LDFLAGS)'
CXX_LINK_STATIC='$(CXX) $(PROG_LIBPATH) $(CXXFLAGS) $(LDFLAGS)'
RUN_ENV='SHLIB_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export SHLIB_PATH;'
RUN_VARS='SHLIB_PATH'
- SHLIB_EXPORT_FILE_DEP=hpux10.exports
+ SHLIB_EXPORT_FILE_DEP=hpux.exports
# 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
More information about the cvs-krb5
mailing list