diff --git a/builds/posix/prefix.hpux_aCC b/builds/posix/prefix.hpux_aCC index df0bca0162..fabda1d351 100644 --- a/builds/posix/prefix.hpux_aCC +++ b/builds/posix/prefix.hpux_aCC @@ -54,7 +54,8 @@ # 2111, statement is unreachable (used to suppress g++ warnings) # 2161, unrecognized pragma (mostly FB_COMPILER_MESSAGE) # 2177, function declared but never referenced -COMMON_FLAGS= -DHP11 -DHPUX -D_XOPEN_SOURCE_EXTENDED -AA -ext \ +COMMON_FLAGS= -DHP11 -DHPUX -D_XOPEN_SOURCE_EXTENDED -D_HP_ATOMIC_INLINE \ + -AA +e \ +W2830,4232,749,863,1042,2175,2111,2161,2177 # Flags specific to production or debug build... @@ -81,9 +82,9 @@ endif OS_ServerFiles=inet_server.cpp # link options for HP-UX linker, /usr/bin/ld -LINK_OPTS= $(LDFLAGS) $(THR_FLAGS) $(UNDEF_FLAGS) $(LIB_PATH_OPTS) -AA -ext -latomic -LINK_LIBS+= -latomic $(ICU_LIBS) -LIB_LINK_OPTIONS= $(LDFLAGS) $(THR_FLAGS) -b -ext -latomic +LINK_OPTS= $(LDFLAGS) $(THR_FLAGS) $(UNDEF_FLAGS) $(LIB_PATH_OPTS) -AA +e -Wl,+concatrpath +LINK_LIBS+= $(ICU_LIBS) +LIB_LINK_OPTIONS= $(LDFLAGS) $(THR_FLAGS) -b +e -Wl,+concatrpath LINK_UDF_LIBS+=$(ICU_LIBS) diff --git a/configure.in b/configure.in index 67281ede0b..c53047fef6 100644 --- a/configure.in +++ b/configure.in @@ -642,8 +642,14 @@ if test "$EDITLINE_FLG" = "Y"; then AC_SUBST(TERMLIB) XE_APPEND(-l$TERMLIB, LIBS) fi + AC_SEARCH_LIBS(inet_aton, resolv) -AC_CHECK_LIB(atomic_ops, main) + +dnl HP-UX atomic routines are in atomic library, not standard C library. +dnl If we can't find atomic routines in vendor library, look for atomic_ops. +AC_SEARCH_LIBS(atomic_inc, atomic,, + AC_SEARCH_LIBS(main, atomic_ops)) + dnl Check for libraries for static C++ runtime linking AC_CHECK_LIB(supc++, main, XE_APPEND(-lsupc++, STATIC_CXXSUPPORT_LIB)) diff --git a/doc/README.build.posix.html b/doc/README.build.posix.html index 1650258560..98dffd5af4 100644 --- a/doc/README.build.posix.html +++ b/doc/README.build.posix.html @@ -710,6 +710,11 @@ td.right { Firebird requires the HP-UX Atomic APIs ("AtomicAPI" bundle), released as an optional Software Pack (SPK) for HP-UX 11i v2 or v3.

+

+ The Firebird build process requires HP linker (ld) option + "-concatrpath." -concatrpath is provided in the June 2007 patch bundle. + This update is available for HP-UX 11i v2 and v3. +

Compiler version was HP ANSI C++ A.06.23.

@@ -735,6 +740,11 @@ td.right { Firebird requires the HP-UX Atomic APIs ("AtomicAPI" bundle), released as an optional Software Pack (SPK) for HP-UX 11i v2 or v3.

+

+ The Firebird build process requires HP linker (ld) option + "-concatrpath." -concatrpath is provided in the June 2007 patch bundle. + This update is available for HP-UX 11i v2 and v3. +

Compiler version was HP ANSI C++ A.03.85. Note, A.03.85 is the latest and last release of the aCC compiler on PA-RISC. diff --git a/src/common/classes/fb_atomic.h b/src/common/classes/fb_atomic.h index d5872192cf..dedb4ec7d5 100644 --- a/src/common/classes/fb_atomic.h +++ b/src/common/classes/fb_atomic.h @@ -176,7 +176,7 @@ private: } // namespace Firebird -#elif defined(HPUX) +#elif defined(HPUX) && defined(HAVE_ATOMIC_H) #include @@ -428,12 +428,15 @@ private: } // namespace Firebird -#elif defined(HAVE_AO_COMPARE_AND_SWAP_FULL) +#elif defined(HAVE_AO_COMPARE_AND_SWAP_FULL) && !defined(HPUX) // Sometimes in the future it can become the best choice for all platforms. // Currently far not CPUs/OSs/compilers are supported well. // Therefore use it as last chance to build successfully. +// wbo 2009-10 - We tested libatomic_ops against Firebird 2.5/HPUX and the +// atomic implementation was incomplete on IA-64/HPPA + #include namespace Firebird {