我正在尝试binutils
在平台 A上构建,它将在平台 A上运行并以平台 B为目标。
我有binutils
in的来源/home/cedric/source/binutils-2.29/
,我执行以下 2 个构建:
cd /home/cedric/source/
mkdir default/ && cd default/
mkdir build/ install/ & cd build/
../../binutils-2.29/configure --prefix=/home/cedric/source/default/install/
make
make install
和
cd /home/cedric/source/
mkdir lfs/ && cd lfs/
mkdir build/ install/ & cd build/
../../binutils-2.29/configure --prefix=/home/cedric/source/lfs/install/ --target=x86_64-lfs-linux-gnu
make
make install
事实证明, indefault/install
比 in多了 2 个目录lfs/install
,即lib
包含静态库的目录和bfd
包含一些头文件的目录。opcodes
include
我的困惑
为什么要安装这些静态库和头文件(它们的用途是什么,因为已经构建了诸如此类的binutils
工具)?为什么在为另一个平台构建时它们会消失?ld
as
我所做的研究并没有消除我的困惑:
binutils-2.29/configure --help
README
在binutils-2.29/
, binutils-2.29/binutils/
,和binutils-2.29/bfd/
FWIW,我在配置帮助中找到了以下内容,这与它可能创建的目录及其默认值有关:
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
By default, `make install' will install all the files in
`/usr/local/bin', `/usr/local/lib' etc. You can specify
an installation prefix other than `/usr/local' using `--prefix',
for instance `--prefix=$HOME'.
For better control, use the options below.
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
--datadir=DIR read-only architecture-independent data [DATAROOTDIR]
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
--psdir=DIR ps documentation [DOCDIR]