config/toolchain.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Jan 25 20:31:16 2011 +0100 (2011-01-25)
changeset 2279 a559d9890c02
parent 2227 5158aa602e58
child 2281 1333e4ac89f0
permissions -rw-r--r--
config: add an option to name the sysroot directory

Depending on local policies, some users have expressed a need to
have the sysroot be named differently than the hard-coded name.

Add an option for that.
Default to 'sysroot' to match the existing literature.

While at it, replace 'sys-root' with 'sysroot' everywhere we
reference the sysroot.

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