blob: 1f07f80ed0a579df86e1fd7e4cbc1af270944bc9 [file] [log] [blame]
<html lang="en">
<head>
<title>HPPA Options - Using the GNU Compiler Collection (GCC)</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="Using the GNU Compiler Collection (GCC)">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Submodel-Options.html#Submodel-Options" title="Submodel Options">
<link rel="prev" href="H8_002f300-Options.html#H8_002f300-Options" title="H8/300 Options">
<link rel="next" href="i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options" title="i386 and x86-64 Options">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
2008 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with the
Invariant Sections being ``Funding Free Software'', the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below). A copy of the license is included in the section entitled
``GNU Free Documentation License''.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU
software. Copies published by the Free Software Foundation raise
funds for GNU development.-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
<link rel="stylesheet" type="text/css" href="../cs.css">
</head>
<body>
<div class="node">
<a name="HPPA-Options"></a>
<p>
Next:&nbsp;<a rel="next" accesskey="n" href="i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options">i386 and x86-64 Options</a>,
Previous:&nbsp;<a rel="previous" accesskey="p" href="H8_002f300-Options.html#H8_002f300-Options">H8/300 Options</a>,
Up:&nbsp;<a rel="up" accesskey="u" href="Submodel-Options.html#Submodel-Options">Submodel Options</a>
<hr>
</div>
<h4 class="subsection">3.17.14 HPPA Options</h4>
<p><a name="index-HPPA-Options-1271"></a>
These &lsquo;<samp><span class="samp">-m</span></samp>&rsquo; options are defined for the HPPA family of computers:
<dl>
<dt><code>-march=</code><var>architecture-type</var><dd><a name="index-march-1272"></a>Generate code for the specified architecture. The choices for
<var>architecture-type</var> are &lsquo;<samp><span class="samp">1.0</span></samp>&rsquo; for PA 1.0, &lsquo;<samp><span class="samp">1.1</span></samp>&rsquo; for PA
1.1, and &lsquo;<samp><span class="samp">2.0</span></samp>&rsquo; for PA 2.0 processors. Refer to
<samp><span class="file">/usr/lib/sched.models</span></samp> on an HP-UX system to determine the proper
architecture option for your machine. Code compiled for lower numbered
architectures will run on higher numbered architectures, but not the
other way around.
<br><dt><code>-mpa-risc-1-0</code><dt><code>-mpa-risc-1-1</code><dt><code>-mpa-risc-2-0</code><dd><a name="index-mpa_002drisc_002d1_002d0-1273"></a><a name="index-mpa_002drisc_002d1_002d1-1274"></a><a name="index-mpa_002drisc_002d2_002d0-1275"></a>Synonyms for <samp><span class="option">-march=1.0</span></samp>, <samp><span class="option">-march=1.1</span></samp>, and <samp><span class="option">-march=2.0</span></samp> respectively.
<br><dt><code>-mbig-switch</code><dd><a name="index-mbig_002dswitch-1276"></a>Generate code suitable for big switch tables. Use this option only if
the assembler/linker complain about out of range branches within a switch
table.
<br><dt><code>-mjump-in-delay</code><dd><a name="index-mjump_002din_002ddelay-1277"></a>Fill delay slots of function calls with unconditional jump instructions
by modifying the return pointer for the function call to be the target
of the conditional jump.
<br><dt><code>-mdisable-fpregs</code><dd><a name="index-mdisable_002dfpregs-1278"></a>Prevent floating point registers from being used in any manner. This is
necessary for compiling kernels which perform lazy context switching of
floating point registers. If you use this option and attempt to perform
floating point operations, the compiler will abort.
<br><dt><code>-mdisable-indexing</code><dd><a name="index-mdisable_002dindexing-1279"></a>Prevent the compiler from using indexing address modes. This avoids some
rather obscure problems when compiling MIG generated code under MACH.
<br><dt><code>-mno-space-regs</code><dd><a name="index-mno_002dspace_002dregs-1280"></a>Generate code that assumes the target has no space registers. This allows
GCC to generate faster indirect calls and use unscaled index address modes.
<p>Such code is suitable for level 0 PA systems and kernels.
<br><dt><code>-mfast-indirect-calls</code><dd><a name="index-mfast_002dindirect_002dcalls-1281"></a>Generate code that assumes calls never cross space boundaries. This
allows GCC to emit code which performs faster indirect calls.
<p>This option will not work in the presence of shared libraries or nested
functions.
<br><dt><code>-mfixed-range=</code><var>register-range</var><dd><a name="index-mfixed_002drange-1282"></a>Generate code treating the given register range as fixed registers.
A fixed register is one that the register allocator can not use. This is
useful when compiling kernel code. A register range is specified as
two registers separated by a dash. Multiple register ranges can be
specified separated by a comma.
<br><dt><code>-mlong-load-store</code><dd><a name="index-mlong_002dload_002dstore-1283"></a>Generate 3-instruction load and store sequences as sometimes required by
the HP-UX 10 linker. This is equivalent to the &lsquo;<samp><span class="samp">+k</span></samp>&rsquo; option to
the HP compilers.
<br><dt><code>-mportable-runtime</code><dd><a name="index-mportable_002druntime-1284"></a>Use the portable calling conventions proposed by HP for ELF systems.
<br><dt><code>-mgas</code><dd><a name="index-mgas-1285"></a>Enable the use of assembler directives only GAS understands.
<br><dt><code>-mschedule=</code><var>cpu-type</var><dd><a name="index-mschedule-1286"></a>Schedule code according to the constraints for the machine type
<var>cpu-type</var>. The choices for <var>cpu-type</var> are &lsquo;<samp><span class="samp">700</span></samp>&rsquo;
&lsquo;<samp><span class="samp">7100</span></samp>&rsquo;, &lsquo;<samp><span class="samp">7100LC</span></samp>&rsquo;, &lsquo;<samp><span class="samp">7200</span></samp>&rsquo;, &lsquo;<samp><span class="samp">7300</span></samp>&rsquo; and &lsquo;<samp><span class="samp">8000</span></samp>&rsquo;. Refer
to <samp><span class="file">/usr/lib/sched.models</span></samp> on an HP-UX system to determine the
proper scheduling option for your machine. The default scheduling is
&lsquo;<samp><span class="samp">8000</span></samp>&rsquo;.
<br><dt><code>-mlinker-opt</code><dd><a name="index-mlinker_002dopt-1287"></a>Enable the optimization pass in the HP-UX linker. Note this makes symbolic
debugging impossible. It also triggers a bug in the HP-UX 8 and HP-UX 9
linkers in which they give bogus error messages when linking some programs.
<br><dt><code>-msoft-float</code><dd><a name="index-msoft_002dfloat-1288"></a>Generate output containing library calls for floating point.
<strong>Warning:</strong> the requisite libraries are not available for all HPPA
targets. Normally the facilities of the machine's usual C compiler are
used, but this cannot be done directly in cross-compilation. You must make
your own arrangements to provide suitable library functions for
cross-compilation.
<p><samp><span class="option">-msoft-float</span></samp> changes the calling convention in the output file;
therefore, it is only useful if you compile <em>all</em> of a program with
this option. In particular, you need to compile <samp><span class="file">libgcc.a</span></samp>, the
library that comes with GCC, with <samp><span class="option">-msoft-float</span></samp> in order for
this to work.
<br><dt><code>-msio</code><dd><a name="index-msio-1289"></a>Generate the predefine, <code>_SIO</code>, for server IO. The default is
<samp><span class="option">-mwsio</span></samp>. This generates the predefines, <code>__hp9000s700</code>,
<code>__hp9000s700__</code> and <code>_WSIO</code>, for workstation IO. These
options are available under HP-UX and HI-UX.
<br><dt><code>-mgnu-ld</code><dd><a name="index-mgnu_002dld-1290"></a>Use GNU ld specific options. This passes <samp><span class="option">-shared</span></samp> to ld when
building a shared library. It is the default when GCC is configured,
explicitly or implicitly, with the GNU linker. This option does not
have any affect on which ld is called, it only changes what parameters
are passed to that ld. The ld that is called is determined by the
<samp><span class="option">--with-ld</span></samp> configure option, GCC's program search path, and
finally by the user's <samp><span class="env">PATH</span></samp>. The linker used by GCC can be printed
using &lsquo;<samp><span class="samp">which `gcc -print-prog-name=ld`</span></samp>&rsquo;. This option is only available
on the 64 bit HP-UX GCC, i.e. configured with &lsquo;<samp><span class="samp">hppa*64*-*-hpux*</span></samp>&rsquo;.
<br><dt><code>-mhp-ld</code><dd><a name="index-mhp_002dld-1291"></a>Use HP ld specific options. This passes <samp><span class="option">-b</span></samp> to ld when building
a shared library and passes <samp><span class="option">+Accept TypeMismatch</span></samp> to ld on all
links. It is the default when GCC is configured, explicitly or
implicitly, with the HP linker. This option does not have any affect on
which ld is called, it only changes what parameters are passed to that
ld. The ld that is called is determined by the <samp><span class="option">--with-ld</span></samp>
configure option, GCC's program search path, and finally by the user's
<samp><span class="env">PATH</span></samp>. The linker used by GCC can be printed using &lsquo;<samp><span class="samp">which
`gcc -print-prog-name=ld`</span></samp>&rsquo;. This option is only available on the 64 bit
HP-UX GCC, i.e. configured with &lsquo;<samp><span class="samp">hppa*64*-*-hpux*</span></samp>&rsquo;.
<br><dt><code>-mlong-calls</code><dd><a name="index-mno_002dlong_002dcalls-1292"></a>Generate code that uses long call sequences. This ensures that a call
is always able to reach linker generated stubs. The default is to generate
long calls only when the distance from the call site to the beginning
of the function or translation unit, as the case may be, exceeds a
predefined limit set by the branch type being used. The limits for
normal calls are 7,600,000 and 240,000 bytes, respectively for the
PA 2.0 and PA 1.X architectures. Sibcalls are always limited at
240,000 bytes.
<p>Distances are measured from the beginning of functions when using the
<samp><span class="option">-ffunction-sections</span></samp> option, or when using the <samp><span class="option">-mgas</span></samp>
and <samp><span class="option">-mno-portable-runtime</span></samp> options together under HP-UX with
the SOM linker.
<p>It is normally not desirable to use this option as it will degrade
performance. However, it may be useful in large applications,
particularly when partial linking is used to build the application.
<p>The types of long calls used depends on the capabilities of the
assembler and linker, and the type of code being generated. The
impact on systems that support long absolute calls, and long pic
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.
<br><dt><code>-munix=</code><var>unix-std</var><dd><a name="index-march-1293"></a>Generate compiler predefines and select a startfile for the specified
UNIX standard. The choices for <var>unix-std</var> are &lsquo;<samp><span class="samp">93</span></samp>&rsquo;, &lsquo;<samp><span class="samp">95</span></samp>&rsquo;
and &lsquo;<samp><span class="samp">98</span></samp>&rsquo;. &lsquo;<samp><span class="samp">93</span></samp>&rsquo; is supported on all HP-UX versions. &lsquo;<samp><span class="samp">95</span></samp>&rsquo;
is available on HP-UX 10.10 and later. &lsquo;<samp><span class="samp">98</span></samp>&rsquo; is available on HP-UX
11.11 and later. The default values are &lsquo;<samp><span class="samp">93</span></samp>&rsquo; for HP-UX 10.00,
&lsquo;<samp><span class="samp">95</span></samp>&rsquo; for HP-UX 10.10 though to 11.00, and &lsquo;<samp><span class="samp">98</span></samp>&rsquo; for HP-UX 11.11
and later.
<p><samp><span class="option">-munix=93</span></samp> provides the same predefines as GCC 3.3 and 3.4.
<samp><span class="option">-munix=95</span></samp> provides additional predefines for <code>XOPEN_UNIX</code>
and <code>_XOPEN_SOURCE_EXTENDED</code>, and the startfile <samp><span class="file">unix95.o</span></samp>.
<samp><span class="option">-munix=98</span></samp> provides additional predefines for <code>_XOPEN_UNIX</code>,
<code>_XOPEN_SOURCE_EXTENDED</code>, <code>_INCLUDE__STDC_A1_SOURCE</code> and
<code>_INCLUDE_XOPEN_SOURCE_500</code>, and the startfile <samp><span class="file">unix98.o</span></samp>.
<p>It is <em>important</em> to note that this option changes the interfaces
for various library routines. It also affects the operational behavior
of the C library. Thus, <em>extreme</em> care is needed in using this
option.
<p>Library code that is intended to operate with more than one UNIX
standard must test, set and restore the variable <var>__xpg4_extended_mask</var>
as appropriate. Most GNU software doesn't provide this capability.
<br><dt><code>-nolibdld</code><dd><a name="index-nolibdld-1294"></a>Suppress the generation of link options to search libdld.sl when the
<samp><span class="option">-static</span></samp> option is specified on HP-UX 10 and later.
<br><dt><code>-static</code><dd><a name="index-static-1295"></a>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 <samp><span class="option">-static</span></samp> option is specified, special link options
are needed to resolve this dependency.
<p>On HP-UX 10 and later, the GCC driver adds the necessary options to
link with libdld.sl when the <samp><span class="option">-static</span></samp> 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
<samp><span class="option">-nolibdld</span></samp> option can be used to prevent the GCC driver from
adding these link options.
<br><dt><code>-threads</code><dd><a name="index-threads-1296"></a>Add support for multithreading with the <dfn>dce thread</dfn> library
under HP-UX. This option sets flags for both the preprocessor and
linker.
</dl>
</body></html>