Nios-II-Options.html 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  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): Nios II Options</title>
  20. <meta name="description" content="Using the GNU Compiler Collection (GCC): Nios II Options">
  21. <meta name="keywords" content="Using the GNU Compiler Collection (GCC): Nios II 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="Nvidia-PTX-Options.html#Nvidia-PTX-Options" rel="next" title="Nvidia PTX Options">
  31. <link href="NDS32-Options.html#NDS32-Options" rel="prev" title="NDS32 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="Nios-II-Options"></a>
  63. <div class="header">
  64. <p>
  65. Next: <a href="Nvidia-PTX-Options.html#Nvidia-PTX-Options" accesskey="n" rel="next">Nvidia PTX Options</a>, Previous: <a href="NDS32-Options.html#NDS32-Options" accesskey="p" rel="prev">NDS32 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="Nios-II-Options-1"></a>
  69. <h4 class="subsection">3.18.32 Nios II Options</h4>
  70. <a name="index-Nios-II-options"></a>
  71. <a name="index-Altera-Nios-II-options"></a>
  72. <p>These are the options defined for the Altera Nios II processor.
  73. </p>
  74. <dl compact="compact">
  75. <dt><code>-G <var>num</var></code></dt>
  76. <dd><a name="index-G-2"></a>
  77. <a name="index-smaller-data-references-1"></a>
  78. <p>Put global and static objects less than or equal to <var>num</var> bytes
  79. into the small data or BSS sections instead of the normal data or BSS
  80. sections. The default value of <var>num</var> is 8.
  81. </p>
  82. </dd>
  83. <dt><code>-mgpopt=<var>option</var></code></dt>
  84. <dt><code>-mgpopt</code></dt>
  85. <dt><code>-mno-gpopt</code></dt>
  86. <dd><a name="index-mgpopt-1"></a>
  87. <a name="index-mno_002dgpopt-1"></a>
  88. <p>Generate (do not generate) GP-relative accesses. The following
  89. <var>option</var> names are recognized:
  90. </p>
  91. <dl compact="compact">
  92. <dt>&lsquo;<samp>none</samp>&rsquo;</dt>
  93. <dd><p>Do not generate GP-relative accesses.
  94. </p>
  95. </dd>
  96. <dt>&lsquo;<samp>local</samp>&rsquo;</dt>
  97. <dd><p>Generate GP-relative accesses for small data objects that are not
  98. external, weak, or uninitialized common symbols.
  99. Also use GP-relative addressing for objects that
  100. have been explicitly placed in a small data section via a <code>section</code>
  101. attribute.
  102. </p>
  103. </dd>
  104. <dt>&lsquo;<samp>global</samp>&rsquo;</dt>
  105. <dd><p>As for &lsquo;<samp>local</samp>&rsquo;, but also generate GP-relative accesses for
  106. small data objects that are external, weak, or common. If you use this option,
  107. you must ensure that all parts of your program (including libraries) are
  108. compiled with the same <samp>-G</samp> setting.
  109. </p>
  110. </dd>
  111. <dt>&lsquo;<samp>data</samp>&rsquo;</dt>
  112. <dd><p>Generate GP-relative accesses for all data objects in the program. If you
  113. use this option, the entire data and BSS segments
  114. of your program must fit in 64K of memory and you must use an appropriate
  115. linker script to allocate them within the addressable range of the
  116. global pointer.
  117. </p>
  118. </dd>
  119. <dt>&lsquo;<samp>all</samp>&rsquo;</dt>
  120. <dd><p>Generate GP-relative addresses for function pointers as well as data
  121. pointers. If you use this option, the entire text, data, and BSS segments
  122. of your program must fit in 64K of memory and you must use an appropriate
  123. linker script to allocate them within the addressable range of the
  124. global pointer.
  125. </p>
  126. </dd>
  127. </dl>
  128. <p><samp>-mgpopt</samp> is equivalent to <samp>-mgpopt=local</samp>, and
  129. <samp>-mno-gpopt</samp> is equivalent to <samp>-mgpopt=none</samp>.
  130. </p>
  131. <p>The default is <samp>-mgpopt</samp> except when <samp>-fpic</samp> or
  132. <samp>-fPIC</samp> is specified to generate position-independent code.
  133. Note that the Nios II ABI does not permit GP-relative accesses from
  134. shared libraries.
  135. </p>
  136. <p>You may need to specify <samp>-mno-gpopt</samp> explicitly when building
  137. programs that include large amounts of small data, including large
  138. GOT data sections. In this case, the 16-bit offset for GP-relative
  139. addressing may not be large enough to allow access to the entire
  140. small data section.
  141. </p>
  142. </dd>
  143. <dt><code>-mel</code></dt>
  144. <dt><code>-meb</code></dt>
  145. <dd><a name="index-mel-2"></a>
  146. <a name="index-meb-2"></a>
  147. <p>Generate little-endian (default) or big-endian (experimental) code,
  148. respectively.
  149. </p>
  150. </dd>
  151. <dt><code>-march=<var>arch</var></code></dt>
  152. <dd><a name="index-march-9"></a>
  153. <p>This specifies the name of the target Nios II architecture. GCC uses this
  154. name to determine what kind of instructions it can emit when generating
  155. assembly code. Permissible names are: &lsquo;<samp>r1</samp>&rsquo;, &lsquo;<samp>r2</samp>&rsquo;.
  156. </p>
  157. <p>The preprocessor macro <code>__nios2_arch__</code> is available to programs,
  158. with value 1 or 2, indicating the targeted ISA level.
  159. </p>
  160. </dd>
  161. <dt><code>-mbypass-cache</code></dt>
  162. <dt><code>-mno-bypass-cache</code></dt>
  163. <dd><a name="index-mno_002dbypass_002dcache"></a>
  164. <a name="index-mbypass_002dcache"></a>
  165. <p>Force all load and store instructions to always bypass cache by
  166. using I/O variants of the instructions. The default is not to
  167. bypass the cache.
  168. </p>
  169. </dd>
  170. <dt><code>-mno-cache-volatile</code></dt>
  171. <dt><code>-mcache-volatile</code></dt>
  172. <dd><a name="index-mcache_002dvolatile"></a>
  173. <a name="index-mno_002dcache_002dvolatile"></a>
  174. <p>Volatile memory access bypass the cache using the I/O variants of
  175. the load and store instructions. The default is not to bypass the cache.
  176. </p>
  177. </dd>
  178. <dt><code>-mno-fast-sw-div</code></dt>
  179. <dt><code>-mfast-sw-div</code></dt>
  180. <dd><a name="index-mno_002dfast_002dsw_002ddiv"></a>
  181. <a name="index-mfast_002dsw_002ddiv"></a>
  182. <p>Do not use table-based fast divide for small numbers. The default
  183. is to use the fast divide at <samp>-O3</samp> and above.
  184. </p>
  185. </dd>
  186. <dt><code>-mno-hw-mul</code></dt>
  187. <dt><code>-mhw-mul</code></dt>
  188. <dt><code>-mno-hw-mulx</code></dt>
  189. <dt><code>-mhw-mulx</code></dt>
  190. <dt><code>-mno-hw-div</code></dt>
  191. <dt><code>-mhw-div</code></dt>
  192. <dd><a name="index-mno_002dhw_002dmul"></a>
  193. <a name="index-mhw_002dmul"></a>
  194. <a name="index-mno_002dhw_002dmulx"></a>
  195. <a name="index-mhw_002dmulx"></a>
  196. <a name="index-mno_002dhw_002ddiv"></a>
  197. <a name="index-mhw_002ddiv"></a>
  198. <p>Enable or disable emitting <code>mul</code>, <code>mulx</code> and <code>div</code> family of
  199. instructions by the compiler. The default is to emit <code>mul</code>
  200. and not emit <code>div</code> and <code>mulx</code>.
  201. </p>
  202. </dd>
  203. <dt><code>-mbmx</code></dt>
  204. <dt><code>-mno-bmx</code></dt>
  205. <dt><code>-mcdx</code></dt>
  206. <dt><code>-mno-cdx</code></dt>
  207. <dd><p>Enable or disable generation of Nios II R2 BMX (bit manipulation) and
  208. CDX (code density) instructions. Enabling these instructions also
  209. requires <samp>-march=r2</samp>. Since these instructions are optional
  210. extensions to the R2 architecture, the default is not to emit them.
  211. </p>
  212. </dd>
  213. <dt><code>-mcustom-<var>insn</var>=<var>N</var></code></dt>
  214. <dt><code>-mno-custom-<var>insn</var></code></dt>
  215. <dd><a name="index-mcustom_002dinsn"></a>
  216. <a name="index-mno_002dcustom_002dinsn"></a>
  217. <p>Each <samp>-mcustom-<var>insn</var>=<var>N</var></samp> option enables use of a
  218. custom instruction with encoding <var>N</var> when generating code that uses
  219. <var>insn</var>. For example, <samp>-mcustom-fadds=253</samp> generates custom
  220. instruction 253 for single-precision floating-point add operations instead
  221. of the default behavior of using a library call.
  222. </p>
  223. <p>The following values of <var>insn</var> are supported. Except as otherwise
  224. noted, floating-point operations are expected to be implemented with
  225. normal IEEE 754 semantics and correspond directly to the C operators or the
  226. equivalent GCC built-in functions (see <a href="Other-Builtins.html#Other-Builtins">Other Builtins</a>).
  227. </p>
  228. <p>Single-precision floating point:
  229. </p><dl compact="compact">
  230. <dt>&lsquo;<samp>fadds</samp>&rsquo;, &lsquo;<samp>fsubs</samp>&rsquo;, &lsquo;<samp>fdivs</samp>&rsquo;, &lsquo;<samp>fmuls</samp>&rsquo;</dt>
  231. <dd><p>Binary arithmetic operations.
  232. </p>
  233. </dd>
  234. <dt>&lsquo;<samp>fnegs</samp>&rsquo;</dt>
  235. <dd><p>Unary negation.
  236. </p>
  237. </dd>
  238. <dt>&lsquo;<samp>fabss</samp>&rsquo;</dt>
  239. <dd><p>Unary absolute value.
  240. </p>
  241. </dd>
  242. <dt>&lsquo;<samp>fcmpeqs</samp>&rsquo;, &lsquo;<samp>fcmpges</samp>&rsquo;, &lsquo;<samp>fcmpgts</samp>&rsquo;, &lsquo;<samp>fcmples</samp>&rsquo;, &lsquo;<samp>fcmplts</samp>&rsquo;, &lsquo;<samp>fcmpnes</samp>&rsquo;</dt>
  243. <dd><p>Comparison operations.
  244. </p>
  245. </dd>
  246. <dt>&lsquo;<samp>fmins</samp>&rsquo;, &lsquo;<samp>fmaxs</samp>&rsquo;</dt>
  247. <dd><p>Floating-point minimum and maximum. These instructions are only
  248. generated if <samp>-ffinite-math-only</samp> is specified.
  249. </p>
  250. </dd>
  251. <dt>&lsquo;<samp>fsqrts</samp>&rsquo;</dt>
  252. <dd><p>Unary square root operation.
  253. </p>
  254. </dd>
  255. <dt>&lsquo;<samp>fcoss</samp>&rsquo;, &lsquo;<samp>fsins</samp>&rsquo;, &lsquo;<samp>ftans</samp>&rsquo;, &lsquo;<samp>fatans</samp>&rsquo;, &lsquo;<samp>fexps</samp>&rsquo;, &lsquo;<samp>flogs</samp>&rsquo;</dt>
  256. <dd><p>Floating-point trigonometric and exponential functions. These instructions
  257. are only generated if <samp>-funsafe-math-optimizations</samp> is also specified.
  258. </p>
  259. </dd>
  260. </dl>
  261. <p>Double-precision floating point:
  262. </p><dl compact="compact">
  263. <dt>&lsquo;<samp>faddd</samp>&rsquo;, &lsquo;<samp>fsubd</samp>&rsquo;, &lsquo;<samp>fdivd</samp>&rsquo;, &lsquo;<samp>fmuld</samp>&rsquo;</dt>
  264. <dd><p>Binary arithmetic operations.
  265. </p>
  266. </dd>
  267. <dt>&lsquo;<samp>fnegd</samp>&rsquo;</dt>
  268. <dd><p>Unary negation.
  269. </p>
  270. </dd>
  271. <dt>&lsquo;<samp>fabsd</samp>&rsquo;</dt>
  272. <dd><p>Unary absolute value.
  273. </p>
  274. </dd>
  275. <dt>&lsquo;<samp>fcmpeqd</samp>&rsquo;, &lsquo;<samp>fcmpged</samp>&rsquo;, &lsquo;<samp>fcmpgtd</samp>&rsquo;, &lsquo;<samp>fcmpled</samp>&rsquo;, &lsquo;<samp>fcmpltd</samp>&rsquo;, &lsquo;<samp>fcmpned</samp>&rsquo;</dt>
  276. <dd><p>Comparison operations.
  277. </p>
  278. </dd>
  279. <dt>&lsquo;<samp>fmind</samp>&rsquo;, &lsquo;<samp>fmaxd</samp>&rsquo;</dt>
  280. <dd><p>Double-precision minimum and maximum. These instructions are only
  281. generated if <samp>-ffinite-math-only</samp> is specified.
  282. </p>
  283. </dd>
  284. <dt>&lsquo;<samp>fsqrtd</samp>&rsquo;</dt>
  285. <dd><p>Unary square root operation.
  286. </p>
  287. </dd>
  288. <dt>&lsquo;<samp>fcosd</samp>&rsquo;, &lsquo;<samp>fsind</samp>&rsquo;, &lsquo;<samp>ftand</samp>&rsquo;, &lsquo;<samp>fatand</samp>&rsquo;, &lsquo;<samp>fexpd</samp>&rsquo;, &lsquo;<samp>flogd</samp>&rsquo;</dt>
  289. <dd><p>Double-precision trigonometric and exponential functions. These instructions
  290. are only generated if <samp>-funsafe-math-optimizations</samp> is also specified.
  291. </p>
  292. </dd>
  293. </dl>
  294. <p>Conversions:
  295. </p><dl compact="compact">
  296. <dt>&lsquo;<samp>fextsd</samp>&rsquo;</dt>
  297. <dd><p>Conversion from single precision to double precision.
  298. </p>
  299. </dd>
  300. <dt>&lsquo;<samp>ftruncds</samp>&rsquo;</dt>
  301. <dd><p>Conversion from double precision to single precision.
  302. </p>
  303. </dd>
  304. <dt>&lsquo;<samp>fixsi</samp>&rsquo;, &lsquo;<samp>fixsu</samp>&rsquo;, &lsquo;<samp>fixdi</samp>&rsquo;, &lsquo;<samp>fixdu</samp>&rsquo;</dt>
  305. <dd><p>Conversion from floating point to signed or unsigned integer types, with
  306. truncation towards zero.
  307. </p>
  308. </dd>
  309. <dt>&lsquo;<samp>round</samp>&rsquo;</dt>
  310. <dd><p>Conversion from single-precision floating point to signed integer,
  311. rounding to the nearest integer and ties away from zero.
  312. This corresponds to the <code>__builtin_lroundf</code> function when
  313. <samp>-fno-math-errno</samp> is used.
  314. </p>
  315. </dd>
  316. <dt>&lsquo;<samp>floatis</samp>&rsquo;, &lsquo;<samp>floatus</samp>&rsquo;, &lsquo;<samp>floatid</samp>&rsquo;, &lsquo;<samp>floatud</samp>&rsquo;</dt>
  317. <dd><p>Conversion from signed or unsigned integer types to floating-point types.
  318. </p>
  319. </dd>
  320. </dl>
  321. <p>In addition, all of the following transfer instructions for internal
  322. registers X and Y must be provided to use any of the double-precision
  323. floating-point instructions. Custom instructions taking two
  324. double-precision source operands expect the first operand in the
  325. 64-bit register X. The other operand (or only operand of a unary
  326. operation) is given to the custom arithmetic instruction with the
  327. least significant half in source register <var>src1</var> and the most
  328. significant half in <var>src2</var>. A custom instruction that returns a
  329. double-precision result returns the most significant 32 bits in the
  330. destination register and the other half in 32-bit register Y.
  331. GCC automatically generates the necessary code sequences to write
  332. register X and/or read register Y when double-precision floating-point
  333. instructions are used.
  334. </p>
  335. <dl compact="compact">
  336. <dt>&lsquo;<samp>fwrx</samp>&rsquo;</dt>
  337. <dd><p>Write <var>src1</var> into the least significant half of X and <var>src2</var> into
  338. the most significant half of X.
  339. </p>
  340. </dd>
  341. <dt>&lsquo;<samp>fwry</samp>&rsquo;</dt>
  342. <dd><p>Write <var>src1</var> into Y.
  343. </p>
  344. </dd>
  345. <dt>&lsquo;<samp>frdxhi</samp>&rsquo;, &lsquo;<samp>frdxlo</samp>&rsquo;</dt>
  346. <dd><p>Read the most or least (respectively) significant half of X and store it in
  347. <var>dest</var>.
  348. </p>
  349. </dd>
  350. <dt>&lsquo;<samp>frdy</samp>&rsquo;</dt>
  351. <dd><p>Read the value of Y and store it into <var>dest</var>.
  352. </p></dd>
  353. </dl>
  354. <p>Note that you can gain more local control over generation of Nios II custom
  355. instructions by using the <code>target(&quot;custom-<var>insn</var>=<var>N</var>&quot;)</code>
  356. and <code>target(&quot;no-custom-<var>insn</var>&quot;)</code> function attributes
  357. (see <a href="Function-Attributes.html#Function-Attributes">Function Attributes</a>)
  358. or pragmas (see <a href="Function-Specific-Option-Pragmas.html#Function-Specific-Option-Pragmas">Function Specific Option Pragmas</a>).
  359. </p>
  360. </dd>
  361. <dt><code>-mcustom-fpu-cfg=<var>name</var></code></dt>
  362. <dd><a name="index-mcustom_002dfpu_002dcfg"></a>
  363. <p>This option enables a predefined, named set of custom instruction encodings
  364. (see <samp>-mcustom-<var>insn</var></samp> above).
  365. Currently, the following sets are defined:
  366. </p>
  367. <p><samp>-mcustom-fpu-cfg=60-1</samp> is equivalent to:
  368. </p><div class="smallexample">
  369. <pre class="smallexample">-mcustom-fmuls=252
  370. -mcustom-fadds=253
  371. -mcustom-fsubs=254
  372. -fsingle-precision-constant
  373. </pre></div>
  374. <p><samp>-mcustom-fpu-cfg=60-2</samp> is equivalent to:
  375. </p><div class="smallexample">
  376. <pre class="smallexample">-mcustom-fmuls=252
  377. -mcustom-fadds=253
  378. -mcustom-fsubs=254
  379. -mcustom-fdivs=255
  380. -fsingle-precision-constant
  381. </pre></div>
  382. <p><samp>-mcustom-fpu-cfg=72-3</samp> is equivalent to:
  383. </p><div class="smallexample">
  384. <pre class="smallexample">-mcustom-floatus=243
  385. -mcustom-fixsi=244
  386. -mcustom-floatis=245
  387. -mcustom-fcmpgts=246
  388. -mcustom-fcmples=249
  389. -mcustom-fcmpeqs=250
  390. -mcustom-fcmpnes=251
  391. -mcustom-fmuls=252
  392. -mcustom-fadds=253
  393. -mcustom-fsubs=254
  394. -mcustom-fdivs=255
  395. -fsingle-precision-constant
  396. </pre></div>
  397. <p>Custom instruction assignments given by individual
  398. <samp>-mcustom-<var>insn</var>=</samp> options override those given by
  399. <samp>-mcustom-fpu-cfg=</samp>, regardless of the
  400. order of the options on the command line.
  401. </p>
  402. <p>Note that you can gain more local control over selection of a FPU
  403. configuration by using the <code>target(&quot;custom-fpu-cfg=<var>name</var>&quot;)</code>
  404. function attribute (see <a href="Function-Attributes.html#Function-Attributes">Function Attributes</a>)
  405. or pragma (see <a href="Function-Specific-Option-Pragmas.html#Function-Specific-Option-Pragmas">Function Specific Option Pragmas</a>).
  406. </p>
  407. </dd>
  408. </dl>
  409. <p>These additional &lsquo;<samp>-m</samp>&rsquo; options are available for the Altera Nios II
  410. ELF (bare-metal) target:
  411. </p>
  412. <dl compact="compact">
  413. <dt><code>-mhal</code></dt>
  414. <dd><a name="index-mhal"></a>
  415. <p>Link with HAL BSP. This suppresses linking with the GCC-provided C runtime
  416. startup and termination code, and is typically used in conjunction with
  417. <samp>-msys-crt0=</samp> to specify the location of the alternate startup code
  418. provided by the HAL BSP.
  419. </p>
  420. </dd>
  421. <dt><code>-msmallc</code></dt>
  422. <dd><a name="index-msmallc"></a>
  423. <p>Link with a limited version of the C library, <samp>-lsmallc</samp>, rather than
  424. Newlib.
  425. </p>
  426. </dd>
  427. <dt><code>-msys-crt0=<var>startfile</var></code></dt>
  428. <dd><a name="index-msys_002dcrt0"></a>
  429. <p><var>startfile</var> is the file name of the startfile (crt0) to use
  430. when linking. This option is only useful in conjunction with <samp>-mhal</samp>.
  431. </p>
  432. </dd>
  433. <dt><code>-msys-lib=<var>systemlib</var></code></dt>
  434. <dd><a name="index-msys_002dlib"></a>
  435. <p><var>systemlib</var> is the library name of the library that provides
  436. low-level system calls required by the C library,
  437. e.g. <code>read</code> and <code>write</code>.
  438. This option is typically used to link with a library provided by a HAL BSP.
  439. </p>
  440. </dd>
  441. </dl>
  442. <hr>
  443. <div class="header">
  444. <p>
  445. Next: <a href="Nvidia-PTX-Options.html#Nvidia-PTX-Options" accesskey="n" rel="next">Nvidia PTX Options</a>, Previous: <a href="NDS32-Options.html#NDS32-Options" accesskey="p" rel="prev">NDS32 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>
  446. </div>
  447. </body>
  448. </html>