HPPA-Options.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1988-2017 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Funding Free Software", the Front-Cover
  8. Texts being (a) (see below), and with the Back-Cover Texts being (b)
  9. (see below). A copy of the license is included in the section entitled
  10. "GNU Free Documentation License".
  11. (a) The FSF's Front-Cover Text is:
  12. A GNU Manual
  13. (b) The FSF's Back-Cover Text is:
  14. You have freedom to copy and modify this GNU Manual, like GNU
  15. software. Copies published by the Free Software Foundation raise
  16. funds for GNU development. -->
  17. <!-- Created by GNU Texinfo 5.2, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <title>Using the GNU Compiler Collection (GCC): HPPA Options</title>
  20. <meta name="description" content="Using the GNU Compiler Collection (GCC): HPPA Options">
  21. <meta name="keywords" content="Using the GNU Compiler Collection (GCC): HPPA Options">
  22. <meta name="resource-type" content="document">
  23. <meta name="distribution" content="global">
  24. <meta name="Generator" content="makeinfo">
  25. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  26. <link href="index.html#Top" rel="start" title="Top">
  27. <link href="Option-Index.html#Option-Index" rel="index" title="Option Index">
  28. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  29. <link href="Submodel-Options.html#Submodel-Options" rel="up" title="Submodel Options">
  30. <link href="IA_002d64-Options.html#IA_002d64-Options" rel="next" title="IA-64 Options">
  31. <link href="H8_002f300-Options.html#H8_002f300-Options" rel="prev" title="H8/300 Options">
  32. <style type="text/css">
  33. <!--
  34. a.summary-letter {text-decoration: none}
  35. blockquote.smallquotation {font-size: smaller}
  36. div.display {margin-left: 3.2em}
  37. div.example {margin-left: 3.2em}
  38. div.indentedblock {margin-left: 3.2em}
  39. div.lisp {margin-left: 3.2em}
  40. div.smalldisplay {margin-left: 3.2em}
  41. div.smallexample {margin-left: 3.2em}
  42. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  43. div.smalllisp {margin-left: 3.2em}
  44. kbd {font-style:oblique}
  45. pre.display {font-family: inherit}
  46. pre.format {font-family: inherit}
  47. pre.menu-comment {font-family: serif}
  48. pre.menu-preformatted {font-family: serif}
  49. pre.smalldisplay {font-family: inherit; font-size: smaller}
  50. pre.smallexample {font-size: smaller}
  51. pre.smallformat {font-family: inherit; font-size: smaller}
  52. pre.smalllisp {font-size: smaller}
  53. span.nocodebreak {white-space:nowrap}
  54. span.nolinebreak {white-space:nowrap}
  55. span.roman {font-family:serif; font-weight:normal}
  56. span.sansserif {font-family:sans-serif; font-weight:normal}
  57. ul.no-bullet {list-style: none}
  58. -->
  59. </style>
  60. </head>
  61. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  62. <a name="HPPA-Options"></a>
  63. <div class="header">
  64. <p>
  65. Next: <a href="IA_002d64-Options.html#IA_002d64-Options" accesskey="n" rel="next">IA-64 Options</a>, Previous: <a href="H8_002f300-Options.html#H8_002f300-Options" accesskey="p" rel="prev">H8/300 Options</a>, Up: <a href="Submodel-Options.html#Submodel-Options" accesskey="u" rel="up">Submodel Options</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  66. </div>
  67. <hr>
  68. <a name="HPPA-Options-1"></a>
  69. <h4 class="subsection">3.18.17 HPPA Options</h4>
  70. <a name="index-HPPA-Options"></a>
  71. <p>These &lsquo;<samp>-m</samp>&rsquo; options are defined for the HPPA family of computers:
  72. </p>
  73. <dl compact="compact">
  74. <dt><code>-march=<var>architecture-type</var></code></dt>
  75. <dd><a name="index-march-4"></a>
  76. <p>Generate code for the specified architecture. The choices for
  77. <var>architecture-type</var> are &lsquo;<samp>1.0</samp>&rsquo; for PA 1.0, &lsquo;<samp>1.1</samp>&rsquo; for PA
  78. 1.1, and &lsquo;<samp>2.0</samp>&rsquo; for PA 2.0 processors. Refer to
  79. <samp>/usr/lib/sched.models</samp> on an HP-UX system to determine the proper
  80. architecture option for your machine. Code compiled for lower numbered
  81. architectures runs on higher numbered architectures, but not the
  82. other way around.
  83. </p>
  84. </dd>
  85. <dt><code>-mpa-risc-1-0</code></dt>
  86. <dt><code>-mpa-risc-1-1</code></dt>
  87. <dt><code>-mpa-risc-2-0</code></dt>
  88. <dd><a name="index-mpa_002drisc_002d1_002d0"></a>
  89. <a name="index-mpa_002drisc_002d1_002d1"></a>
  90. <a name="index-mpa_002drisc_002d2_002d0"></a>
  91. <p>Synonyms for <samp>-march=1.0</samp>, <samp>-march=1.1</samp>, and <samp>-march=2.0</samp> respectively.
  92. </p>
  93. </dd>
  94. <dt><code>-mcaller-copies</code></dt>
  95. <dd><a name="index-mcaller_002dcopies"></a>
  96. <p>The caller copies function arguments passed by hidden reference. This
  97. option should be used with care as it is not compatible with the default
  98. 32-bit runtime. However, only aggregates larger than eight bytes are
  99. passed by hidden reference and the option provides better compatibility
  100. with OpenMP.
  101. </p>
  102. </dd>
  103. <dt><code>-mjump-in-delay</code></dt>
  104. <dd><a name="index-mjump_002din_002ddelay"></a>
  105. <p>This option is ignored and provided for compatibility purposes only.
  106. </p>
  107. </dd>
  108. <dt><code>-mdisable-fpregs</code></dt>
  109. <dd><a name="index-mdisable_002dfpregs"></a>
  110. <p>Prevent floating-point registers from being used in any manner. This is
  111. necessary for compiling kernels that perform lazy context switching of
  112. floating-point registers. If you use this option and attempt to perform
  113. floating-point operations, the compiler aborts.
  114. </p>
  115. </dd>
  116. <dt><code>-mdisable-indexing</code></dt>
  117. <dd><a name="index-mdisable_002dindexing"></a>
  118. <p>Prevent the compiler from using indexing address modes. This avoids some
  119. rather obscure problems when compiling MIG generated code under MACH.
  120. </p>
  121. </dd>
  122. <dt><code>-mno-space-regs</code></dt>
  123. <dd><a name="index-mno_002dspace_002dregs"></a>
  124. <p>Generate code that assumes the target has no space registers. This allows
  125. GCC to generate faster indirect calls and use unscaled index address modes.
  126. </p>
  127. <p>Such code is suitable for level 0 PA systems and kernels.
  128. </p>
  129. </dd>
  130. <dt><code>-mfast-indirect-calls</code></dt>
  131. <dd><a name="index-mfast_002dindirect_002dcalls"></a>
  132. <p>Generate code that assumes calls never cross space boundaries. This
  133. allows GCC to emit code that performs faster indirect calls.
  134. </p>
  135. <p>This option does not work in the presence of shared libraries or nested
  136. functions.
  137. </p>
  138. </dd>
  139. <dt><code>-mfixed-range=<var>register-range</var></code></dt>
  140. <dd><a name="index-mfixed_002drange"></a>
  141. <p>Generate code treating the given register range as fixed registers.
  142. A fixed register is one that the register allocator cannot use. This is
  143. useful when compiling kernel code. A register range is specified as
  144. two registers separated by a dash. Multiple register ranges can be
  145. specified separated by a comma.
  146. </p>
  147. </dd>
  148. <dt><code>-mlong-load-store</code></dt>
  149. <dd><a name="index-mlong_002dload_002dstore"></a>
  150. <p>Generate 3-instruction load and store sequences as sometimes required by
  151. the HP-UX 10 linker. This is equivalent to the &lsquo;<samp>+k</samp>&rsquo; option to
  152. the HP compilers.
  153. </p>
  154. </dd>
  155. <dt><code>-mportable-runtime</code></dt>
  156. <dd><a name="index-mportable_002druntime"></a>
  157. <p>Use the portable calling conventions proposed by HP for ELF systems.
  158. </p>
  159. </dd>
  160. <dt><code>-mgas</code></dt>
  161. <dd><a name="index-mgas"></a>
  162. <p>Enable the use of assembler directives only GAS understands.
  163. </p>
  164. </dd>
  165. <dt><code>-mschedule=<var>cpu-type</var></code></dt>
  166. <dd><a name="index-mschedule"></a>
  167. <p>Schedule code according to the constraints for the machine type
  168. <var>cpu-type</var>. The choices for <var>cpu-type</var> are &lsquo;<samp>700</samp>&rsquo;
  169. &lsquo;<samp>7100</samp>&rsquo;, &lsquo;<samp>7100LC</samp>&rsquo;, &lsquo;<samp>7200</samp>&rsquo;, &lsquo;<samp>7300</samp>&rsquo; and &lsquo;<samp>8000</samp>&rsquo;. Refer
  170. to <samp>/usr/lib/sched.models</samp> on an HP-UX system to determine the
  171. proper scheduling option for your machine. The default scheduling is
  172. &lsquo;<samp>8000</samp>&rsquo;.
  173. </p>
  174. </dd>
  175. <dt><code>-mlinker-opt</code></dt>
  176. <dd><a name="index-mlinker_002dopt"></a>
  177. <p>Enable the optimization pass in the HP-UX linker. Note this makes symbolic
  178. debugging impossible. It also triggers a bug in the HP-UX 8 and HP-UX 9
  179. linkers in which they give bogus error messages when linking some programs.
  180. </p>
  181. </dd>
  182. <dt><code>-msoft-float</code></dt>
  183. <dd><a name="index-msoft_002dfloat-3"></a>
  184. <p>Generate output containing library calls for floating point.
  185. <strong>Warning:</strong> the requisite libraries are not available for all HPPA
  186. targets. Normally the facilities of the machine&rsquo;s usual C compiler are
  187. used, but this cannot be done directly in cross-compilation. You must make
  188. your own arrangements to provide suitable library functions for
  189. cross-compilation.
  190. </p>
  191. <p><samp>-msoft-float</samp> changes the calling convention in the output file;
  192. therefore, it is only useful if you compile <em>all</em> of a program with
  193. this option. In particular, you need to compile <samp>libgcc.a</samp>, the
  194. library that comes with GCC, with <samp>-msoft-float</samp> in order for
  195. this to work.
  196. </p>
  197. </dd>
  198. <dt><code>-msio</code></dt>
  199. <dd><a name="index-msio"></a>
  200. <p>Generate the predefine, <code>_SIO</code>, for server IO. The default is
  201. <samp>-mwsio</samp>. This generates the predefines, <code>__hp9000s700</code>,
  202. <code>__hp9000s700__</code> and <code>_WSIO</code>, for workstation IO. These
  203. options are available under HP-UX and HI-UX.
  204. </p>
  205. </dd>
  206. <dt><code>-mgnu-ld</code></dt>
  207. <dd><a name="index-mgnu_002dld"></a>
  208. <p>Use options specific to GNU <code>ld</code>.
  209. This passes <samp>-shared</samp> to <code>ld</code> when
  210. building a shared library. It is the default when GCC is configured,
  211. explicitly or implicitly, with the GNU linker. This option does not
  212. affect which <code>ld</code> is called; it only changes what parameters
  213. are passed to that <code>ld</code>.
  214. The <code>ld</code> that is called is determined by the
  215. <samp>--with-ld</samp> configure option, GCC&rsquo;s program search path, and
  216. finally by the user&rsquo;s <code>PATH</code>. The linker used by GCC can be printed
  217. using &lsquo;<samp>which `gcc -print-prog-name=ld`</samp>&rsquo;. This option is only available
  218. on the 64-bit HP-UX GCC, i.e. configured with &lsquo;<samp>hppa*64*-*-hpux*</samp>&rsquo;.
  219. </p>
  220. </dd>
  221. <dt><code>-mhp-ld</code></dt>
  222. <dd><a name="index-mhp_002dld"></a>
  223. <p>Use options specific to HP <code>ld</code>.
  224. This passes <samp>-b</samp> to <code>ld</code> when building
  225. a shared library and passes <samp>+Accept TypeMismatch</samp> to <code>ld</code> on all
  226. links. It is the default when GCC is configured, explicitly or
  227. implicitly, with the HP linker. This option does not affect
  228. which <code>ld</code> is called; it only changes what parameters are passed to that
  229. <code>ld</code>.
  230. The <code>ld</code> that is called is determined by the <samp>--with-ld</samp>
  231. configure option, GCC&rsquo;s program search path, and finally by the user&rsquo;s
  232. <code>PATH</code>. The linker used by GCC can be printed using &lsquo;<samp>which
  233. `gcc -print-prog-name=ld`</samp>&rsquo;. This option is only available on the 64-bit
  234. HP-UX GCC, i.e. configured with &lsquo;<samp>hppa*64*-*-hpux*</samp>&rsquo;.
  235. </p>
  236. </dd>
  237. <dt><code>-mlong-calls</code></dt>
  238. <dd><a name="index-mno_002dlong_002dcalls-2"></a>
  239. <p>Generate code that uses long call sequences. This ensures that a call
  240. is always able to reach linker generated stubs. The default is to generate
  241. long calls only when the distance from the call site to the beginning
  242. of the function or translation unit, as the case may be, exceeds a
  243. predefined limit set by the branch type being used. The limits for
  244. normal calls are 7,600,000 and 240,000 bytes, respectively for the
  245. PA 2.0 and PA 1.X architectures. Sibcalls are always limited at
  246. 240,000 bytes.
  247. </p>
  248. <p>Distances are measured from the beginning of functions when using the
  249. <samp>-ffunction-sections</samp> option, or when using the <samp>-mgas</samp>
  250. and <samp>-mno-portable-runtime</samp> options together under HP-UX with
  251. the SOM linker.
  252. </p>
  253. <p>It is normally not desirable to use this option as it degrades
  254. performance. However, it may be useful in large applications,
  255. particularly when partial linking is used to build the application.
  256. </p>
  257. <p>The types of long calls used depends on the capabilities of the
  258. assembler and linker, and the type of code being generated. The
  259. impact on systems that support long absolute calls, and long pic
  260. symbol-difference or pc-relative calls should be relatively small.
  261. However, an indirect call is used on 32-bit ELF systems in pic code
  262. and it is quite long.
  263. </p>
  264. </dd>
  265. <dt><code>-munix=<var>unix-std</var></code></dt>
  266. <dd><a name="index-march-5"></a>
  267. <p>Generate compiler predefines and select a startfile for the specified
  268. UNIX standard. The choices for <var>unix-std</var> are &lsquo;<samp>93</samp>&rsquo;, &lsquo;<samp>95</samp>&rsquo;
  269. and &lsquo;<samp>98</samp>&rsquo;. &lsquo;<samp>93</samp>&rsquo; is supported on all HP-UX versions. &lsquo;<samp>95</samp>&rsquo;
  270. is available on HP-UX 10.10 and later. &lsquo;<samp>98</samp>&rsquo; is available on HP-UX
  271. 11.11 and later. The default values are &lsquo;<samp>93</samp>&rsquo; for HP-UX 10.00,
  272. &lsquo;<samp>95</samp>&rsquo; for HP-UX 10.10 though to 11.00, and &lsquo;<samp>98</samp>&rsquo; for HP-UX 11.11
  273. and later.
  274. </p>
  275. <p><samp>-munix=93</samp> provides the same predefines as GCC 3.3 and 3.4.
  276. <samp>-munix=95</samp> provides additional predefines for <code>XOPEN_UNIX</code>
  277. and <code>_XOPEN_SOURCE_EXTENDED</code>, and the startfile <samp>unix95.o</samp>.
  278. <samp>-munix=98</samp> provides additional predefines for <code>_XOPEN_UNIX</code>,
  279. <code>_XOPEN_SOURCE_EXTENDED</code>, <code>_INCLUDE__STDC_A1_SOURCE</code> and
  280. <code>_INCLUDE_XOPEN_SOURCE_500</code>, and the startfile <samp>unix98.o</samp>.
  281. </p>
  282. <p>It is <em>important</em> to note that this option changes the interfaces
  283. for various library routines. It also affects the operational behavior
  284. of the C library. Thus, <em>extreme</em> care is needed in using this
  285. option.
  286. </p>
  287. <p>Library code that is intended to operate with more than one UNIX
  288. standard must test, set and restore the variable <code>__xpg4_extended_mask</code>
  289. as appropriate. Most GNU software doesn&rsquo;t provide this capability.
  290. </p>
  291. </dd>
  292. <dt><code>-nolibdld</code></dt>
  293. <dd><a name="index-nolibdld"></a>
  294. <p>Suppress the generation of link options to search libdld.sl when the
  295. <samp>-static</samp> option is specified on HP-UX 10 and later.
  296. </p>
  297. </dd>
  298. <dt><code>-static</code></dt>
  299. <dd><a name="index-static-2"></a>
  300. <p>The HP-UX implementation of setlocale in libc has a dependency on
  301. libdld.sl. There isn&rsquo;t an archive version of libdld.sl. Thus,
  302. when the <samp>-static</samp> option is specified, special link options
  303. are needed to resolve this dependency.
  304. </p>
  305. <p>On HP-UX 10 and later, the GCC driver adds the necessary options to
  306. link with libdld.sl when the <samp>-static</samp> option is specified.
  307. This causes the resulting binary to be dynamic. On the 64-bit port,
  308. the linkers generate dynamic binaries by default in any case. The
  309. <samp>-nolibdld</samp> option can be used to prevent the GCC driver from
  310. adding these link options.
  311. </p>
  312. </dd>
  313. <dt><code>-threads</code></dt>
  314. <dd><a name="index-threads"></a>
  315. <p>Add support for multithreading with the <em>dce thread</em> library
  316. under HP-UX. This option sets flags for both the preprocessor and
  317. linker.
  318. </p></dd>
  319. </dl>
  320. <hr>
  321. <div class="header">
  322. <p>
  323. Next: <a href="IA_002d64-Options.html#IA_002d64-Options" accesskey="n" rel="next">IA-64 Options</a>, Previous: <a href="H8_002f300-Options.html#H8_002f300-Options" accesskey="p" rel="prev">H8/300 Options</a>, Up: <a href="Submodel-Options.html#Submodel-Options" accesskey="u" rel="up">Submodel Options</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  324. </div>
  325. </body>
  326. </html>