122 lines
6.5 KiB
HTML
122 lines
6.5 KiB
HTML
<html lang="en">
|
|
<head>
|
|
<title>Running Configure - Debugging with GDB</title>
|
|
<meta http-equiv="Content-Type" content="text/html">
|
|
<meta name="description" content="Debugging with GDB">
|
|
<meta name="generator" content="makeinfo 4.13">
|
|
<link title="Top" rel="start" href="index.html#Top">
|
|
<link rel="up" href="Installing-GDB.html#Installing-GDB" title="Installing GDB">
|
|
<link rel="prev" href="Requirements.html#Requirements" title="Requirements">
|
|
<link rel="next" href="Separate-Objdir.html#Separate-Objdir" title="Separate Objdir">
|
|
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
|
<!--
|
|
Copyright (C) 1988-2019 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.''
|
|
-->
|
|
<meta http-equiv="Content-Style-Type" content="text/css">
|
|
<style type="text/css"><!--
|
|
pre.display { font-family:inherit }
|
|
pre.format { font-family:inherit }
|
|
pre.smalldisplay { font-family:inherit; font-size:smaller }
|
|
pre.smallformat { font-family:inherit; font-size:smaller }
|
|
pre.smallexample { font-size:smaller }
|
|
pre.smalllisp { font-size:smaller }
|
|
span.sc { font-variant:small-caps }
|
|
span.roman { font-family:serif; font-weight:normal; }
|
|
span.sansserif { font-family:sans-serif; font-weight:normal; }
|
|
--></style>
|
|
</head>
|
|
<body>
|
|
<div class="node">
|
|
<a name="Running-Configure"></a>
|
|
<p>
|
|
Next: <a rel="next" accesskey="n" href="Separate-Objdir.html#Separate-Objdir">Separate Objdir</a>,
|
|
Previous: <a rel="previous" accesskey="p" href="Requirements.html#Requirements">Requirements</a>,
|
|
Up: <a rel="up" accesskey="u" href="Installing-GDB.html#Installing-GDB">Installing GDB</a>
|
|
<hr>
|
|
</div>
|
|
|
|
<h3 class="section">C.2 Invoking the <span class="sc">gdb</span> <samp><span class="file">configure</span></samp> Script</h3>
|
|
|
|
<p><a name="index-configuring-_0040value_007bGDBN_007d-3302"></a><span class="sc">gdb</span> comes with a <samp><span class="file">configure</span></samp> script that automates the process
|
|
of preparing <span class="sc">gdb</span> for installation; you can then use <code>make</code> to
|
|
build the <code>gdb</code> program.
|
|
|
|
<p>The <span class="sc">gdb</span> distribution includes all the source code you need for
|
|
<span class="sc">gdb</span> in a single directory, whose name is usually composed by
|
|
appending the version number to ‘<samp><span class="samp">gdb</span></samp>’.
|
|
|
|
<p>For example, the <span class="sc">gdb</span> version 8.3.0.20190709-git distribution is in the
|
|
<samp><span class="file">gdb-8.3.0.20190709-git</span></samp> directory. That directory contains:
|
|
|
|
<dl>
|
|
<dt><code>gdb-8.3.0.20190709-git/configure </code><span class="roman">(and supporting files)</span><dd>script for configuring <span class="sc">gdb</span> and all its supporting libraries
|
|
|
|
<br><dt><code>gdb-8.3.0.20190709-git/gdb</code><dd>the source specific to <span class="sc">gdb</span> itself
|
|
|
|
<br><dt><code>gdb-8.3.0.20190709-git/bfd</code><dd>source for the Binary File Descriptor library
|
|
|
|
<br><dt><code>gdb-8.3.0.20190709-git/include</code><dd><span class="sc">gnu</span> include files
|
|
|
|
<br><dt><code>gdb-8.3.0.20190709-git/libiberty</code><dd>source for the ‘<samp><span class="samp">-liberty</span></samp>’ free software library
|
|
|
|
<br><dt><code>gdb-8.3.0.20190709-git/opcodes</code><dd>source for the library of opcode tables and disassemblers
|
|
|
|
<br><dt><code>gdb-8.3.0.20190709-git/readline</code><dd>source for the <span class="sc">gnu</span> command-line interface
|
|
</dl>
|
|
|
|
<p>There may be other subdirectories as well.
|
|
|
|
<p>The simplest way to configure and build <span class="sc">gdb</span> is to run <samp><span class="file">configure</span></samp>
|
|
from the <samp><span class="file">gdb-</span><var>version-number</var></samp> source directory, which in
|
|
this example is the <samp><span class="file">gdb-8.3.0.20190709-git</span></samp> directory.
|
|
|
|
<p>First switch to the <samp><span class="file">gdb-</span><var>version-number</var></samp> source directory
|
|
if you are not already in it; then run <samp><span class="file">configure</span></samp>. Pass the
|
|
identifier for the platform on which <span class="sc">gdb</span> will run as an
|
|
argument.
|
|
|
|
<p>For example:
|
|
|
|
<pre class="smallexample"> cd gdb-8.3.0.20190709-git
|
|
./configure
|
|
make
|
|
</pre>
|
|
<p>Running ‘<samp><span class="samp">configure</span></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><samp><span class="file">configure</span></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:
|
|
|
|
<pre class="smallexample"> sh configure
|
|
</pre>
|
|
<p>You should run the <samp><span class="file">configure</span></samp> script from the top directory in the
|
|
source tree, the <samp><span class="file">gdb-</span><var>version-number</var></samp> directory. If you run
|
|
<samp><span class="file">configure</span></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><span class="file">configure</span></samp> from the <samp><span class="file">gdb</span></samp> subdirectory
|
|
of the <samp><span class="file">gdb-</span><var>version-number</var></samp> directory, you will omit the
|
|
configuration of <samp><span class="file">bfd</span></samp>, <samp><span class="file">readline</span></samp>, and other sibling
|
|
directories of the <samp><span class="file">gdb</span></samp> subdirectory. This leads to build errors
|
|
about missing include files such as <samp><span class="file">bfd/bfd.h</span></samp>.
|
|
|
|
<p>You can install <span class="sc">gdb</span> 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>.
|
|
|
|
</body></html>
|
|
|