config/toolchain.in
author Bryan Hundven <bryanhundven@gmail.com>
Thu Dec 09 18:54:37 2010 +0100 (2010-12-09)
changeset 2207 b268256e4a08
parent 1865 6a0b74b87dbd
child 2209 cdafca8bdaa8
permissions -rw-r--r--
config: add option to build statically linked toolchain

Add a config option to statically build the host tools.
Impacted tools can use that option to decide wether to build
statically or shared.

For now, no tool uses it, but they'll be added one at a time
in the next commits.

Signed-off-by: "Bryan Hundven" <bryanhundven@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
     1 menu "Toolchain options"
     2 
     3 comment "General toolchain options"
     4 
     5 config USE_SYSROOT
     6     bool
     7     prompt "Use sysroot'ed toolchain"
     8     default y
     9     help
    10       Use the 'shinny new' sysroot feature of gcc: libraries split between
    11       prefix/target/sys-root/lib and prefix/target/sys-root/usr/lib
    12       
    13       You definitely want to say 'Y' here. Yes you do. I know you do. Say 'Y'.
    14 
    15 config SYSROOT_DIR_PREFIX
    16     string
    17     prompt "sysroot prefix dir (READ HELP)" if ! BACKEND
    18     depends on USE_SYSROOT
    19     default ""
    20     help
    21       *
    22       * Unless you realy know you need that, leave it empty!
    23       *
    24       
    25       This string will be interpreted as a directory component to be added
    26       to the sysroot path, just before the actual sysroot directory.
    27       
    28       In fact, the sysroot path is constructed as:
    29         ${CT_PREFIX_DIR}/${CT_TARGET}/${CT_SYSROOT_DIR_PREFIX}/sys-root
    30 
    31 config STATIC_TOOLCHAIN
    32     bool
    33     prompt "Build Static Toolchain (EXPERIMENTAL)"
    34     depends on EXPERIMENTAL
    35     default n
    36     help
    37       Build static host binaries.
    38       
    39       If you wish to move the toolchain to another host, and you are not
    40       confident that this host has the required versions of system libs, then
    41       you can say 'Y' here, and all the host tools will be linked staticaly.
    42       
    43       The default is 'N', to build dynamicaly-linked host binaries.
    44       
    45       NOTE: this has no connection to whether the target libraries will be
    46       dynamic or static. This only applies to the tools themselves.
    47 
    48 comment "Tuple completion and aliasing"
    49 
    50 config TARGET_VENDOR
    51     string
    52     prompt "Tuple's vendor string"
    53     default "unknown"
    54     help
    55       Vendor part of the target tuple.
    56       
    57       A tuple is of the form arch-vendor-kernel-system.
    58       You can set the second part, vendor, to whatever you see fit.
    59       Use a single word, or use underscores "_" to separate words.
    60       Use neither dash nor space, as it breaks things.
    61       
    62       Keep the default (unknown) if you don't know better.
    63 
    64 config TARGET_ALIAS_SED_EXPR
    65     string
    66     prompt "Tuple's sed transform"
    67     default ""
    68     help
    69       Normaly, you'd call your toolchain components (especially gcc) by
    70       prefixing the target tuple followed by a dash and the component name
    71       (eg. armeb-unknown-linux-uclibc-gcc).
    72       
    73       You can enter here a sed expression to be applied to ${CT_TARGET} to
    74       create an alias for your toolchain.
    75       
    76       For example, "s/${CT_TARGET_VENDOR}/foobar/" (without the double quotes)
    77       will create the armeb-foobar-linux-uclibc alias to the above-mentioned
    78       toolchain.
    79       
    80       You shouldn't need to enter anything here, unless you plan to manually
    81       call the tools (autotools-based ./configure will use the standard name).
    82 
    83 config TARGET_ALIAS
    84     string
    85     prompt "Tuple's alias"
    86     default ""
    87     help
    88       Normaly, you'd call your toolchain components (especially gcc) by
    89       prefixing the target tuple followed by a dash and the component name
    90       (eg. armeb-unknown-linux-uclibc-gcc).
    91       
    92       You can enter a shortcut here. This string will be used to create
    93       symbolic links to the toolchain tools (eg. if you enter "foo-bar" here,
    94       then gcc for your toolchain will also be available as "foo-bar-gcc" along
    95       with the original name).
    96       
    97       You shouldn't need to enter anything here, unless you plan to manually
    98       call the tools (autotools-based ./configure will use the standard name).
    99 
   100 comment "Toolchain type"
   101 
   102 choice
   103     bool
   104     prompt "Type"
   105     default CROSS
   106 
   107 config NATIVE
   108     bool
   109     prompt "Native       (NO CODE!) (EXPERIMENTAL)"
   110     depends on EXPERIMENTAL
   111     help
   112       Build a native toolchain.
   113       See docs/overview.txt
   114 
   115 config CROSS
   116     bool
   117     prompt "Cross"
   118     help
   119       Build a cross-toolchain.
   120       See docs/overview.txt
   121 
   122 config CROSS_NATIVE
   123     bool
   124     prompt "Cross-native (NO CODE!) (EXPERIMENTAL)"
   125     depends on EXPERIMENTAL
   126     help
   127       Build a cross-native toolchain.
   128       See docs/overview.txt
   129 
   130 config CANADIAN
   131     bool
   132     prompt "Canadian     (EXPERIMENTAL)"
   133     depends on EXPERIMENTAL
   134     help
   135       Build a canadian-toolchain.
   136       See docs/overview.txt
   137 
   138 endchoice
   139 
   140 config TOOLCHAIN_TYPE
   141     string
   142     default "native"        if NATIVE
   143     default "cross"         if CROSS
   144     default "cross-native"  if CROSS_NATIVE
   145     default "canadian"      if CANADIAN
   146 
   147 comment "Build system"
   148 
   149 config BUILD 
   150     string
   151     prompt "|  Tuple        (READ HELP!)"
   152     default ""
   153     help
   154       Canonical name of the machine building the toolchain.
   155       You should leave empty, unless you really now what you're doing.
   156 
   157 config BUILD_PREFIX
   158     string
   159     prompt "|  Tools prefix (READ HELP!)"
   160     default ""
   161     help
   162       If you have your *build system* tools in a weird location, and/or
   163       they have an unusual prefix, enter it here.
   164       
   165       Usually, you should leave that empty!
   166       
   167       Eg.:
   168         If your *build* gcc is /opt/build-tools/bin/weird-gcc then you
   169         should enter:
   170             /opt/build-tools/bin/weird-
   171         
   172         If your *build* gcc is /opt/build-tools/bin/weird-gcc and
   173         /opt/build-tools/bin is in your PATH, you should enter:
   174             weird-
   175         
   176         If your *build* gcc is /opt/build-tools/bin/gcc then you
   177         should enter (do not forget to add the trailing '/'):
   178             /opt/build-tools/bin/
   179 
   180 config BUILD_SUFFIX
   181     string
   182     prompt "|  Tools suffix (READ HELP!)"
   183     default ""
   184     help
   185       If your *build system* tools have an unusual suffix, enter it
   186       here.
   187       
   188       Usually, you should leave that empty!
   189       
   190       Eg.:
   191         If your 'default' gcc is gcc 4.3.1, but you also have gcc-3.4.2
   192         installed as gcc-3.4, then you should enter:
   193             -3.4
   194       
   195       It can happen that some of the tools have a suffix, when others
   196       don't, eg. you can have 'gcc-3.4' and 'ar'. crosstool-NG accounts
   197       for that by checking the tools without the suffix in case it can
   198       not find some of the tool.
   199 
   200 if CANADIAN
   201 
   202 comment "Host system"
   203 
   204 config HOST
   205     string
   206     prompt "|  Tuple        (READ HELP!)"
   207     default ""
   208     help
   209       Canonical name of the machine running the toolchain.
   210 
   211 config HOST_PREFIX
   212     string
   213     prompt "|  Tools prefix (READ HELP!)"
   214     default ""
   215     help
   216       If you have your *host system* tools in a weird location, and/or
   217       they have an unusual prefix, enter it here.
   218       
   219       Usually, you should leave that empty!
   220       
   221       Eg.:
   222         If your *host* gcc is /opt/host-tools/bin/weird-gcc then you
   223         should enter:
   224             /opt/host-tools/bin/weird-
   225         
   226         If your *host* gcc is /opt/host-tools/bin/weird-gcc and
   227         /opt/host-tools/bin is in your PATH, you should enter:
   228             weird-
   229         
   230         If your *host* gcc is /opt/host-tools/bin/gcc then you
   231         should enter (do not forget to add the trailing '/'):
   232             /opt/host-tools/bin/
   233 
   234 config HOST_SUFFIX
   235     string
   236     prompt "|  Tools suffix (READ HELP!)"
   237     default ""
   238     help
   239       If your *host system* tools have an unusual suffix, enter it
   240       here.
   241       
   242       Usually, you should leave that empty!
   243       
   244       Eg.:
   245         If your 'default' gcc is gcc 4.3.1, but you also have gcc-3.4.2
   246         installed as gcc-3.4, then you should enter:
   247             -3.4
   248       
   249       It can happen that some of the tools have a suffix, when others
   250       don't, eg. you can have 'gcc-3.4' and 'ar'. crosstool-NG accounts
   251       for that by checking the tools without the suffix in case it can
   252       not find some of the tool.
   253 
   254 endif # CANADIAN
   255 
   256 if CROSS_NATIVE || CANADIAN
   257 
   258 comment "Target system"
   259 
   260 config TARGET_PREFIX
   261     string
   262     prompt "|  Tools prefix (READ HELP!)"
   263     default ""
   264     help
   265       If you have your *target system* tools in a weird location, and/or
   266       they have an unusual prefix, enter it here.
   267       
   268       Usually, you should leave that empty!
   269       
   270       Eg.:
   271         If your *target* gcc is /opt/target-tools/bin/weird-gcc then you
   272         should enter:
   273             /opt/target-tools/bin/weird-
   274         
   275         If your *target* gcc is /opt/target-tools/bin/weird-gcc and
   276         /opt/target-tools/bin is in your PATH, you should enter:
   277             weird-
   278         
   279         If your *target* gcc is /opt/target-tools/bin/gcc then you
   280         should enter (do not forget to add the trailing '/'):
   281             /opt/target-tools/bin/
   282 
   283 config TARGET_SUFFIX
   284     string
   285     prompt "|  Tools suffix (READ HELP!)"
   286     default ""
   287     help
   288       If your *target system* tools have an unusual suffix, enter it
   289       here.
   290       
   291       Usually, you should leave that empty!
   292       
   293       Eg.:
   294         If your 'default' gcc is gcc 4.3.1, but you also have gcc-3.4.2
   295         installed as gcc-3.4, then you should enter:
   296             -3.4
   297       
   298       It can happen that some of the tools have a suffix, when others
   299       don't, eg. you can have 'gcc-3.4' and 'ar'. crosstool-NG accounts
   300       for that by checking the tools without the suffix in case it can
   301       not find some of the tool.
   302 
   303 endif # CROSS_NATIVE || CANADIAN
   304 
   305 endmenu