2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
8 .. index:: HPPA Options
15 These :samp:`-m` options are defined for the HPPA family of computers:
17 .. option:: -march={architecture-type}
19 Generate code for the specified architecture. The choices for
20 :samp:`{architecture-type}` are :samp:`1.0` for PA 1.0, :samp:`1.1` for PA
21 1.1, and :samp:`2.0` for PA 2.0 processors. Refer to
22 :samp:`/usr/lib/sched.models` on an HP-UX system to determine the proper
23 architecture option for your machine. Code compiled for lower numbered
24 architectures runs on higher numbered architectures, but not the
27 .. option:: -mpa-risc-1-0, -mpa-risc-1-1, -mpa-risc-2-0
29 Synonyms for :option:`-march=1.0`, :option:`-march=1.1`, and :option:`-march=2.0` respectively.
31 .. option:: -mcaller-copies
33 The caller copies function arguments passed by hidden reference. This
34 option should be used with care as it is not compatible with the default
35 32-bit runtime. However, only aggregates larger than eight bytes are
36 passed by hidden reference and the option provides better compatibility
39 .. option:: -mjump-in-delay
41 This option is ignored and provided for compatibility purposes only.
43 .. option:: -mdisable-fpregs
45 Prevent floating-point registers from being used in any manner. This is
46 necessary for compiling kernels that perform lazy context switching of
47 floating-point registers. If you use this option and attempt to perform
48 floating-point operations, the compiler aborts.
50 .. option:: -mdisable-indexing
52 Prevent the compiler from using indexing address modes. This avoids some
53 rather obscure problems when compiling MIG generated code under MACH.
55 .. option:: -mno-space-regs
57 Generate code that assumes the target has no space registers. This allows
58 GCC to generate faster indirect calls and use unscaled index address modes.
60 Such code is suitable for level 0 PA systems and kernels.
62 .. option:: -mspace-regs
64 Default setting; overrides :option:`-mno-space-regs`.
66 .. option:: -mfast-indirect-calls
68 Generate code that assumes calls never cross space boundaries. This
69 allows GCC to emit code that performs faster indirect calls.
71 This option does not work in the presence of shared libraries or nested
74 .. option:: -mfixed-range={register-range}
76 Generate code treating the given register range as fixed registers.
77 A fixed register is one that the register allocator cannot use. This is
78 useful when compiling kernel code. A register range is specified as
79 two registers separated by a dash. Multiple register ranges can be
80 specified separated by a comma.
82 .. option:: -mlong-load-store
84 Generate 3-instruction load and store sequences as sometimes required by
85 the HP-UX 10 linker. This is equivalent to the :samp:`+k` option to
88 .. option:: -mportable-runtime
90 Use the portable calling conventions proposed by HP for ELF systems.
94 Enable the use of assembler directives only GAS understands.
96 .. option:: -mschedule={cpu-type}
98 Schedule code according to the constraints for the machine type
99 :samp:`{cpu-type}`. The choices for :samp:`{cpu-type}` are :samp:`700`
100 :samp:`7100`, :samp:`7100LC`, :samp:`7200`, :samp:`7300` and :samp:`8000`. Refer
101 to :samp:`/usr/lib/sched.models` on an HP-UX system to determine the
102 proper scheduling option for your machine. The default scheduling is
105 .. option:: -mlinker-opt
107 Enable the optimization pass in the HP-UX linker. Note this makes symbolic
108 debugging impossible. It also triggers a bug in the HP-UX 8 and HP-UX 9
109 linkers in which they give bogus error messages when linking some programs.
111 .. option:: -msoft-float
113 Generate output containing library calls for floating point.
117 The requisite libraries are not available for all HPPA
118 targets. Normally the facilities of the machine's usual C compiler are
119 used, but this cannot be done directly in cross-compilation. You must make
120 your own arrangements to provide suitable library functions for
123 :option:`-msoft-float` changes the calling convention in the output file;
124 therefore, it is only useful if you compile *all* of a program with
125 this option. In particular, you need to compile :samp:`libgcc.a`, the
126 library that comes with GCC, with :option:`-msoft-float` in order for
131 Generate the predefine, ``_SIO``, for server IO. The default is
132 :option:`-mwsio`. This generates the predefines, ``__hp9000s700``,
133 ``__hp9000s700__`` and ``_WSIO``, for workstation IO. These
134 options are available under HP-UX and HI-UX.
138 Use options specific to GNU :command:`ld`.
139 This passes :option:`-shared` to :command:`ld` when
140 building a shared library. It is the default when GCC is configured,
141 explicitly or implicitly, with the GNU linker. This option does not
142 affect which :command:`ld` is called; it only changes what parameters
143 are passed to that :command:`ld`.
144 The :command:`ld` that is called is determined by the
145 :option:`--with-ld` configure option, GCC's program search path, and
146 finally by the user's :envvar:`PATH`. The linker used by GCC can be printed
147 using :samp:`which `gcc -print-prog-name=ld``. This option is only available
148 on the 64-bit HP-UX GCC, i.e. configured with :samp:`hppa*64*-*-hpux*`.
152 Use options specific to HP :command:`ld`.
153 This passes :option:`-b` to :command:`ld` when building
154 a shared library and passes +Accept TypeMismatch to :command:`ld` on all
155 links. It is the default when GCC is configured, explicitly or
156 implicitly, with the HP linker. This option does not affect
157 which :command:`ld` is called; it only changes what parameters are passed to that
159 The :command:`ld` that is called is determined by the :option:`--with-ld`
160 configure option, GCC's program search path, and finally by the user's
161 :envvar:`PATH`. The linker used by GCC can be printed using :samp:`which
162 `gcc -print-prog-name=ld``. This option is only available on the 64-bit
163 HP-UX GCC, i.e. configured with :samp:`hppa*64*-*-hpux*`.
165 .. option:: -mlong-calls
167 Generate code that uses long call sequences. This ensures that a call
168 is always able to reach linker generated stubs. The default is to generate
169 long calls only when the distance from the call site to the beginning
170 of the function or translation unit, as the case may be, exceeds a
171 predefined limit set by the branch type being used. The limits for
172 normal calls are 7,600,000 and 240,000 bytes, respectively for the
173 PA 2.0 and PA 1.X architectures. Sibcalls are always limited at
176 Distances are measured from the beginning of functions when using the
177 :option:`-ffunction-sections` option, or when using the :option:`-mgas`
178 and :option:`-mno-portable-runtime` options together under HP-UX with
181 It is normally not desirable to use this option as it degrades
182 performance. However, it may be useful in large applications,
183 particularly when partial linking is used to build the application.
185 The types of long calls used depends on the capabilities of the
186 assembler and linker, and the type of code being generated. The
187 impact on systems that support long absolute calls, and long pic
188 symbol-difference or pc-relative calls should be relatively small.
189 However, an indirect call is used on 32-bit ELF systems in pic code
190 and it is quite long.
192 .. option:: -mno-long-calls
194 Default setting; overrides :option:`-mlong-calls`.
196 .. option:: -munix={unix-std}
198 Generate compiler predefines and select a startfile for the specified
199 UNIX standard. The choices for :samp:`{unix-std}` are :samp:`93`, :samp:`95`
200 and :samp:`98`. :samp:`93` is supported on all HP-UX versions. :samp:`95`
201 is available on HP-UX 10.10 and later. :samp:`98` is available on HP-UX
202 11.11 and later. The default values are :samp:`93` for HP-UX 10.00,
203 :samp:`95` for HP-UX 10.10 though to 11.00, and :samp:`98` for HP-UX 11.11
206 :option:`-munix=93` provides the same predefines as GCC 3.3 and 3.4.
207 :option:`-munix=95` provides additional predefines for ``XOPEN_UNIX``
208 and ``_XOPEN_SOURCE_EXTENDED``, and the startfile :samp:`unix95.o`.
209 :option:`-munix=98` provides additional predefines for ``_XOPEN_UNIX``,
210 ``_XOPEN_SOURCE_EXTENDED``, ``_INCLUDE__STDC_A1_SOURCE`` and
211 ``_INCLUDE_XOPEN_SOURCE_500``, and the startfile :samp:`unix98.o`.
213 It is *important* to note that this option changes the interfaces
214 for various library routines. It also affects the operational behavior
215 of the C library. Thus, *extreme* care is needed in using this
218 Library code that is intended to operate with more than one UNIX
219 standard must test, set and restore the variable ``__xpg4_extended_mask``
220 as appropriate. Most GNU software doesn't provide this capability.
222 .. option:: -nolibdld
224 Suppress the generation of link options to search libdld.sl when the
225 :option:`-static` option is specified on HP-UX 10 and later.
229 The HP-UX implementation of setlocale in libc has a dependency on
230 libdld.sl. There isn't an archive version of libdld.sl. Thus,
231 when the :option:`-static` option is specified, special link options
232 are needed to resolve this dependency.
234 On HP-UX 10 and later, the GCC driver adds the necessary options to
235 link with libdld.sl when the :option:`-static` option is specified.
236 This causes the resulting binary to be dynamic. On the 64-bit port,
237 the linkers generate dynamic binaries by default in any case. The
238 :option:`-nolibdld` option can be used to prevent the GCC driver from
239 adding these link options.
243 Add support for multithreading with the :dfn:`dce thread` library
244 under HP-UX. This option sets flags for both the preprocessor and