[PATCH] PA documentation update

John David Anglin dave@hiauly1.hia.nrc.ca
Fri Apr 11 19:28:00 GMT 2003

This documentation update provides information on linker selection
and the effect of -nolibdld, -static and -threads on the PA.

Makeinfo tested on hppa64-hp-hpux11.11 and hppa2.0w-hp-hpux11.11.
Installed to 3.3 and trunk.

J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

2003-04-11  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	* doc/install.texi (hppa): Update links for HP-UX patches.  Revise
	notes on linker selection and configuration for 64-bit HP-UX port.
	* doc/invoke.texi (hppa): Remove hppa text from description for
	-ffunction-sections and -fdata-sections.  Document -static, -nolibdld
	and -threads options.

Index: doc/install.texi
RCS file: /cvs/gcc/gcc/gcc/doc/install.texi,v
retrieving revision 1.181
diff -u -3 -p -r1.181 install.texi
--- doc/install.texi	9 Apr 2003 15:14:23 -0000	1.181
+++ doc/install.texi	11 Apr 2003 16:31:38 -0000
@@ -2177,15 +2177,15 @@ charge:
 @itemize @bullet
-<a href="http://us-support.external.hp.com">US, Canada, Asia-Pacific, and
+<a href="http://us.itrc.hp.com/service/home/home.do">US, Canada, Asia-Pacific, and
 @end html
-@uref{http://us-support.external.hp.com,,}US, Canada, Asia-Pacific, and
+@uref{http://us.itrc.hp.com/service/home/home.do,,} US, Canada, Asia-Pacific,
+and Latin-America.
 @end ifnothtml
+@uref{http://europe.itrc.hp.com/service/home/home.do,,} Europe.
 @end itemize
 The HP assembler on these systems is much better than the hpux9 assembler,
@@ -2211,6 +2211,13 @@ set your @env{PATH} or define @env{CC} s
 compiler for the initial bootstrap.  Different prefixes must be used if
 both ports are to be installed on the same system.
+It is best to explicitly configure the @samp{hppa64-hp-hpux11*} target
+with the @option{--with-ld=@dots{}} option.  We support both the HP
+and GNU linkers for this target.  The two linkers require different
+link commands.  Thus, it's not possible to switch linkers during a
+GCC build.  This has been been reported to occur in a unified build
+of binutils and GCC.
 GCC 2.95.x is not supported under HP-UX 11 and cannot be used to
 compile GCC 3.0 and up.  Refer to @uref{binaries.html,,binaries} for
 information about obtaining precompiled GCC binaries for HP-UX.
@@ -2244,10 +2251,29 @@ by the HP linker.  So, again a recent li
 The HP assembler has many limitations and is not recommended for either
 the 32 or 64-bit ports.  For example, it does not support weak symbols
 or alias definitions.  As a result, explicit template instantiations
-are required when using C++.  You also can't generate debugging information
-when using the HP assembler.  Either the HP or GNU linker can be used
-with the 64-bit port but it may be necessary to use the GNU linker
-when dwarf2 exception support is implemented.
+are required when using C++.  This will make it difficult if not
+impossible to build many C++ applications.  You also can't generate
+debugging information when using the HP assembler with GCC.
+There are a number of issues to consider in selecting which linker to
+use with the 64-bit port.  The  GNU 64-bit linker can only create dynamic
+binaries.  The @option{-static} option causes linking with archive
+libraries but doesn't produce a truly static binary.  Dynamic binaries
+still require final binding by the dynamic loader to resolve a set of
+dynamic-loader-defined symbols.  The default behavior of the HP linker
+is the same as the GNU linker.  However, it can generate true 64-bit
+static binaries using the @option{+compat} option.
+The HP 64-bit linker doesn't support linkonce semantics.  As a
+result, C++ programs have many more sections than they should.
+The GNU 64-bit linker has some issues with shared library support
+and exceptions.  As a result, we only support libgcc in archive
+format.  For similar reasons, dwarf2 unwind and exception support
+are disabled.  The GNU linker also has problems creating binaries
+with @option{-static}.  It doesn't provide stubs for internal
+calls to global functions in shared libraries, so these calls
+can't be overloaded.
 There are several possible approaches to building the distribution.
 Binutils can be built first using the HP tools.  Then, the GCC
Index: doc/invoke.texi
RCS file: /cvs/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.261
diff -u -3 -p -r1.261 invoke.texi
--- doc/invoke.texi	11 Apr 2003 14:59:05 -0000	1.261
+++ doc/invoke.texi	11 Apr 2003 16:31:46 -0000
@@ -504,7 +504,8 @@ in the following sections.
 -mno-portable-runtime  -mno-soft-float @gol
 -mno-space-regs  -msoft-float  -mpa-risc-1-0 @gol
 -mpa-risc-1-1  -mpa-risc-2-0  -mportable-runtime @gol
--mschedule=@var{cpu-type}  -mspace-regs  -msio  -mwsio}
+-mschedule=@var{cpu-type}  -mspace-regs  -msio  -mwsio @gol
+-nolibdld  -static  -threads}
 @emph{Intel 960 Options}
 @gccoptlist{-m@var{cpu-type}  -masm-compat  -mclean-linkage @gol
@@ -4367,10 +4368,10 @@ function or the name of the data item de
 in the output file.
 Use these options on systems where the linker can perform optimizations
-to improve locality of reference in the instruction space.  HPPA
-processors running HP-UX and SPARC processors running Solaris 2 have
-linkers with such optimizations.  Other systems using the ELF object format
-as well as AIX may have these optimizations in the future.
+to improve locality of reference in the instruction space.  Most systems
+using the ELF object format and SPARC processors running Solaris 2 have
+linkers with such optimizations.  AIX may have these optimizations in
+the future.
 Only use these options when there are significant benefits from doing
 so.  When you specify these options, the assembler and linker will
@@ -8576,6 +8577,30 @@ symbol-difference or pc-relative calls s
 However, an indirect call is used on 32-bit ELF systems in pic code
 and it is quite long.
+@item -nolibdld
+@opindex nolibdld
+Suppress the generation of link options to search libdld.sl when the
+@option{-static} option is specified on HP-UX 10 and later.
+@item -static
+@opindex static
+The HP-UX implementation of setlocale in libc has a dependency on
+libdld.sl.  There isn't an archive version of libdld.sl.  Thus,
+when the @option{-static} option is specified, special link options
+are needed to resolve this dependency.
+On HP-UX 10 and later, the GCC driver adds the necessary options to
+link with libdld.sl when the @option{-static} option is specified.
+This causes the resulting binary to be dynamic.  On the 64-bit port,
+the linkers generate dynamic binaries by default in any case.  The
+@option{-nolibdld} option can be used to prevent the GCC driver from
+adding these link options.
+@item -threads
+@opindex threads
+Add support for multithreading with the @dfn{dce thread} library
+under HP-UX.  This option sets flags for both the preprocessor and
 @end table
 @node Intel 960 Options

More information about the Gcc-patches mailing list