Linuxconfigure cross-compilation parameter settings

Source: Internet
Author: User
Article Title: configure cross-compilation parameter settings. Linux is a technology channel of the IT lab in China. Including desktop applications, Linux system management, kernel research, embedded systems, open source, and many other basic classification configure parameters, generally including the following
 
-- Srcdir = DIR
 
This option does not work for installation. He will tell the 'configure 'source code location. Generally, you do not need to specify this option, because the 'configure 'script is generally in the same directory as the source code file.
 
-- Program-prefix = PREFIX
 
Specifies the prefix that will be added to the name of the installed program. For example, if you use '-- program-prefix = G' to configure a program named 'tar', the installed program will be named 'gtar '. this option is used only when it is used with other installation options. in 'file used only.
 
-- Program-suffix = SUFFIX
 
Specifies the suffix that will be added to the name of the installed program.
 
-- Program-transform-name = PROGRAM
 
The PROGRAM here is a sed script. When a PROGRAM is installed, its name will pass through 'sed-e PROGRAM 'to generate the installation name.
 
-- Build = BUILD
 
The system platform where the software package is installed. If not specified, the default value is the value of the '-- host' option.
 
-- Host = HOST
 
System platform where the software runs. If this parameter is not specified, 'config. guess 'is run to detect the vulnerability.
 
-- Target = GARGET
 
Specifies the target to system platform of the software. This mainly plays a role in programming language tools such as compiler and assembler context. If not specified, the '-- host' option value is used by default.
 
-- Disable-FEATURE
 
Some software packages can choose this option to provide compilation configuration for large options, such as using the Kerberos authentication system or an experimental compiler optimal configuration. If these features are provided by default, you can use '-- disable-FEATURE' to disable them. Here 'feature 'is the name of the FEATURE. For example:
 
$./Configure -- disable-gui
 
-Enable-FEATURE [= ARG]
 
On the contrary, some software packages may provide some features that are disabled by default. You can use '-- enable-FEATURE' to start using it. Here, 'feature 'is the FEATURE name. A feature may accept an optional parameter. For example:
 
$./Configure -- enable-buffers = 128
 
'-- Enable-FEATURE = no' is synonymous with' -- disable-FEATURE 'mentioned above.
 
-- With-PACKAGE [= ARG]
 
There is an excellent tradition of using existing software packages and libraries in the free software community. When you use 'configure 'to configure a source code tree, you can provide information about other installed software packages. For example, the BLT device toolkit relies on Tcl and Tk. To configure the BLT, you may need to provide the 'configure 'with some information about where we installed the Tcl and Tk:
 
$./Configure -- with-tcl =/usr/local -- with-tk =/usr/local
 
'-- With-PACKAGE = no' is synonymous with' -- without-PACKAGE 'mentioned below.
 
-- Without-PACKAGE
 
Sometimes you may not want your software package to interact with the existing software package of the system. For example, you may not want your new compiler to use GNU ld. You can do this by using this option:
 
$./Configure -- without-gnu-ld
 
-- X-regiondes = DIR
 
This option is a special case of the '-- with-package' option. When Autoconf was initially developed, it was popular to use 'configure 'as a work und for Imake to create software running on X. The '-- x-uploads' option provides a method for specifying the directory containing the X11 header file to the 'configure' script.
 
-- X-libraries = DIR
 
Similarly, the '-- x-libraries' option provides a method for specifying the directory containing the X11 Library to the 'configure' script.
 
======================================
 
Red highlight is the focus of our cross-compilation application.
 
Configure -- host = arm-linux. This is the cross-compilation option of arm.
 
Configure -- host = mipsel-linux. This is the cross-compilation option of mipsel.
 
======================================
 
Next I will turn to a blog that is helpful to me.
 
During cross-compilation, configure -- host = arm-linux is always used. However, many test programs in CONFIGURE cannot be run on the HOST. The following error occurs: cannot run test program while cross compiling
 
For similar errors, you can use CACHEFILE to solve this problem. Thank you for your guidance from ABSURD.
 
I am the first step to solve this problem: Record errors such as: checking abstract socket namespace ...... Configure: error: cannot run test program while cross compiling
 
Note that abstract socket namespace searches abstract socket in configure and you can see a structure similar to this.
 
Echo "$ as_me: $ LINENO: checking abstract socket namespace"> & 5
 
Echo $ ECHO_N "checking abstract socket namespace ...... $ ECHO_C "> & 6
 
If test "$ {ac_cv_have_effecact_sockets + set}" = set; then
 
Echo $ ECHO_N "(cached) $ ECHO_C"> & 6
 
Ac_cv_have_abstract_sockets is the variable to be searched.
 
Use echo ac_cv_have_effecact_sockets = yes> arm-linux.cache
 
Then
 
. /Configure -- host = arm-linux -- cache-file = arm-linux.cache
 
K.
 
In addition:
 
1: Disable GUI in/sbin/init 3 of fedora
 
Some configure depends on lib compilation and must be supported by pkg-config.
 
You need to set the PKG_CONFIG_PATH environment variable, which points to the xxx. pc of the dependent lib.
 
Description file: describes the features of lib in xxx. pc, as shown in figure
 
Prefix =/develop/upnp/mis_libupnp
 
Exec_prefix =$ {prefix}
 
Libdir =$ {exec_prefix}/lib
 
Includedir =/develop/upnp/mis_libupnp/include
 
Name: libupnp
 
Description: Linux SDK for UPnP Devices
 
Version: 1.6.3
 
Ibs:-L $ {libdir}-lupnp-lthreadutil-lixml
 
Cflags:-pthread-I $ {includedir}/upnp
 
2: The configure script uses the C file compilation method to determine whether lib exists.
 
You can pass the test by modifying the configure file, specifically adding-I or-L to specify the location.
 
Some specify the target platform through -- host, -- host = mipsel-linux (libupnp)
 
Some parameters are specified through -- cross-prefix = mipsel-linux--- cross-compile (ushare,
 
For details, see configure -- help/-h.
 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.