config.gcc (hppa*-*-hpux11*, [...]): Remove commented-out logic to use DCE threads (if present)...

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.

From-SVN: r70797
This commit is contained in:
Zack Weinberg 2003-08-26 06:54:15 +00:00
parent 6cd28c3182
commit 7e2055ec11
7 changed files with 141 additions and 105 deletions

View file

@ -1,3 +1,17 @@
2003-08-25 Zack Weinberg <zack@codesourcery.com>
* 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.
2003-08-25 Roger Sayle <roger@eyesopen.com>
* builtins.c (expand_builtin_mathfn): Rearrange so that we only

View file

@ -882,13 +882,11 @@ hppa*64*-*-hpux11*)
then
target_cpu_default="${target_cpu_default}|MASK_GNU_LD"
fi
# if [ x$enable_threads = x ]; then
# enable_threads=$have_pthread_h
# fi
# if [ x$enable_threads = xyes ]; then
# thread_file='dce'
# tmake_file="${tmake_file} pa/t-dce-thr"
# fi
case x${enable_threads} in
xyes | xposix )
thread_file=posix
;;
esac
install_headers_dir=install-headers-cpio
;;
hppa1.1-*-hpux11* | hppa2*-*-hpux11*)
@ -896,13 +894,11 @@ hppa1.1-*-hpux11* | hppa2*-*-hpux11*)
tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h dbxelf.h pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
tmake_file="pa/t-pa pa/t-pa-hpux pa/t-hpux-shlib"
xmake_file="pa/x-ada"
# if test x$enable_threads = x; then
# enable_threads=$have_pthread_h
# fi
# if test x$enable_threads = xyes; then
# thread_file='dce'
# tmake_file="${tmake_file} pa/t-dce-thr"
# fi
case x${enable_threads} in
xyes | xposix )
thread_file=posix
;;
esac
install_headers_dir=install-headers-cpio
use_collect2=yes
;;
@ -910,13 +906,11 @@ hppa1.0-*-hpux11*)
tm_file="${tm_file} pa/pa32-regs.h pa/long_double.h dbxelf.h pa/som.h pa/pa-hpux.h pa/pa-hpux11.h"
tmake_file="pa/t-pa pa/t-pa-hpux pa/t-hpux-shlib"
xmake_file="pa/x-ada"
# if test x$enable_threads = x; then
# enable_threads=$have_pthread_h
# fi
# if test x$enable_threads = xyes; then
# thread_file='dce'
# tmake_file="${tmake_file} pa/t-dce-thr"
# fi
case x${enable_threads} in
xyes | xposix )
thread_file=posix
;;
esac
install_headers_dir=install-headers-cpio
use_collect2=yes
;;
@ -1296,9 +1290,11 @@ ia64*-*-hpux*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h ia64/sysv4.h ia64/hpux.h ia64/hpux_longdouble.h"
tmake_file="ia64/t-ia64 ia64/t-hpux"
target_cpu_default="MASK_GNU_AS"
if test x$enable_threads = xyes; then
thread_file='posix'
fi
case x$enable_threads in
xyes | xposix )
thread_file=posix
;;
esac
use_collect2=no
c_target_objs="ia64-c.o"
cxx_target_objs="ia64-c.o"

View file

@ -49,6 +49,13 @@ do { \
} \
} 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. */
#undef ASM_EXTRA_SPEC
#define ASM_EXTRA_SPEC "%{milp32:-milp32} %{mlp64:-mlp64}"
@ -68,6 +75,7 @@ do { \
#undef LIB_SPEC
#define LIB_SPEC \
"%{!shared: \
%{mt|pthread:-lpthread} \
%{p:%{!mlp64:-L/usr/lib/hpux32/libp} \
%{mlp64:-L/usr/lib/hpux64/libp} -lprof} \
%{pg:%{!mlp64:-L/usr/lib/hpux32/libp} \
@ -134,6 +142,10 @@ do { \
#undef TARGET_HPUX_LD
#define TARGET_HPUX_LD 1
/* 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
/* Put out the needed function declarations at the end. */
#define TARGET_ASM_FILE_END ia64_hpux_file_end

View file

@ -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. */

View file

@ -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

View file

@ -1,3 +1,8 @@
2003-08-25 Zack Weinberg <zack@codesourcery.com>
* config/os/hpux/os_defines.h: Unconditionally define
_GLIBCXX_GTHREAD_USE_WEAK to 0.
2003-08-19 Geoffrey Keating <geoffk@apple.com>
* crossconfig.m4 (*-darwin*): Add a large and boring stanza for

View file

@ -97,8 +97,9 @@ typedef long int __padding_type;
#define _GLIBCXX_INST_ATOMICITY_LOCK 1
#endif
/* Don't use pragma weak in gthread headers. */
#ifdef __hppa__
/* Don't use pragma weak in gthread headers. HP-UX rejects programs
with unsatisfied external references even if all of those references
are weak; gthread relies on such unsatisfied references being resolved
to null pointers when weak symbol support is on. */
#define _GLIBCXX_GTHREAD_USE_WEAK 0
#endif
#endif