config/toolchain.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Dec 09 22:02:20 2008 +0000 (2008-12-09)
changeset 1094 c6a08b4c488c
parent 1041 2573519c00d6
child 1219 2b875ed306c2
permissions -rw-r--r--
Sanity-check CT_TARGET_VENDOR, CT_TARGET_ALIAS and CT_TARGET_ALIAS_SED_EXPR:
- vendor and alias must not contain spaces
- vendor must not contain dashes '-'
- sed_expr must not generate an alias with a space in it

/trunk/scripts/functions | 17 16 1 0 ++++++++++++++++-
/trunk/config/toolchain.in | 1 1 0 0 +
2 files changed, 17 insertions(+), 1 deletion(-)
     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 SHARED_LIBS
    16     bool
    17     prompt "Build shared libraries"
    18     depends on ! BARE_METAL
    19     default y
    20     help
    21       Say 'y' here, unless you don't want shared libraries.
    22       
    23       You might not want shared libraries if you're building for a target that
    24       don't support it (maybe some nommu targets, for example, or bare metal).
    25 
    26 config TARGET_VENDOR
    27     string
    28     prompt "Vendor string"
    29     default "unknown"
    30     help
    31       Vendor part of the target tuple.
    32       
    33       A tuple is of the form arch-vendor-kernel-system.
    34       You can set the second part, vendor, to whatever you see fit.
    35       Use a single word, or use underscores "_" to separate words.
    36       Use neither dash nor space, as it breaks things.
    37       
    38       Keep the default (unkown) if you don't know better.
    39 
    40 config TARGET_ALIAS_SED_EXPR
    41     string
    42     prompt "Target sed transform"
    43     default ""
    44     help
    45       Normaly, you'd call your toolchain components (especially gcc) by
    46       prefixing the target tuple followed by a dash and the component name
    47       (eg. armeb-unknown-linux-uclibc-gcc).
    48       
    49       You can enter here a sed expression to be applied to ${CT_TARGET} to
    50       create an alias for your toolchain.
    51       
    52       For example, "s/${CT_TARGET_VENDOR}/foobar/" (without the double quotes)
    53       will create the armeb-foobar-linux-uclibc alias to the above-mentioned
    54       toolchain.
    55       
    56       You shouldn't need to enter anything here, unless you plan to manually
    57       call the tools (autotools-based ./configure will use the standard name).
    58 
    59 config TARGET_ALIAS
    60     string
    61     prompt "Target alias"
    62     default ""
    63     help
    64       Normaly, you'd call your toolchain components (especially gcc) by
    65       prefixing the target tuple followed by a dash and the component name
    66       (eg. armeb-unknown-linux-uclibc-gcc).
    67       
    68       You can enter a shortcut here. This string will be used to create
    69       symbolic links to the toolchain tools (eg. if you enter "foo-bar" here,
    70       then gcc for your toolchain will also be available as "foo-bar-gcc" along
    71       with the original name).
    72       
    73       You shouldn't need to enter anything here, unless you plan to manually
    74       call the tools (autotools-based ./configure will use the standard name).
    75 
    76 comment "Toolchain type"
    77 
    78 choice
    79     bool
    80     prompt "Type"
    81     default CROSS
    82 
    83 config NATIVE
    84     bool
    85     prompt "Native       (NO CODE!) (EXPERIMENTAL)"
    86     depends on EXPERIMENTAL
    87     help
    88       Build a native toolchain.
    89       See docs/overview.txt
    90 
    91 config CROSS
    92     bool
    93     prompt "Cross"
    94     help
    95       Build a cross-toolchain.
    96       See docs/overview.txt
    97 
    98 config CROSS_NATIVE
    99     bool
   100     prompt "Cross-native (NO CODE!) (EXPERIMENTAL)"
   101     depends on EXPERIMENTAL
   102     help
   103       Build a cross-native toolchain.
   104       See docs/overview.txt
   105 
   106 config CANADIAN
   107     bool
   108     prompt "Canadian     (NO CODE!) (EXPERIMENTAL)"
   109     depends on EXPERIMENTAL
   110     help
   111       Build a canadian-toolchain.
   112       See docs/overview.txt
   113 
   114 endchoice
   115 
   116 config TOOLCHAIN_TYPE
   117     string
   118     default "native"        if NATIVE
   119     default "cross"         if CROSS
   120     default "cross-native"  if CROSS_NATIVE
   121     default "canadian"      if CANADIAN
   122 
   123 comment "Build system"
   124 
   125 config BUILD 
   126     string
   127     prompt "|  Tuple        (READ HELP!)"
   128     default ""
   129     help
   130       Canonical name of the machine building the toolchain.
   131       You should leave empty, unless you really now what you're doing.
   132 
   133 config BUILD_PREFIX
   134     string
   135     prompt "|  Tools prefix (READ HELP!)"
   136     default ""
   137     help
   138       If you have your *build system* tools in a weird location, and/or
   139       they have an unusual prefix, enter it here.
   140       
   141       Usually, you should leave that empty!
   142       
   143       Eg.:
   144         If your *build* gcc is /opt/build-tools/bin/weird-gcc then you
   145         should enter:
   146             /opt/build-tools/bin/weird-
   147         
   148         If your *build* gcc is /opt/build-tools/bin/weird-gcc and
   149         /opt/build-tools/bin is in your PATH, you should enter:
   150             weird-
   151         
   152         If your *build* gcc is /opt/build-tools/bin/gcc then you
   153         should enter (do not forget to add the trailing '/'):
   154             /opt/build-tools/bin/
   155 
   156 config BUILD_SUFFIX
   157     string
   158     prompt "|  Tools suffix (READ HELP!)"
   159     default ""
   160     help
   161       If your *build system* tools have an unusual suffix, enter it
   162       here.
   163       
   164       Usually, you should leave that empty!
   165       
   166       Eg.:
   167         If your 'default' gcc is gcc 4.3.1, but you also have gcc-3.4.2
   168         installed as gcc-3.4, then you should enter:
   169             -3.4
   170       
   171       It can happen that some of the tools have a suffix, when others
   172       don't, eg. you can have 'gcc-3.4' and 'ar'. crosstool-NG accounts
   173       for that by checking the tools without the suffix in case it can
   174       not find some of the tool.
   175 
   176 if CANADIAN
   177 
   178 comment "Host system"
   179 
   180 config HOST
   181     string
   182     prompt "|  Tuple        (READ HELP!)"
   183     default ""
   184     help
   185       Canonical name of the machine running the toolchain.
   186 
   187 config HOST_PREFIX
   188     string
   189     prompt "|  Tools prefix (READ HELP!)"
   190     default ""
   191     help
   192       If you have your *host system* tools in a weird location, and/or
   193       they have an unusual prefix, enter it here.
   194       
   195       Usually, you should leave that empty!
   196       
   197       Eg.:
   198         If your *host* gcc is /opt/host-tools/bin/weird-gcc then you
   199         should enter:
   200             /opt/host-tools/bin/weird-
   201         
   202         If your *host* gcc is /opt/host-tools/bin/weird-gcc and
   203         /opt/host-tools/bin is in your PATH, you should enter:
   204             weird-
   205         
   206         If your *host* gcc is /opt/host-tools/bin/gcc then you
   207         should enter (do not forget to add the trailing '/'):
   208             /opt/host-tools/bin/
   209 
   210 config HOST_SUFFIX
   211     string
   212     prompt "|  Tools suffix (READ HELP!)"
   213     default ""
   214     help
   215       If your *host system* tools have an unusual suffix, enter it
   216       here.
   217       
   218       Usually, you should leave that empty!
   219       
   220       Eg.:
   221         If your 'default' gcc is gcc 4.3.1, but you also have gcc-3.4.2
   222         installed as gcc-3.4, then you should enter:
   223             -3.4
   224       
   225       It can happen that some of the tools have a suffix, when others
   226       don't, eg. you can have 'gcc-3.4' and 'ar'. crosstool-NG accounts
   227       for that by checking the tools without the suffix in case it can
   228       not find some of the tool.
   229 
   230 endif # CANADIAN
   231 
   232 if CROSS_NATIVE || CANADIAN
   233 
   234 comment "Target system"
   235 
   236 config TARGET_PREFIX
   237     string
   238     prompt "|  Tools prefix (READ HELP!)"
   239     default ""
   240     help
   241       If you have your *target system* tools in a weird location, and/or
   242       they have an unusual prefix, enter it here.
   243       
   244       Usually, you should leave that empty!
   245       
   246       Eg.:
   247         If your *target* gcc is /opt/target-tools/bin/weird-gcc then you
   248         should enter:
   249             /opt/target-tools/bin/weird-
   250         
   251         If your *target* gcc is /opt/target-tools/bin/weird-gcc and
   252         /opt/target-tools/bin is in your PATH, you should enter:
   253             weird-
   254         
   255         If your *target* gcc is /opt/target-tools/bin/gcc then you
   256         should enter (do not forget to add the trailing '/'):
   257             /opt/target-tools/bin/
   258 
   259 config TARGET_SUFFIX
   260     string
   261     prompt "|  Tools suffix (READ HELP!)"
   262     default ""
   263     help
   264       If your *target system* tools have an unusual suffix, enter it
   265       here.
   266       
   267       Usually, you should leave that empty!
   268       
   269       Eg.:
   270         If your 'default' gcc is gcc 4.3.1, but you also have gcc-3.4.2
   271         installed as gcc-3.4, then you should enter:
   272             -3.4
   273       
   274       It can happen that some of the tools have a suffix, when others
   275       don't, eg. you can have 'gcc-3.4' and 'ar'. crosstool-NG accounts
   276       for that by checking the tools without the suffix in case it can
   277       not find some of the tool.
   278 
   279 endif # CROSS_NATIVE || CANADIAN
   280 
   281 endmenu