文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>交叉编译 ARM LINUX编译BOOST 1.33交叉编译 ARM LINUX

交叉编译 ARM LINUX编译BOOST 1.33交叉编译 ARM LINUX

时间:2007-02-02  来源:steprun

编译这个需要先编译zlib和bzip2

./configure --prefix=安装目录

然后修改Makefile
因为我的cross编译器在/home/arm/local中

BJAM_CONFIG= -sPYTHON_ROOT=/usr -sPYTHON_VERSION=2.3 -sGCC_ROOT_DIRECTORY=/home/arm/local -sGCC=arm-softfloat-linux-gnu-gcc -sGXX=arm-softfloat-linux-gnu-g++ -sGCC_ROOT_DIRECTORY=/home/arm/local -sGCC_BIN_DIRECTORY=/home/arm/local/bin

PREFIX=/home/arm/local
EPREFIX=/home/arm/local
LIBDIR=/home/arm/local/lib
INCLUDEDIR=/home/arm/local/include

然后修改tools/build/v1/gcc-tools.jam
这个文件里有对上面用到的宏的说明

# compute directories for invoking GCC
#
# The gcc toolset can be user-configured using the following
# variables:
#
# GCC_ROOT_DIRECTORY
#       The directory in which GCC was installed. Defaults to
#       unset. Usually, there is no need to set this variable at
#       all. However, if G++ is not in the path it is usually
#       sufficient to configure this one variable. More fine-grained
#       configuration is available by setting the following:
#
# GCC_BIN_DIRECTORY
#       the directory prefix used to find the gcc executables. Defaults to
#       $(GCC_ROOT_DIRECTORY)/bin/, or "" if GCC_ROOT_DIRECTORY is
#       not set.
#
# GCC_INCLUDE_DIRECTORY
#       the directory in which to find system includes. Defaults to
#       empty.
#
# GCC_STDLIB_DIRECTORY
#       the directory in which to find the standard library
#       objects associated with this build of gcc. Defaults to
#       $(GCC_ROOT_DIRECTORY)/lib.
#
# GXX
#       The name by which g++ is invoked. You can also use this in
#       lieu of setting the <cxxflags> property to force options such
#       as "-V3.0.4" into the g++ command line: "-sGXX=g++ -V3.0.4".
#
# GCC
#       Similar to GXX, the name by which gcc is invoked for "C"
#       language targets.

第381行,改了可能会用到
.AR ?= arm-softfloat-linux-gnu-ar ;

# used to manipulate the object files produced by GCC to
# prevent the merging of debug symbols (which happens to be n^2 slow)
if ! ( --no-objcopy in $(ARGV) )
{
    flags gcc .OBJCOPY : [ GLOB $(GCC_BIN_DIRECTORY) $(PATH) : objcopy1 ] ;
}
.OBJCOPY ?= arm-softfloat-linux-gnu-objcopy ;
if ! $(on-windows)

等494行 加了到头文件的目录(包括zlib与bzip2的头文件),可能之前的不对,所以自己加了一下

actions gcc-Cc-action
{
    $(.SET_EXIT)
    "$(.GCC[1]:R=$(GCC_BIN_DIR))" $(.GCC[2-]) -c -Wall -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) -I"$(HDRS)" -I$(_)"$(STDHDRS)" -I$(_)"$(SYSHDRS)" -I/home/arm/local/include -o "$(<)" "$(>)"
    "$(.OBJCOPY[1])"$(_)$(OBJCOPY_FLAGS)$(_)"$(<)"
}

#### C++ ####
rule C++-action
{
    gcc-spawn $(<) ;
    _ on $(<) = " " ;
    gcc-C++-action $(<) : $(>) ;
}

actions gcc-C++-action
{
    $(.SET_EXIT)
    "$(.GXX[1]:R=$(GCC_BIN_DIR))" $(.GXX[2-]) -c -Wall -ftemplate-depth-255 -U$(UNDEFS) -D$(DEFINES) $(CFLAGS) $(C++FLAGS) -I"$(HDRS)" -I$(_)"$(STDHDRS)" -I$(_)"$(SYSHDRS)" -I/home/arm/local/include -o "$(<)" "$(>)"
    "$(.OBJCOPY[1])"$(_)$(OBJCOPY_FLAGS)$(_)"$(<)"
}

然后make && make install 就行了

相关阅读 更多 +
排行榜 更多 +
2025pubg国际服最新版本

2025pubg国际服最新版本

飞行射击 下载
pubg国际服地铁逃生最新版本2025

pubg国际服地铁逃生最新版本2025

飞行射击 下载
火柴人大乱斗4游戏

火柴人大乱斗4游戏

飞行射击 下载