aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog16
-rw-r--r--gcc/config/pa/pa-hpux10.h8
-rw-r--r--gcc/config/pa/pa-hpux11.h15
-rw-r--r--gcc/config/pa/pa64-hpux.h10
-rw-r--r--gcc/doc/install.texi42
-rw-r--r--gcc/doc/invoke.texi35
6 files changed, 101 insertions, 25 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c6210cf..35c7a34 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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,
diff --git a/gcc/config/pa/pa-hpux10.h b/gcc/config/pa/pa-hpux10.h
index 0354543..9cd7c1b 100644
--- a/gcc/config/pa/pa-hpux10.h
+++ b/gcc/config/pa/pa-hpux10.h
@@ -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}"
diff --git a/gcc/config/pa/pa-hpux11.h b/gcc/config/pa/pa-hpux11.h
index 502b82b..b567c98 100644
--- a/gcc/config/pa/pa-hpux11.h
+++ b/gcc/config/pa/pa-hpux11.h
@@ -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. */
diff --git a/gcc/config/pa/pa64-hpux.h b/gcc/config/pa/pa64-hpux.h
index 690d511..024d189 100644
--- a/gcc/config/pa/pa64-hpux.h
+++ b/gcc/config/pa/pa64-hpux.h
@@ -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. */
diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi
index e78979b..b379c74 100644
--- a/gcc/doc/install.texi
+++ b/gcc/doc/install.texi
@@ -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
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 406a448..bfa38fb 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -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