1<html lang="en"> 2<head> 3<title>HPPA Options - Using the GNU Compiler Collection (GCC)</title> 4<meta http-equiv="Content-Type" content="text/html"> 5<meta name="description" content="Using the GNU Compiler Collection (GCC)"> 6<meta name="generator" content="makeinfo 4.13"> 7<link title="Top" rel="start" href="index.html#Top"> 8<link rel="up" href="Submodel-Options.html#Submodel-Options" title="Submodel Options"> 9<link rel="prev" href="H8_002f300-Options.html#H8_002f300-Options" title="H8/300 Options"> 10<link rel="next" href="i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options" title="i386 and x86-64 Options"> 11<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> 12<!-- 13Copyright (C) 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 141998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 152010 Free Software Foundation, Inc. 16 17Permission is granted to copy, distribute and/or modify this document 18under the terms of the GNU Free Documentation License, Version 1.3 or 19any later version published by the Free Software Foundation; with the 20Invariant Sections being ``Funding Free Software'', the Front-Cover 21Texts being (a) (see below), and with the Back-Cover Texts being (b) 22(see below). A copy of the license is included in the section entitled 23``GNU Free Documentation License''. 24 25(a) The FSF's Front-Cover Text is: 26 27 A GNU Manual 28 29(b) The FSF's Back-Cover Text is: 30 31 You have freedom to copy and modify this GNU Manual, like GNU 32 software. Copies published by the Free Software Foundation raise 33 funds for GNU development.--> 34<meta http-equiv="Content-Style-Type" content="text/css"> 35<style type="text/css"><!-- 36 pre.display { font-family:inherit } 37 pre.format { font-family:inherit } 38 pre.smalldisplay { font-family:inherit; font-size:smaller } 39 pre.smallformat { font-family:inherit; font-size:smaller } 40 pre.smallexample { font-size:smaller } 41 pre.smalllisp { font-size:smaller } 42 span.sc { font-variant:small-caps } 43 span.roman { font-family:serif; font-weight:normal; } 44 span.sansserif { font-family:sans-serif; font-weight:normal; } 45--></style> 46<link rel="stylesheet" type="text/css" href="../cs.css"> 47</head> 48<body> 49<div class="node"> 50<a name="HPPA-Options"></a> 51<p> 52Next: <a rel="next" accesskey="n" href="i386-and-x86_002d64-Options.html#i386-and-x86_002d64-Options">i386 and x86-64 Options</a>, 53Previous: <a rel="previous" accesskey="p" href="H8_002f300-Options.html#H8_002f300-Options">H8/300 Options</a>, 54Up: <a rel="up" accesskey="u" href="Submodel-Options.html#Submodel-Options">Submodel Options</a> 55<hr> 56</div> 57 58<h4 class="subsection">3.17.14 HPPA Options</h4> 59 60<p><a name="index-HPPA-Options-1306"></a> 61These ‘<samp><span class="samp">-m</span></samp>’ options are defined for the HPPA family of computers: 62 63 <dl> 64<dt><code>-march=</code><var>architecture-type</var><dd><a name="index-march-1307"></a>Generate code for the specified architecture. The choices for 65<var>architecture-type</var> are ‘<samp><span class="samp">1.0</span></samp>’ for PA 1.0, ‘<samp><span class="samp">1.1</span></samp>’ for PA 661.1, and ‘<samp><span class="samp">2.0</span></samp>’ for PA 2.0 processors. Refer to 67<samp><span class="file">/usr/lib/sched.models</span></samp> on an HP-UX system to determine the proper 68architecture option for your machine. Code compiled for lower numbered 69architectures will run on higher numbered architectures, but not the 70other way around. 71 72 <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-1308"></a><a name="index-mpa_002drisc_002d1_002d1-1309"></a><a name="index-mpa_002drisc_002d2_002d0-1310"></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. 73 74 <br><dt><code>-mbig-switch</code><dd><a name="index-mbig_002dswitch-1311"></a>Generate code suitable for big switch tables. Use this option only if 75the assembler/linker complain about out of range branches within a switch 76table. 77 78 <br><dt><code>-mjump-in-delay</code><dd><a name="index-mjump_002din_002ddelay-1312"></a>Fill delay slots of function calls with unconditional jump instructions 79by modifying the return pointer for the function call to be the target 80of the conditional jump. 81 82 <br><dt><code>-mdisable-fpregs</code><dd><a name="index-mdisable_002dfpregs-1313"></a>Prevent floating point registers from being used in any manner. This is 83necessary for compiling kernels which perform lazy context switching of 84floating point registers. If you use this option and attempt to perform 85floating point operations, the compiler will abort. 86 87 <br><dt><code>-mdisable-indexing</code><dd><a name="index-mdisable_002dindexing-1314"></a>Prevent the compiler from using indexing address modes. This avoids some 88rather obscure problems when compiling MIG generated code under MACH. 89 90 <br><dt><code>-mno-space-regs</code><dd><a name="index-mno_002dspace_002dregs-1315"></a>Generate code that assumes the target has no space registers. This allows 91GCC to generate faster indirect calls and use unscaled index address modes. 92 93 <p>Such code is suitable for level 0 PA systems and kernels. 94 95 <br><dt><code>-mfast-indirect-calls</code><dd><a name="index-mfast_002dindirect_002dcalls-1316"></a>Generate code that assumes calls never cross space boundaries. This 96allows GCC to emit code which performs faster indirect calls. 97 98 <p>This option will not work in the presence of shared libraries or nested 99functions. 100 101 <br><dt><code>-mfixed-range=</code><var>register-range</var><dd><a name="index-mfixed_002drange-1317"></a>Generate code treating the given register range as fixed registers. 102A fixed register is one that the register allocator can not use. This is 103useful when compiling kernel code. A register range is specified as 104two registers separated by a dash. Multiple register ranges can be 105specified separated by a comma. 106 107 <br><dt><code>-mlong-load-store</code><dd><a name="index-mlong_002dload_002dstore-1318"></a>Generate 3-instruction load and store sequences as sometimes required by 108the HP-UX 10 linker. This is equivalent to the ‘<samp><span class="samp">+k</span></samp>’ option to 109the HP compilers. 110 111 <br><dt><code>-mportable-runtime</code><dd><a name="index-mportable_002druntime-1319"></a>Use the portable calling conventions proposed by HP for ELF systems. 112 113 <br><dt><code>-mgas</code><dd><a name="index-mgas-1320"></a>Enable the use of assembler directives only GAS understands. 114 115 <br><dt><code>-mschedule=</code><var>cpu-type</var><dd><a name="index-mschedule-1321"></a>Schedule code according to the constraints for the machine type 116<var>cpu-type</var>. The choices for <var>cpu-type</var> are ‘<samp><span class="samp">700</span></samp>’ 117‘<samp><span class="samp">7100</span></samp>’, ‘<samp><span class="samp">7100LC</span></samp>’, ‘<samp><span class="samp">7200</span></samp>’, ‘<samp><span class="samp">7300</span></samp>’ and ‘<samp><span class="samp">8000</span></samp>’. Refer 118to <samp><span class="file">/usr/lib/sched.models</span></samp> on an HP-UX system to determine the 119proper scheduling option for your machine. The default scheduling is 120‘<samp><span class="samp">8000</span></samp>’. 121 122 <br><dt><code>-mlinker-opt</code><dd><a name="index-mlinker_002dopt-1322"></a>Enable the optimization pass in the HP-UX linker. Note this makes symbolic 123debugging impossible. It also triggers a bug in the HP-UX 8 and HP-UX 9 124linkers in which they give bogus error messages when linking some programs. 125 126 <br><dt><code>-msoft-float</code><dd><a name="index-msoft_002dfloat-1323"></a>Generate output containing library calls for floating point. 127<strong>Warning:</strong> the requisite libraries are not available for all HPPA 128targets. Normally the facilities of the machine's usual C compiler are 129used, but this cannot be done directly in cross-compilation. You must make 130your own arrangements to provide suitable library functions for 131cross-compilation. 132 133 <p><samp><span class="option">-msoft-float</span></samp> changes the calling convention in the output file; 134therefore, it is only useful if you compile <em>all</em> of a program with 135this option. In particular, you need to compile <samp><span class="file">libgcc.a</span></samp>, the 136library that comes with GCC, with <samp><span class="option">-msoft-float</span></samp> in order for 137this to work. 138 139 <br><dt><code>-msio</code><dd><a name="index-msio-1324"></a>Generate the predefine, <code>_SIO</code>, for server IO. The default is 140<samp><span class="option">-mwsio</span></samp>. This generates the predefines, <code>__hp9000s700</code>, 141<code>__hp9000s700__</code> and <code>_WSIO</code>, for workstation IO. These 142options are available under HP-UX and HI-UX. 143 144 <br><dt><code>-mgnu-ld</code><dd><a name="index-mgnu_002dld-1325"></a>Use GNU ld specific options. This passes <samp><span class="option">-shared</span></samp> to ld when 145building a shared library. It is the default when GCC is configured, 146explicitly or implicitly, with the GNU linker. This option does not 147have any affect on which ld is called, it only changes what parameters 148are passed to that ld. The ld that is called is determined by the 149<samp><span class="option">--with-ld</span></samp> configure option, GCC's program search path, and 150finally by the user's <samp><span class="env">PATH</span></samp>. The linker used by GCC can be printed 151using ‘<samp><span class="samp">which `gcc -print-prog-name=ld`</span></samp>’. This option is only available 152on the 64 bit HP-UX GCC, i.e. configured with ‘<samp><span class="samp">hppa*64*-*-hpux*</span></samp>’. 153 154 <br><dt><code>-mhp-ld</code><dd><a name="index-mhp_002dld-1326"></a>Use HP ld specific options. This passes <samp><span class="option">-b</span></samp> to ld when building 155a shared library and passes <samp><span class="option">+Accept TypeMismatch</span></samp> to ld on all 156links. It is the default when GCC is configured, explicitly or 157implicitly, with the HP linker. This option does not have any affect on 158which ld is called, it only changes what parameters are passed to that 159ld. The ld that is called is determined by the <samp><span class="option">--with-ld</span></samp> 160configure option, GCC's program search path, and finally by the user's 161<samp><span class="env">PATH</span></samp>. The linker used by GCC can be printed using ‘<samp><span class="samp">which 162`gcc -print-prog-name=ld`</span></samp>’. This option is only available on the 64 bit 163HP-UX GCC, i.e. configured with ‘<samp><span class="samp">hppa*64*-*-hpux*</span></samp>’. 164 165 <br><dt><code>-mlong-calls</code><dd><a name="index-mno_002dlong_002dcalls-1327"></a>Generate code that uses long call sequences. This ensures that a call 166is always able to reach linker generated stubs. The default is to generate 167long calls only when the distance from the call site to the beginning 168of the function or translation unit, as the case may be, exceeds a 169predefined limit set by the branch type being used. The limits for 170normal calls are 7,600,000 and 240,000 bytes, respectively for the 171PA 2.0 and PA 1.X architectures. Sibcalls are always limited at 172240,000 bytes. 173 174 <p>Distances are measured from the beginning of functions when using the 175<samp><span class="option">-ffunction-sections</span></samp> option, or when using the <samp><span class="option">-mgas</span></samp> 176and <samp><span class="option">-mno-portable-runtime</span></samp> options together under HP-UX with 177the SOM linker. 178 179 <p>It is normally not desirable to use this option as it will degrade 180performance. However, it may be useful in large applications, 181particularly when partial linking is used to build the application. 182 183 <p>The types of long calls used depends on the capabilities of the 184assembler and linker, and the type of code being generated. The 185impact on systems that support long absolute calls, and long pic 186symbol-difference or pc-relative calls should be relatively small. 187However, an indirect call is used on 32-bit ELF systems in pic code 188and it is quite long. 189 190 <br><dt><code>-munix=</code><var>unix-std</var><dd><a name="index-march-1328"></a>Generate compiler predefines and select a startfile for the specified 191UNIX standard. The choices for <var>unix-std</var> are ‘<samp><span class="samp">93</span></samp>’, ‘<samp><span class="samp">95</span></samp>’ 192and ‘<samp><span class="samp">98</span></samp>’. ‘<samp><span class="samp">93</span></samp>’ is supported on all HP-UX versions. ‘<samp><span class="samp">95</span></samp>’ 193is available on HP-UX 10.10 and later. ‘<samp><span class="samp">98</span></samp>’ is available on HP-UX 19411.11 and later. The default values are ‘<samp><span class="samp">93</span></samp>’ for HP-UX 10.00, 195‘<samp><span class="samp">95</span></samp>’ for HP-UX 10.10 though to 11.00, and ‘<samp><span class="samp">98</span></samp>’ for HP-UX 11.11 196and later. 197 198 <p><samp><span class="option">-munix=93</span></samp> provides the same predefines as GCC 3.3 and 3.4. 199<samp><span class="option">-munix=95</span></samp> provides additional predefines for <code>XOPEN_UNIX</code> 200and <code>_XOPEN_SOURCE_EXTENDED</code>, and the startfile <samp><span class="file">unix95.o</span></samp>. 201<samp><span class="option">-munix=98</span></samp> provides additional predefines for <code>_XOPEN_UNIX</code>, 202<code>_XOPEN_SOURCE_EXTENDED</code>, <code>_INCLUDE__STDC_A1_SOURCE</code> and 203<code>_INCLUDE_XOPEN_SOURCE_500</code>, and the startfile <samp><span class="file">unix98.o</span></samp>. 204 205 <p>It is <em>important</em> to note that this option changes the interfaces 206for various library routines. It also affects the operational behavior 207of the C library. Thus, <em>extreme</em> care is needed in using this 208option. 209 210 <p>Library code that is intended to operate with more than one UNIX 211standard must test, set and restore the variable <var>__xpg4_extended_mask</var> 212as appropriate. Most GNU software doesn't provide this capability. 213 214 <br><dt><code>-nolibdld</code><dd><a name="index-nolibdld-1329"></a>Suppress the generation of link options to search libdld.sl when the 215<samp><span class="option">-static</span></samp> option is specified on HP-UX 10 and later. 216 217 <br><dt><code>-static</code><dd><a name="index-static-1330"></a>The HP-UX implementation of setlocale in libc has a dependency on 218libdld.sl. There isn't an archive version of libdld.sl. Thus, 219when the <samp><span class="option">-static</span></samp> option is specified, special link options 220are needed to resolve this dependency. 221 222 <p>On HP-UX 10 and later, the GCC driver adds the necessary options to 223link with libdld.sl when the <samp><span class="option">-static</span></samp> option is specified. 224This causes the resulting binary to be dynamic. On the 64-bit port, 225the linkers generate dynamic binaries by default in any case. The 226<samp><span class="option">-nolibdld</span></samp> option can be used to prevent the GCC driver from 227adding these link options. 228 229 <br><dt><code>-threads</code><dd><a name="index-threads-1331"></a>Add support for multithreading with the <dfn>dce thread</dfn> library 230under HP-UX. This option sets flags for both the preprocessor and 231linker. 232</dl> 233 234 </body></html> 235 236