Most of the work in making GDB compile on a new machine is in
specifying the configuration of the machine. This is done in a
dizzying variety of header files and configuration scripts, which we
hope to make more sensible soon. Let's say your new host is called an
xyz (e.g., `sun4'), and its full three-part configuration
name is arch-xvend-xos
(e.g.,
`sparc-sun-sunos4'). In particular:
»õ ¸Ó½Å¿¡¼ GDB ÄÄÆÄÀÏ ÀÛ¾÷½ÃÀÇ ´ëºÎºÐÀÇ ÀÏÀº ¸Ó½ÅÀÇ ¼³Á¤»çÇ×À» ÁöÁ¤ÇÏ´Â °ÍÀÌ´Ù.
ÀÌ°ÍÀº ´Ù¾çÇÑ Çì´õ ÆÄÀÏ°ú ¼³Á¤ ½ºÅ©¸³Æ®¿¡¼ ÇàÇØÁö¸ç, ÃßÈÄ ´õ ºÐº°·Â ÀÖµµ·Ï ¸¸µé¾îÁú
°ÍÀÌ´Ù. »õ È£½ºÆ®°¡ xyz (e.g., `sun4')¶ó ºÒ¸°´Ù°í ÇÏÀÚ.
±×¸®°í ¿ÏÀüÇÑ ¼¼ ºÎºÐ ¼³Á¤ À̸§Àº arch-xvend-xos
(e.g., `sparc-sun-sunos4')ÀÌ´Ù.
Ưº°È÷:
arch-xvend-xos
. You can test your changes by
running
»óÀ§ ·¹º§ µð·ºÅ丮¿¡¼, `config.sub'¸¦ ÆíÁýÇÏ°í Áö¿øµÇ´Â ¾ÆÅ°ÅØÃÄÀÇ ¸®½ºÆ®, º¥´õ,
ÆÄÀÏ ¹Ø¿¡ ÀÖ´Â ¿ÀÆÛ·¹À̵ù ½Ã½ºÅÛ¿¡ arch, xvend, and xos¸¦ Ãß°¡½ÃÄѶó.
¶ÇÇÑ, arch-xvend-xos
¿¡ ´ëÀÀÇÏ´Â alias·Î½á
xyz¸¦ Ãß°¡Çضó.
¿©·¯ºÐÀº µ¹¸±¶§ º¯°æÀ» Å×½ºÆ®ÇÒ¼ö ÀÖ´Ù.
./config.sub xyzand
./config.sub arch-xvend-xos
which should both respond with arch-xvend-xos
and no error messages.
You need to port BFD, if that hasn't been done already. Porting BFD is
beyond the scope of this manual.
ÀÌ°ÍÀº arch-xvend-xos
°ú ¿¡·¯ ¸Þ¼¼Áö°¡ ¾øÀÌ
ÀÀ´äÇØ¾ß ÇÑ´Ù.
¿©·¯ºÐÀº ¸¸ÀÏ ÀÌ¹Ì ÇÏÁö ¾Ê¾Ò´Ù¸é, BFD¸¦ Æ÷ÆÃÇÒ ÇÊ¿ä°¡ ÀÖ´Ù.
BFD¸¦ Æ÷ÆÃÇÏ´Â °ÍÀº ÀÌ ¸Å´º¾óÀÇ ¹üÀ§¸¦ ³Ñ¾î¼´Â °ÍÀÌ´Ù.
gdb_host
to xyz, and (unless your
desired target is already available) also edit `gdb/configure.tgt',
setting gdb_target
to something appropriate (for instance,
xyz).
GDB ÀÚü¸¦ ¼³Á¤Çϱâ À§ÇØ, ½Ã½ºÅÛÀ» Àç ÀνÄÇϱâ À§ÇØ `gdb/configure.host' ÆíÁýÇÏ°í
gdb_host
¸¦ xyz·Î ¼³Á¤Çضó. ±×¸®°í (¸¸ÀÏ ¿øÇϴ Ÿ°ÙÀÌ ÀÌ¹Ì ÀÌ¿ëÇÒ¼ö ¾ø´Ù¸é) ¶ÇÇÑ `gdb/configure.tgt'¸¦ ÆíÁýÇÏ°í, gdb_target
¸¦ Àû´çÇÑ °Í(¿¹¸¦ µé¾î, xyz)À¸·Î ¼³Á¤ÇÑ´Ù.
¸¶Áö¸·À¸·Î, ¿©·¯ºÐÀº GDBÀÇ host-, native- ±×¸®°í target ÀÇÁ¸ÀûÀÌ¸ç ¼³Á¤½Ã »ç¿ëµÈ `.h'¿Í `.c' ÆÄÀϵéÀ» ÁöÁ¤ÇÏ°í Á¤ÀÇÇÒ ÇÊ¿ä°¡ ÀÖ´Ù.
From the top level directory (containing `gdb', `bfd', `libiberty', and so on):
»óÀ§ µð·ºÅ丮( `gdb', `bfd', `libiberty' µîÀ» Æ÷ÇÔÇÏ¿©)¿¡¼:
make -f Makefile.in gdb.tar.gz
This will properly configure, clean, rebuild any files that are
distributed pre-built (e.g. `c-exp.tab.c' or `refcard.ps'),
and will then make a tarfile. (If the top level directory has already
been configured, you can just do make gdb.tar.gz
instead.)
ÀÌ°ÍÀº pre-built(e.g. `c-exp.tab.c' or `refcard.ps')·Î ¹èÆ÷µÇ´Â ÆÄÀϵéÀ» ¼³Á¤ÇÏ°í, clean, Àç ºôµå¸¦ Çϸç, ±×¸®°í tarfileÀ» ¸¸µç´Ù.
(¸¸ÀÏ »óÀ§ µð·ºÅ丮°¡ ÀÌ¹Ì ¼³Á¤µÇ¾ú´Ù¸é, ¿©·¯ºÐÀº ´ë½Å¿¡ make gdb.tar.gz
¸¸À»
ÇÏ¸é µÈ´Ù.)
This procedure requires:
ÀÌ ÀýÂ÷¸¦ ¿ä±¸ÇÑ´Ù:
makeinfo
(texinfo2 level);
dvips
;
yacc
or bison
.
... and the usual slew of utilities (sed
, tar
, etc.).
... ±×¸®°í ÀϹÝÀûÀÎ ¸¹Àº À¯Æ¿¸®Æ¼(sed
, tar
, µî)
`gdb.texinfo' is currently marked up using the texinfo-2 macros, which are not yet a default for anything (but we have to start using them sometime).
`gdb.texinfo'´Â ÇöÀç texinfo-2 ¸ÅÅ©·Î¸¦ »ç¿ëÇÏ¿© ±¸¼ºµÇ¾úÀ¸¸ç ¾ÆÁ÷Àº ¾î¶²°Íµµ ±âº»ÀÌ ¾Æ´Ï´Ù.(±×·¯³ª ¿ì¸®´Â ±×°Íµé·Î ½ÃÀÛÇØ¾ß ÇÑ´Ù.)
For making paper, the only thing this implies is the right generation of `texinfo.tex' needs to be included in the distribution.
paper¸¦ ¸¸µé±â À§ÇØ, Æ÷ÇÔÇÑ À¯ÀÏÇÑ °ÍÀº ¹èÆ÷½Ã Æ÷Ç﵃ ÇÊ¿ä°¡ ÀÖ´Â ÀϹÝÀûÀÎ `texinfo.tex'ÀÌ´Ù.
For making info files, however, rather than duplicating the texinfo2
distribution, generate `gdb-all.texinfo' locally, and include the
files `gdb.info*' in the distribution. Note the plural;
makeinfo
will split the document into one overall file and five
or so included files.
±×·¯³ª, texinfo2 ¹èÆ÷¸¦ º¹»çÇϱ⠺¸´Ù info ÆÄÀÏÀ» ¸¸µé±â À§ÇØ, `gdb-all.texinfo'¸¦
¸¸µé°í ¹èÆ÷½Ã `gdb.info*'¸¦ Æ÷ÇÔÇÑ´Ù.
makeinfo
´Â ¹®¼¸¦ ÇϳªÀÇ Àüü ÆÄÀÏ°ú ´Ù¼¸À̳ª ÀÎŬ·çµÈ ÆÄÀÏ·Î ³ª´«´Ù.
Go to the first, previous, next, last section, table of contents.