关于configure中的build/host/target

可以参考:http://www.airs.com/ian/configure/configure_toc.html
Reference:
http://www.tcpdump.org/lists/workers/2001/11/msg00148.html
Nope. See `info standards' for the definition of $build*, $host* and
$target* macros.
 Basically, $build* refer to the system compilation is being performed on,
$host* refer to the system compiled binaries are to run on
 $target* refer to the system compiled binaries will handle. As
such $target* usually have a meaning for developemt tool only.
So far packages that make use of $target* I know of are binutils, gcc,
gdb and ksymoops (a Linux run-time error disassembler). Let's take
binutils as an example. I compile it in several ways, following are

examples of configure invocations:
 
1. `./configure --build=mipsel-linux --host=mipsel-linux
--target=mipsel-linux' will build native mipsel-linux binutils on
mipsel-linux.
 
2. `./   可以参考:http://www.airs.com/ian/configure/configure_toc.html
Reference:
http://www.tcpdump.org/lists/workers/2001/11/msg00148.html --build=i386-linux --host=mipsel-linux
--target=mipsel-linux' will cross-build native mipsel-linux binutils on
i386-linux.
 
3. `./configure --build=i386-linux --host=i386-linux
--target=mipsel-linux' will build mipsel-linux cross-binutils on
i386-linux.
 
4. `./configure --build=mipsel-linux --host=i386-linux
--target=mipsel-linux' will cross-build mipsel-linux cross-binutils for
i386-linux on mipsel-linux.
As you see, only if $build != $host a cross-compilation is performed.
 
   具体解释一下,build就是你正在使用的机器,
                         host就是你编译好的程序可以运行的平台,
                         target就是你编译的程序可以处理的平台.一般来说,我们平时所说的交差编译用不到他target的,比 如./configure --build=i386-linux,--host=arm-linux就可以了,在386的平台上编译可以运行在arm板的程序.但是,一般我们都是 编译程序,而不是编译工具,如果我们编译工具,比如gcc,这个target就有用了.如果我们需要在一个我们的机器上为arm开发板编译一个可以处理 mips程序的gcc,那么target就是mips了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
mkdir -p build && cd build && cmake .. -- The C compiler identification is GNU 9.3.0 -- The CXX compiler identification is unknown -- Check for working C compiler: /work/bsp/rk356x/buildroot/output/rockchip_rk3568/host/bin/aarch64-buildroot-linux-gnu-gcc -- Check for working C compiler: /work/bsp/rk356x/buildroot/output/rockchip_rk3568/host/bin/aarch64-buildroot-linux-gnu-gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done CMake Error in CMakeLists.txt: No CMAKE_CXX_COMPILER could be found. Tell CMake where to find the compiler by setting either the environment variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path to the compiler, or to the compiler name if it is in the PATH. CMake Warning (dev) in CMakeLists.txt: No cmake_minimum_required command is present. A line of code such as cmake_minimum_required(VERSION 3.10) should be added at the top of the file. The version specified may be lower if you wish to support older CMake versions for this project. For more information run "cmake --help-policy CMP0000". This warning is for project developers. Use -Wno-dev to suppress it. -- Configuring incomplete, errors occurred! See also "/home/edu/workplace/yuenki/ykrecovery/build/CMakeFiles/CMakeOutput.log". See also "/home/edu/workplace/yuenki/ykrecovery/build/CMakeFiles/CMakeError.log". Makefile:7: recipe for target 'configure' failed make: *** [configure] Error 1
06-15
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值