I've modified abi/src/config/platforms/hpux.mk; a patch is included.
(Note that the "static" binary is really "semi-static", since it still
has to dynamically load one shared library, dld.sl.)

Thanks a lot!

-- 
- Kevin Vajk
  <[EMAIL PROTECTED]>


Index: abi/src/config/platforms/hpux.mk
===================================================================
RCS file: /cvsroot/abi/src/config/platforms/hpux.mk,v
retrieving revision 1.8
diff -u -r1.8 hpux.mk
--- abi/src/config/platforms/hpux.mk    2000/02/15 04:00:22     1.8
+++ abi/src/config/platforms/hpux.mk    2001/03/03 04:26:07
@@ -21,6 +21,7 @@
 ##############################################################################
 ## HP-UX platform defines, courtesy of Philippe Defert
 ## ([EMAIL PROTECTED])
+## Updated by Kevin Vajk ([EMAIL PROTECTED]) for gcc with HP-UX ld
 ##############################################################################

 ##################################################################
@@ -42,7 +43,7 @@
 # Suffixes
 OBJ_SUFFIX     = o
 LIB_SUFFIX     = a
-DLL_SUFFIX     = so
+DLL_SUFFIX     = sl
 AR             = ar cr $@

 # Compiler flags
@@ -57,12 +58,12 @@
 endif

 # Includes
-OS_INCLUDES            =
+OS_INCLUDES            = -I/usr/contrib/include -I/usr/local/include
 G++INCLUDES            = -I/usr/include/g++

 # Compiler flags
-PLATFORM_FLAGS         =
-PORT_FLAGS             = -D_POSIX_SOURCE -D_BSD_SOURCE -DHAVE_STRERROR 
-D_XOPEN_SOURCE -D__USE_XOPEN_EXTENDED
+PLATFORM_FLAGS         = -L/usr/contrib/lib -L/usr/local/lib
+PORT_FLAGS             = -DHAVE_STRERROR -D_HPUX_SOURCE
 OS_CFLAGS              = $(DSO_CFLAGS) $(PLATFORM_FLAGS) $(PORT_FLAGS)

 PLATFORM_FLAGS         +=
@@ -73,16 +74,16 @@
 GNOME_CONFIG           = gnome-config

 # Shared library flags
-MKSHLIB                        = $(LD) $(DSO_LDOPTS) -soname $(@:$(OBJDIR)/%.so=%.so)
+MKSHLIB                        = $(LD) $(DSO_LDOPTS) -b -o $(@:$(OBJDIR)/%.sl=%.sl)

 # Which links can this platform create.  Define one or
 # both of these options.
 UNIX_CAN_BUILD_DYNAMIC=1
-UNIX_CAN_BUILD_STATIC=0
+UNIX_CAN_BUILD_STATIC=1

 # Compiler options for static and dynamic linkage
 DL_LIBS                        =
-STATIC_FLAGS           = -static
+STATIC_FLAGS           = -Wl,-a,archive_shared

 ABI_NATIVE     = unix
 ABI_FE         = Unix


Reply via email to