|
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <!-- Copyright (C) 1988-2020 Free Software Foundation, Inc.
-
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.3 or
- any later version published by the Free Software Foundation; with the
- Invariant Sections being "Free Software" and "Free Software Needs
- Free Documentation", with the Front-Cover Texts being "A GNU Manual,"
- and with the Back-Cover Texts as in (a) below.
-
- (a) The FSF's Back-Cover Text is: "You are free to copy and modify
- this GNU Manual. Buying copies from GNU Press supports the FSF in
- developing GNU and promoting software freedom." -->
- <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
- <title>Running Configure (Debugging with GDB)</title>
-
- <meta name="description" content="Running Configure (Debugging with GDB)">
- <meta name="keywords" content="Running Configure (Debugging with GDB)">
- <meta name="resource-type" content="document">
- <meta name="distribution" content="global">
- <meta name="Generator" content="makeinfo">
- <link href="index.html#Top" rel="start" title="Top">
- <link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
- <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
- <link href="Installing-GDB.html#Installing-GDB" rel="up" title="Installing GDB">
- <link href="Separate-Objdir.html#Separate-Objdir" rel="next" title="Separate Objdir">
- <link href="Requirements.html#Requirements" rel="prev" title="Requirements">
- <style type="text/css">
- <!--
- a.summary-letter {text-decoration: none}
- blockquote.indentedblock {margin-right: 0em}
- blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
- blockquote.smallquotation {font-size: smaller}
- div.display {margin-left: 3.2em}
- div.example {margin-left: 3.2em}
- div.lisp {margin-left: 3.2em}
- div.smalldisplay {margin-left: 3.2em}
- div.smallexample {margin-left: 3.2em}
- div.smalllisp {margin-left: 3.2em}
- kbd {font-style: oblique}
- pre.display {font-family: inherit}
- pre.format {font-family: inherit}
- pre.menu-comment {font-family: serif}
- pre.menu-preformatted {font-family: serif}
- pre.smalldisplay {font-family: inherit; font-size: smaller}
- pre.smallexample {font-size: smaller}
- pre.smallformat {font-family: inherit; font-size: smaller}
- pre.smalllisp {font-size: smaller}
- span.nolinebreak {white-space: nowrap}
- span.roman {font-family: initial; font-weight: normal}
- span.sansserif {font-family: sans-serif; font-weight: normal}
- ul.no-bullet {list-style: none}
- -->
- </style>
-
-
- </head>
-
- <body lang="en">
- <a name="Running-Configure"></a>
- <div class="header">
- <p>
- Next: <a href="Separate-Objdir.html#Separate-Objdir" accesskey="n" rel="next">Separate Objdir</a>, Previous: <a href="Requirements.html#Requirements" accesskey="p" rel="prev">Requirements</a>, Up: <a href="Installing-GDB.html#Installing-GDB" accesskey="u" rel="up">Installing GDB</a> [<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>
- </div>
- <hr>
- <a name="Invoking-the-GDB-configure-Script"></a>
- <h3 class="section">C.2 Invoking the <small>GDB</small> <samp>configure</samp> Script</h3>
- <a name="index-configuring-GDB"></a>
- <p><small>GDB</small> comes with a <samp>configure</samp> script that automates the process
- of preparing <small>GDB</small> for installation; you can then use <code>make</code> to
- build the <code>gdb</code> program.
- </p>
- <p>The <small>GDB</small> distribution includes all the source code you need for
- <small>GDB</small> in a single directory, whose name is usually composed by
- appending the version number to ‘<samp>gdb</samp>’.
- </p>
- <p>For example, the <small>GDB</small> version 10.1.90.20201028-git distribution is in the
- <samp>gdb-10.1.90.20201028-git</samp> directory. That directory contains:
- </p>
- <dl compact="compact">
- <dt><code>gdb-10.1.90.20201028-git/configure <span class="roman">(and supporting files)</span></code></dt>
- <dd><p>script for configuring <small>GDB</small> and all its supporting libraries
- </p>
- </dd>
- <dt><code>gdb-10.1.90.20201028-git/gdb</code></dt>
- <dd><p>the source specific to <small>GDB</small> itself
- </p>
- </dd>
- <dt><code>gdb-10.1.90.20201028-git/bfd</code></dt>
- <dd><p>source for the Binary File Descriptor library
- </p>
- </dd>
- <dt><code>gdb-10.1.90.20201028-git/include</code></dt>
- <dd><p><small>GNU</small> include files
- </p>
- </dd>
- <dt><code>gdb-10.1.90.20201028-git/libiberty</code></dt>
- <dd><p>source for the ‘<samp>-liberty</samp>’ free software library
- </p>
- </dd>
- <dt><code>gdb-10.1.90.20201028-git/opcodes</code></dt>
- <dd><p>source for the library of opcode tables and disassemblers
- </p>
- </dd>
- <dt><code>gdb-10.1.90.20201028-git/readline</code></dt>
- <dd><p>source for the <small>GNU</small> command-line interface
- </p></dd>
- </dl>
-
- <p>There may be other subdirectories as well.
- </p>
- <p>The simplest way to configure and build <small>GDB</small> is to run <samp>configure</samp>
- from the <samp>gdb-<var>version-number</var></samp> source directory, which in
- this example is the <samp>gdb-10.1.90.20201028-git</samp> directory.
- </p>
- <p>First switch to the <samp>gdb-<var>version-number</var></samp> source directory
- if you are not already in it; then run <samp>configure</samp>. Pass the
- identifier for the platform on which <small>GDB</small> will run as an
- argument.
- </p>
- <p>For example:
- </p>
- <div class="smallexample">
- <pre class="smallexample">cd gdb-10.1.90.20201028-git
- ./configure
- make
- </pre></div>
-
- <p>Running ‘<samp>configure</samp>’ and then running <code>make</code> builds the
- included supporting libraries, then <code>gdb</code> itself. The configured
- source files, and the binaries, are left in the corresponding source
- directories.
- </p>
- <p><samp>configure</samp> is a Bourne-shell (<code>/bin/sh</code>) script; if your
- system does not recognize this automatically when you run a different
- shell, you may need to run <code>sh</code> on it explicitly:
- </p>
- <div class="smallexample">
- <pre class="smallexample">sh configure
- </pre></div>
-
- <p>You should run the <samp>configure</samp> script from the top directory in the
- source tree, the <samp>gdb-<var>version-number</var></samp> directory. If you run
- <samp>configure</samp> from one of the subdirectories, you will configure only
- that subdirectory. That is usually not what you want. In particular,
- if you run the first <samp>configure</samp> from the <samp>gdb</samp> subdirectory
- of the <samp>gdb-<var>version-number</var></samp> directory, you will omit the
- configuration of <samp>bfd</samp>, <samp>readline</samp>, and other sibling
- directories of the <samp>gdb</samp> subdirectory. This leads to build errors
- about missing include files such as <samp>bfd/bfd.h</samp>.
- </p>
- <p>You can install <code><small>GDB</small></code> anywhere. The best way to do this
- is to pass the <code>--prefix</code> option to <code>configure</code>, and then
- install it with <code>make install</code>.
- </p>
- <hr>
- <div class="header">
- <p>
- Next: <a href="Separate-Objdir.html#Separate-Objdir" accesskey="n" rel="next">Separate Objdir</a>, Previous: <a href="Requirements.html#Requirements" accesskey="p" rel="prev">Requirements</a>, Up: <a href="Installing-GDB.html#Installing-GDB" accesskey="u" rel="up">Installing GDB</a> [<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>
- </div>
-
-
-
- </body>
- </html>
|