You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

335 satır
16KB

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