install.texi (hppa): Update links for HP-UX patches.
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>
Fri, 11 Apr 2003 18:30:52 +0000 (18:30 +0000)
committerJohn David Anglin <danglin@gcc.gnu.org>
Fri, 11 Apr 2003 18:30:52 +0000 (18:30 +0000)
* 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.
* pa-hpux10.h (LIB_SPEC): Add link options to resolve dependency of
libc.a on libdld.sl when -static is specified and -nolibdld is not
specified.
* pa64-hpux.h (LIB_SPEC): Likewise.
* pa-hpux11.h (LIB_SPEC): Likewise.
(LINK_SPEC): Add __gcc_plt_call as an undefined symbol when -shared
is not specified.

From-SVN: r65471

gcc/ChangeLog
gcc/config/pa/pa-hpux10.h
gcc/config/pa/pa-hpux11.h
gcc/config/pa/pa64-hpux.h
gcc/doc/install.texi
gcc/doc/invoke.texi

index c6210cfc806a6ef4ab03c04835cf80e88a9d1bd2..35c7a34b8b0d879fdff33cb72c3d47d4a1ba42d9 100644 (file)
@@ -1,3 +1,19 @@
+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.
+
+       * pa-hpux10.h (LIB_SPEC): Add link options to resolve dependency of
+       libc.a on libdld.sl when -static is specified and -nolibdld is not
+       specified.
+       * pa64-hpux.h (LIB_SPEC): Likewise.
+       * pa-hpux11.h (LIB_SPEC): Likewise.
+       (LINK_SPEC): Add __gcc_plt_call as an undefined symbol when -shared
+       is not specified.
+
 2003-04-11  Zack Weinberg  <zack@codesourcery.com>
 
        * config/darwin-c.c (darwin_pragma_unused): Use lookup_name,
index 0354543e3d0928c6f225d5eb1055136f674f2349..9cd7c1b9de760b402049e4405455e87db6fd4539 100644 (file)
@@ -82,10 +82,12 @@ Boston, MA 02111-1307, USA.  */
 #define LIB_SPEC \
   "%{!shared:\
      %{!p:%{!pg:\
-       %{!threads:-lc}\
+       %{!threads:-lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}\
        %{threads:-lcma -lc_r}}}\
-     %{p: -L/lib/libp/ -lc}\
-     %{pg: -L/lib/libp/ -lc}}"
+     %{p: -L/lib/libp/ -lc\
+       %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}\
+     %{pg: -L/lib/libp/ -lc\
+       %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}"
 
 #undef THREAD_MODEL_SPEC
 #define THREAD_MODEL_SPEC "%{!threads:single}%{threads:dce}"
index 502b82b7af4eb01497d0b070965f4b6b778e481e..b567c982433f0dbb72232f4142167c1baf8b0e18 100644 (file)
@@ -72,10 +72,13 @@ Boston, MA 02111-1307, USA.  */
 #undef LINK_SPEC
 #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & 1)
 #define LINK_SPEC \
-  "%{!mpa-risc-1-0:%{!shared:-L/lib/pa1.1 -L/usr/lib/pa1.1 }} -z %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:-b}"
+  "%{!mpa-risc-1-0:%{!shared:-L/lib/pa1.1 -L/usr/lib/pa1.1 }} -z\
+   %{mlinker-opt:-O} %{!shared:-u main -u __gcc_plt_call}\
+   %{static:-a archive} %{shared:-b}"
 #else
 #define LINK_SPEC \
-  "-z %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:-b}"
+  "-z %{mlinker-opt:-O} %{!shared:-u main -u __gcc_plt_call}\
+   %{static:-a archive} %{shared:-b}"
 #endif
 
 /* Like the default, except no -lg.  */
@@ -83,10 +86,12 @@ Boston, MA 02111-1307, USA.  */
 #define LIB_SPEC \
   "%{!shared:\
      %{!p:%{!pg:\
-       %{!threads:-lc}\
+       %{!threads:-lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}\
        %{threads:-lcma -lc_r}}}\
-     %{p: -L/lib/libp/ -lc}\
-     %{pg: -L/lib/libp/ -lc}}"
+     %{p: -L/lib/libp/ -lc\
+       %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}\
+     %{pg: -L/lib/libp/ -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.  */
index 690d511cce5d5934bd64bb02a1a22d834fdd9bb3..024d18955894d29862df25f463296c4e20d35db2 100644 (file)
@@ -47,10 +47,12 @@ Boston, MA 02111-1307, USA.  */
 #undef LIB_SPEC
 #define LIB_SPEC \
   "%{!shared:\
-     %{!p:\
-       %{!pg: %{!threads:-lc} %{threads:-lcma -lc_r}}\
-       %{pg: -L/usr/lib/pa20_64/libp/ -lgprof -lc}}\
-     %{p: -L/usr/lib/pa20_64/libp/ -lprof -lc}} /usr/lib/pa20_64/milli.a"
+     %{!p:%{!pg: -lc %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
+     %{pg: -L/usr/lib/pa20_64/libp/ -lgprof -lc\
+       %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}\
+     %{p: -L/usr/lib/pa20_64/libp/ -lprof -lc\
+       %{static:%{!nolibdld:-a shared -ldld -a archive -lc}}}}\
+   /usr/lib/pa20_64/milli.a"
 
 /* Under hpux11, the normal location of the `ld' and `as' programs is the
    /usr/ccs/bin directory.  */
index e78979baa0cdbf0ced9cef481db5ee8cd0ba8b75..b379c749ff42d77757aa6f07e1d0c36bdad934b2 100644 (file)
@@ -2177,15 +2177,15 @@ charge:
 @itemize @bullet
 @item
 @html
-<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
 Latin-America</a>
 @end html
 @ifnothtml
-@uref{http://us-support.external.hp.com,,}US, Canada, Asia-Pacific, and
-Latin-America
+@uref{http://us.itrc.hp.com/service/home/home.do,,} US, Canada, Asia-Pacific,
+and Latin-America.
 @end ifnothtml
 @item
-@uref{http://europe-support.external.hp.com,,Europe}
+@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} so that configure finds an appropriate
 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 linker patch is recommended.
 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 406a448387331e96e8fc2193da96e9d533781493..bfa38fb1941a4ff710839aded9657fa4ace281c0 100644 (file)
@@ -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 determines the section's name
 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 should be relatively small.
 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
+linker.
 @end table
 
 @node Intel 960 Options