From 120a2fed173faf7e857c2ad3cc6d5bf14671709f Mon Sep 17 00:00:00 2001 From: zack Date: Tue, 26 Aug 2003 06:54:15 +0000 Subject: gcc: * config.gcc (hppa*-*-hpux11*, ia64*-*-hpux*): Remove commented-out logic to use DCE threads (if present), add support for POSIX threads. * config/ia64/hpux.h: Define CPP_SPEC to set appropriate #defines for -pthread. Add -lpthread to LIB_SPEC when -pthread. In both cases take -mt as a synonym for -pthread for acc compatibility. Define GTHREAD_USE_WEAK to 0. * config/pa/pa-hpux11.h: Likewise for CPP_SPEC and LIB_SPEC. Remove old logic for DCE threads from LIB_SPEC. * config/pa/pa64-hpux.h: Define GTHREAD_USE_WEAK to 0. libstdc++-v3: * config/os/hpux/os_defines.h: Unconditionally define _GLIBCXX_GTHREAD_USE_WEAK to 0. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70797 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/config/pa/pa-hpux11.h | 16 ++++++++++------ gcc/config/pa/pa64-hpux.h | 4 ++++ 2 files changed, 14 insertions(+), 6 deletions(-) (limited to 'gcc/config/pa') diff --git a/gcc/config/pa/pa-hpux11.h b/gcc/config/pa/pa-hpux11.h index 7a7b3be5a68..e8865dfff7f 100644 --- a/gcc/config/pa/pa-hpux11.h +++ b/gcc/config/pa/pa-hpux11.h @@ -74,6 +74,13 @@ Boston, MA 02111-1307, USA. */ } \ while (0) +#undef CPP_SPEC +#define CPP_SPEC \ + "%{mt|pthread:-D_REENTRANT -D_THREAD_SAFE -D_POSIX_C_SOURCE=199506L}" +/* aCC defines also -DRWSTD_MULTI_THREAD, -DRW_MULTI_THREAD. These + affect only aCC's C++ library (Rogue Wave-derived) which we do not + use, and they violate the user's name space. */ + /* We can debug dynamically linked executables on hpux11; we also want dereferencing of a NULL pointer to cause a SEGV. */ #undef LINK_SPEC @@ -100,15 +107,12 @@ Boston, MA 02111-1307, USA. */ %{static:-a archive} %{shared:-b}" #endif -/* Like the default, except no -lg. */ +/* hpux 11 has posix threads. */ #undef LIB_SPEC #define LIB_SPEC \ "%{!shared:\ - %{!p:%{!pg:\ - %{!threads:-lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}\ - %{threads:-lcma -lc_r}}}\ - %{p:%{!pg:-lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\ - %{pg:-lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}" + %{mt|pthread:-lpthread} -lc \ + %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}" /* Under hpux11, the normal location of the `ld' and `as' programs is the /usr/ccs/bin directory. */ diff --git a/gcc/config/pa/pa64-hpux.h b/gcc/config/pa/pa64-hpux.h index 4b9e1a3ac9b..a29583b561b 100644 --- a/gcc/config/pa/pa64-hpux.h +++ b/gcc/config/pa/pa64-hpux.h @@ -383,3 +383,7 @@ PA_INIT_FINI_HACK and returns 0. /bin/true cannot be used because it is a script without an interpreter. */ #define INIT_ENVIRONMENT "LD_PXDB=/usr/ccs/bin/size" + +/* The HPUX dynamic linker objects to weak symbols with no + definitions, so do not use them in gthr-posix.h. */ +#define GTHREAD_USE_WEAK 0 -- cgit v1.2.1