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