Configure-Options.html 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  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-2020 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 "Free Software" and "Free Software Needs
  8. Free Documentation", with the Front-Cover Texts being "A GNU Manual,"
  9. and with the Back-Cover Texts as in (a) below.
  10. (a) The FSF's Back-Cover Text is: "You are free to copy and modify
  11. this GNU Manual. Buying copies from GNU Press supports the FSF in
  12. developing GNU and promoting software freedom." -->
  13. <!-- Created by GNU Texinfo 5.1, http://www.gnu.org/software/texinfo/ -->
  14. <head>
  15. <title>Debugging with GDB: Configure Options</title>
  16. <meta name="description" content="Debugging with GDB: Configure Options">
  17. <meta name="keywords" content="Debugging with GDB: Configure Options">
  18. <meta name="resource-type" content="document">
  19. <meta name="distribution" content="global">
  20. <meta name="Generator" content="makeinfo">
  21. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  22. <link href="index.html#Top" rel="start" title="Top">
  23. <link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
  24. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  25. <link href="Installing-GDB.html#Installing-GDB" rel="up" title="Installing GDB">
  26. <link href="System_002dwide-configuration.html#System_002dwide-configuration" rel="next" title="System-wide configuration">
  27. <link href="Config-Names.html#Config-Names" rel="previous" title="Config Names">
  28. <style type="text/css">
  29. <!--
  30. a.summary-letter {text-decoration: none}
  31. blockquote.smallquotation {font-size: smaller}
  32. div.display {margin-left: 3.2em}
  33. div.example {margin-left: 3.2em}
  34. div.indentedblock {margin-left: 3.2em}
  35. div.lisp {margin-left: 3.2em}
  36. div.smalldisplay {margin-left: 3.2em}
  37. div.smallexample {margin-left: 3.2em}
  38. div.smallindentedblock {margin-left: 3.2em; font-size: smaller}
  39. div.smalllisp {margin-left: 3.2em}
  40. kbd {font-style:oblique}
  41. pre.display {font-family: inherit}
  42. pre.format {font-family: inherit}
  43. pre.menu-comment {font-family: serif}
  44. pre.menu-preformatted {font-family: serif}
  45. pre.smalldisplay {font-family: inherit; font-size: smaller}
  46. pre.smallexample {font-size: smaller}
  47. pre.smallformat {font-family: inherit; font-size: smaller}
  48. pre.smalllisp {font-size: smaller}
  49. span.nocodebreak {white-space:nowrap}
  50. span.nolinebreak {white-space:nowrap}
  51. span.roman {font-family:serif; font-weight:normal}
  52. span.sansserif {font-family:sans-serif; font-weight:normal}
  53. ul.no-bullet {list-style: none}
  54. -->
  55. </style>
  56. </head>
  57. <body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
  58. <a name="Configure-Options"></a>
  59. <div class="header">
  60. <p>
  61. Next: <a href="System_002dwide-configuration.html#System_002dwide-configuration" accesskey="n" rel="next">System-wide configuration</a>, Previous: <a href="Config-Names.html#Config-Names" accesskey="p" rel="previous">Config Names</a>, Up: <a href="Installing-GDB.html#Installing-GDB" accesskey="u" rel="up">Installing GDB</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
  62. </div>
  63. <hr>
  64. <a name="configure-Options"></a>
  65. <h3 class="section">C.5 <samp>configure</samp> Options</h3>
  66. <p>Here is a summary of the <samp>configure</samp> options and arguments that
  67. are most often useful for building <small>GDB</small>. <samp>configure</samp>
  68. also has several other options not listed here. See <a href="http://www.gnu.org/software/autoconf/manual/html_node/Running-configure-scripts.html#Running-configure-scripts">(autoconf.info)Running
  69. configure scripts</a>, for a full
  70. explanation of <samp>configure</samp>.
  71. </p>
  72. <div class="smallexample">
  73. <pre class="smallexample">configure <span class="roman">[</span>--help<span class="roman">]</span>
  74. <span class="roman">[</span>--prefix=<var>dir</var><span class="roman">]</span>
  75. <span class="roman">[</span>--exec-prefix=<var>dir</var><span class="roman">]</span>
  76. <span class="roman">[</span>--srcdir=<var>dirname</var><span class="roman">]</span>
  77. <span class="roman">[</span>--target=<var>target</var><span class="roman">]</span>
  78. </pre></div>
  79. <p>You may introduce options with a single &lsquo;<samp>-</samp>&rsquo; rather than
  80. &lsquo;<samp>--</samp>&rsquo; if you prefer; but you may abbreviate option names if you use
  81. &lsquo;<samp>--</samp>&rsquo;.
  82. </p>
  83. <dl compact="compact">
  84. <dt><code>--help</code></dt>
  85. <dd><p>Display a quick summary of how to invoke <samp>configure</samp>.
  86. </p>
  87. </dd>
  88. <dt><code>--prefix=<var>dir</var></code></dt>
  89. <dd><p>Configure the source to install programs and files under directory
  90. <samp><var>dir</var></samp>.
  91. </p>
  92. </dd>
  93. <dt><code>--exec-prefix=<var>dir</var></code></dt>
  94. <dd><p>Configure the source to install programs under directory
  95. <samp><var>dir</var></samp>.
  96. </p>
  97. </dd>
  98. <dt><code>--srcdir=<var>dirname</var></code></dt>
  99. <dd><p>Use this option to make configurations in directories separate from the
  100. <small>GDB</small> source directories. Among other things, you can use this to
  101. build (or maintain) several configurations simultaneously, in separate
  102. directories. <samp>configure</samp> writes configuration-specific files in
  103. the current directory, but arranges for them to use the source in the
  104. directory <var>dirname</var>. <samp>configure</samp> creates directories under
  105. the working directory in parallel to the source directories below
  106. <var>dirname</var>.
  107. </p>
  108. </dd>
  109. <dt><code>--target=<var>target</var></code></dt>
  110. <dd><p>Configure <small>GDB</small> for cross-debugging programs running on the specified
  111. <var>target</var>. Without this option, <small>GDB</small> is configured to debug
  112. programs that run on the same machine (<var>host</var>) as <small>GDB</small> itself.
  113. </p>
  114. <p>There is no convenient way to generate a list of all available
  115. targets. Also see the <code>--enable-targets</code> option, below.
  116. </p></dd>
  117. </dl>
  118. <p>There are many other options that are specific to <small>GDB</small>. This
  119. lists just the most common ones; there are some very specialized
  120. options not described here.
  121. </p>
  122. <dl compact="compact">
  123. <dt><code>--enable-targets=<span class="roman">[</span><var>target</var><span class="roman">]</span>&hellip;</code></dt>
  124. <dt><code>--enable-targets=all</code></dt>
  125. <dd><p>Configure <small>GDB</small> for cross-debugging programs running on the
  126. specified list of targets. The special value &lsquo;<samp>all</samp>&rsquo; configures
  127. <small>GDB</small> for debugging programs running on any target it supports.
  128. </p>
  129. </dd>
  130. <dt><code>--with-gdb-datadir=<var>path</var></code></dt>
  131. <dd><p>Set the <small>GDB</small>-specific data directory. <small>GDB</small> will look
  132. here for certain supporting files or scripts. This defaults to the
  133. <samp>gdb</samp> subdirectory of &lsquo;<samp>datadir</samp>&rsquo; (which can be set using
  134. <code>--datadir</code>).
  135. </p>
  136. </dd>
  137. <dt><code>--with-relocated-sources=<var>dir</var></code></dt>
  138. <dd><p>Sets up the default source path substitution rule so that directory
  139. names recorded in debug information will be automatically adjusted for
  140. any directory under <var>dir</var>. <var>dir</var> should be a subdirectory of
  141. <small>GDB</small>&rsquo;s configured prefix, the one mentioned in the
  142. <code>--prefix</code> or <code>--exec-prefix</code> options to configure. This
  143. option is useful if GDB is supposed to be moved to a different place
  144. after it is built.
  145. </p>
  146. </dd>
  147. <dt><code>--enable-64-bit-bfd</code></dt>
  148. <dd><p>Enable 64-bit support in BFD on 32-bit hosts.
  149. </p>
  150. </dd>
  151. <dt><code>--disable-gdbmi</code></dt>
  152. <dd><p>Build <small>GDB</small> without the GDB/MI machine interface
  153. (see <a href="GDB_002fMI.html#GDB_002fMI">GDB/MI</a>).
  154. </p>
  155. </dd>
  156. <dt><code>--enable-tui</code></dt>
  157. <dd><p>Build <small>GDB</small> with the text-mode full-screen user interface
  158. (TUI). Requires a curses library (ncurses and cursesX are also
  159. supported).
  160. </p>
  161. </dd>
  162. <dt><code>--with-curses</code></dt>
  163. <dd><p>Use the curses library instead of the termcap library, for text-mode
  164. terminal operations.
  165. </p>
  166. </dd>
  167. <dt><code>--with-debuginfod</code></dt>
  168. <dd><p>Build <small>GDB</small> with libdebuginfod, the debuginfod client library.
  169. Used to automatically fetch source files and separate debug files from
  170. debuginfod servers using the associated executable&rsquo;s build ID. Enabled
  171. by default if libdebuginfod is installed and found at configure time.
  172. debuginfod is packaged with elfutils, starting with version 0.178. You
  173. can get the latest version from &lsquo;https://sourceware.org/elfutils/&rsquo;.
  174. </p>
  175. </dd>
  176. <dt><code>--with-libunwind-ia64</code></dt>
  177. <dd><p>Use the libunwind library for unwinding function call stack on ia64
  178. target platforms. See http://www.nongnu.org/libunwind/index.html for
  179. details.
  180. </p>
  181. </dd>
  182. <dt><code>--with-system-readline</code></dt>
  183. <dd><p>Use the readline library installed on the host, rather than the
  184. library supplied as part of <small>GDB</small>. Readline 7 or newer is
  185. required; this is enforced by the build system.
  186. </p>
  187. </dd>
  188. <dt><code>--with-system-zlib</code></dt>
  189. <dd><p>Use the zlib library installed on the host, rather than the library
  190. supplied as part of <small>GDB</small>.
  191. </p>
  192. </dd>
  193. <dt><code>--with-expat</code></dt>
  194. <dd><p>Build <small>GDB</small> with Expat, a library for XML parsing. (Done by
  195. default if libexpat is installed and found at configure time.) This
  196. library is used to read XML files supplied with <small>GDB</small>. If it
  197. is unavailable, some features, such as remote protocol memory maps,
  198. target descriptions, and shared library lists, that are based on XML
  199. files, will not be available in <small>GDB</small>. If your host does not
  200. have libexpat installed, you can get the latest version from
  201. &lsquo;http://expat.sourceforge.net&rsquo;.
  202. </p>
  203. </dd>
  204. <dt><code>--with-libiconv-prefix<span class="roman">[</span>=<var>dir</var><span class="roman">]</span></code></dt>
  205. <dd>
  206. <p>Build <small>GDB</small> with GNU libiconv, a character set encoding
  207. conversion library. This is not done by default, as on GNU systems
  208. the <code>iconv</code> that is built in to the C library is sufficient. If
  209. your host does not have a working <code>iconv</code>, you can get the latest
  210. version of GNU iconv from &lsquo;https://www.gnu.org/software/libiconv/&rsquo;.
  211. </p>
  212. <p><small>GDB</small>&rsquo;s build system also supports building GNU libiconv as
  213. part of the overall build. See <a href="Requirements.html#Requirements">Requirements</a>.
  214. </p>
  215. </dd>
  216. <dt><code>--with-lzma</code></dt>
  217. <dd><p>Build <small>GDB</small> with LZMA, a compression library. (Done by default
  218. if liblzma is installed and found at configure time.) LZMA is used by
  219. <small>GDB</small>&rsquo;s &quot;mini debuginfo&quot; feature, which is only useful on
  220. platforms using the ELF object file format. If your host does not
  221. have liblzma installed, you can get the latest version from
  222. &lsquo;https://tukaani.org/xz/&rsquo;.
  223. </p>
  224. </dd>
  225. <dt><code>--with-mpfr</code></dt>
  226. <dd><p>Build <small>GDB</small> with GNU MPFR, a library for multiple-precision
  227. floating-point computation with correct rounding. (Done by default if
  228. GNU MPFR is installed and found at configure time.) This library is
  229. used to emulate target floating-point arithmetic during expression
  230. evaluation when the target uses different floating-point formats than
  231. the host. If GNU MPFR is not available, <small>GDB</small> will fall back
  232. to using host floating-point arithmetic. If your host does not have
  233. GNU MPFR installed, you can get the latest version from
  234. &lsquo;http://www.mpfr.org&rsquo;.
  235. </p>
  236. </dd>
  237. <dt><code>--with-python<span class="roman">[</span>=<var>python</var><span class="roman">]</span></code></dt>
  238. <dd><p>Build <small>GDB</small> with Python scripting support. (Done by default if
  239. libpython is present and found at configure time.) Python makes
  240. <small>GDB</small> scripting much more powerful than the restricted CLI
  241. scripting language. If your host does not have Python installed, you
  242. can find it on &lsquo;http://www.python.org/download/&rsquo;. The oldest version
  243. of Python supported by GDB is 2.6. The optional argument <var>python</var>
  244. is used to find the Python headers and libraries. It can be either
  245. the name of a Python executable, or the name of the directory in which
  246. Python is installed.
  247. </p>
  248. </dd>
  249. <dt><code>--with-guile[=GUILE]'</code></dt>
  250. <dd><p>Build <small>GDB</small> with GNU Guile scripting support. (Done by default
  251. if libguile is present and found at configure time.) If your host
  252. does not have Guile installed, you can find it at
  253. &lsquo;https://www.gnu.org/software/guile/&rsquo;. The optional argument GUILE
  254. can be a version number, which will cause <code>configure</code> to try to
  255. use that version of Guile; or the file name of a <code>pkg-config</code>
  256. executable, which will be queried to find the information needed to
  257. compile and link against Guile.
  258. </p>
  259. </dd>
  260. <dt><code>--without-included-regex</code></dt>
  261. <dd><p>Don&rsquo;t use the regex library included with <small>GDB</small> (as part of the
  262. libiberty library). This is the default on hosts with version 2 of
  263. the GNU C library.
  264. </p>
  265. </dd>
  266. <dt><code>--with-sysroot=<var>dir</var></code></dt>
  267. <dd><p>Use <var>dir</var> as the default system root directory for libraries whose
  268. file names begin with <samp>/lib</samp>&rsquo; or <samp>/usr/lib'</samp>. (The value of
  269. <var>dir</var> can be modified at run time by using the <code>set
  270. sysroot</code> command.) If <var>dir</var> is under the <small>GDB</small> configured
  271. prefix (set with <code>--prefix</code> or <code>--exec-prefix options</code>, the
  272. default system root will be automatically adjusted if and when
  273. <small>GDB</small> is moved to a different location.
  274. </p>
  275. </dd>
  276. <dt><code>--with-system-gdbinit=<var>file</var></code></dt>
  277. <dd><p>Configure <small>GDB</small> to automatically load a system-wide init file.
  278. <var>file</var> should be an absolute file name. If <var>file</var> is in a
  279. directory under the configured prefix, and <small>GDB</small> is moved to
  280. another location after being built, the location of the system-wide
  281. init file will be adjusted accordingly.
  282. </p>
  283. </dd>
  284. <dt><code>--with-system-gdbinit-dir=<var>directory</var></code></dt>
  285. <dd><p>Configure <small>GDB</small> to automatically load init files from a
  286. system-wide directory. <var>directory</var> should be an absolute directory
  287. name. If <var>directory</var> is in a directory under the configured
  288. prefix, and <small>GDB</small> is moved to another location after being
  289. built, the location of the system-wide init directory will be
  290. adjusted accordingly.
  291. </p>
  292. </dd>
  293. <dt><code>--enable-build-warnings</code></dt>
  294. <dd><p>When building the <small>GDB</small> sources, ask the compiler to warn about
  295. any code which looks even vaguely suspicious. It passes many
  296. different warning flags, depending on the exact version of the
  297. compiler you are using.
  298. </p>
  299. </dd>
  300. <dt><code>--enable-werror</code></dt>
  301. <dd><p>Treat compiler warnings as werrors. It adds the <code>-Werror</code> flag
  302. to the compiler, which will fail the compilation if the compiler
  303. outputs any warning messages.
  304. </p>
  305. </dd>
  306. <dt><code>--enable-ubsan</code></dt>
  307. <dd><p>Enable the GCC undefined behavior sanitizer. This is disabled by
  308. default, but passing <code>--enable-ubsan=yes</code> or
  309. <code>--enable-ubsan=auto</code> to <code>configure</code> will enable it. The
  310. undefined behavior sanitizer checks for C<tt>++</tt> undefined behavior.
  311. It has a performance cost, so if you are looking at <small>GDB</small>&rsquo;s
  312. performance, you should disable it. The undefined behavior sanitizer
  313. was first introduced in GCC 4.9.
  314. </p></dd>
  315. </dl>
  316. <hr>
  317. <div class="header">
  318. <p>
  319. Next: <a href="System_002dwide-configuration.html#System_002dwide-configuration" accesskey="n" rel="next">System-wide configuration</a>, Previous: <a href="Config-Names.html#Config-Names" accesskey="p" rel="previous">Config Names</a>, Up: <a href="Installing-GDB.html#Installing-GDB" accesskey="u" rel="up">Installing GDB</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
  320. </div>
  321. </body>
  322. </html>