config/global.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu Apr 17 18:07:26 2008 +0000 (2008-04-17)
changeset 442 ab046c11fbf7
parent 441 f1326505e3e5
child 445 17aa08b441f2
permissions -rw-r--r--
Add an option to use a SOCKS 4/5 proxy to connect to the internet.
As for the HTTP proxy, this is completetly untested, as I have no such proxy at home.

scripts/crosstool.sh | 45 31 14 0 +++++++++++++++++--------
config/global.in | 95 81 14 0 +++++++++++++++++++++++++++++++++++++++++++--------
2 files changed, 112 insertions(+), 28 deletions(-)
yann@1
     1
# Overall toolchain configuration: paths, jobs, etc...
yann@1
     2
yann@121
     3
# Ah, this option is here to break the dependency tracking, and allow
yann@121
     4
# dependent option to line-up with the options they depend on ,rather
yann@121
     5
# than being indented
yann@244
     6
# Use it to intersperse two config options depending one on the other,
yann@244
     7
# but don't want the second to be indented (for example because you have
yann@244
     8
# a comment between the two to separate them). See DOWNLOAD and EXTRACT
yann@244
     9
# options to see how it is used.
yann@121
    10
config FOOBAR
yann@121
    11
    bool
yann@121
    12
    default n
yann@121
    13
yann@1
    14
menu "Paths and misc options"
yann@1
    15
yann@197
    16
comment "crosstool-NG behavior"
yann@121
    17
yann@244
    18
config OBSOLETE
yann@244
    19
    bool
yann@244
    20
    prompt "Use obsolete features"
yann@244
    21
    default n
yann@244
    22
    help
yann@244
    23
      If you set this to Y, you will be able to select obsolete features.
yann@244
    24
      
yann@244
    25
      Such obsolete features are the use of old kernel headers, old
yann@244
    26
      gcc versions, etc...
yann@244
    27
yann@41
    28
config EXPERIMENTAL
yann@41
    29
    bool
yann@41
    30
    prompt "Try features marked as EXPERIMENTAL"
yann@41
    31
    default n
yann@41
    32
    help
yann@41
    33
      If you set this to Y, then you will be able to try very experimental
yann@41
    34
      features.
yann@41
    35
      
yann@41
    36
      Experimental features can be one of:
yann@41
    37
        - working, in which case you should tell me it is!
yann@41
    38
        - buggy, in which case you could try patching and send me the result
yann@41
    39
        - unfinished, in which case you could try hacking it and send me the result
yann@384
    40
        - non-existant, in which case you could also try hacking it in and send me
yann@384
    41
          the result
yann@41
    42
yann@244
    43
config BROKEN
yann@61
    44
    bool
yann@244
    45
    prompt "Try broken stuff"
yann@61
    46
    default n
yann@244
    47
    depends on EXPERIMENTAL
yann@61
    48
    help
yann@244
    49
      Select this if you want to _debug_ broken stuff.
yann@61
    50
yann@121
    51
config DEBUG_CT
yann@121
    52
    bool
yann@121
    53
    prompt "Debug crosstool-NG"
yann@121
    54
    default n
yann@121
    55
    help
yann@121
    56
      Say 'y' here to get some debugging options
yann@121
    57
yann@121
    58
if DEBUG_CT
yann@121
    59
yann@121
    60
config DEBUG_CT_PAUSE_STEPS
yann@121
    61
    bool
yann@121
    62
    prompt "Pause between every steps"
yann@121
    63
    default n
yann@121
    64
    help
yann@121
    65
      Say 'y' if you intend to attend the build, and want to investigate
yann@121
    66
      the result of each steps before running the next one.
yann@121
    67
yann@121
    68
config DEBUG_CT_SAVE_STEPS
yann@121
    69
    bool
yann@121
    70
    prompt "Save intermediate steps"
yann@121
    71
    default n
yann@121
    72
    help
yann@121
    73
      If you say 'y' here, then you will be able to restart crosstool-NG at
yann@168
    74
      any step.
yann@121
    75
      
yann@121
    76
      It is not currently possible to rstart at any of the debug facility.
yann@168
    77
      They are treated as a whole.
yann@168
    78
yann@168
    79
      See docs/overview.txt for the list of steps.
yann@121
    80
yann@121
    81
config DEBUG_CT_SAVE_STEPS_GZIP
yann@121
    82
    bool
yann@121
    83
    prompt "gzip saved states"
yann@121
    84
    default y
yann@121
    85
    depends on DEBUG_CT_SAVE_STEPS
yann@121
    86
    help
yann@121
    87
      If you are tight on space, then you can ask to gzip the saved states
yann@121
    88
      tarballs. On the other hand, this takes some longer time...
yann@121
    89
      
yann@121
    90
      To lose as less time as possible, the gzip process is done with a low
yann@121
    91
      compression ratio (-3), which gives roughly 70% gain in size. Going
yann@121
    92
      further doesn't gain much, and takes far more time (believe me, I've
yann@121
    93
      got figures here! :-) ).
yann@121
    94
yann@121
    95
endif
yann@121
    96
yann@121
    97
comment "Build behavior"
yann@121
    98
yann@1
    99
config PARALLEL_JOBS
yann@1
   100
    int
yann@1
   101
    prompt "Number of parallel jobs"
yann@1
   102
    default 1
yann@1
   103
    help
yann@1
   104
      Number of jobs make will be allowed to run concurently.
yann@1
   105
      Set this higher than the number of processors you have, but not too high.
yann@1
   106
      A good rule of thumb is twice the number of processors you have.
yann@1
   107
      
yann@1
   108
      Enter 1 (or 0) to have only one job at a time.
yann@1
   109
yann@1
   110
config LOAD
yann@1
   111
    int
yann@1
   112
    prompt "Maximum allowed load"
yann@1
   113
    default 0
yann@1
   114
    help
yann@1
   115
      Specifies that no new jobs should be started if there are others jobs
yann@1
   116
      running and the load average is at least this value.
yann@1
   117
      
yann@1
   118
      Makes sense on SMP machines only.
yann@1
   119
      
yann@1
   120
      Enter 0 to have no limit on the load average.
yann@1
   121
      
yann@1
   122
      Note: only the integer part of the load is allowed here (you can't enter
yann@1
   123
            0.75 for example).
yann@1
   124
yann@1
   125
config NICE
yann@1
   126
    int
yann@1
   127
    prompt "Nice level"
yann@1
   128
    default 0
yann@1
   129
    range 0 19
yann@1
   130
    help
yann@1
   131
      Renices the build process up.
yann@1
   132
yann@1
   133
config USE_PIPES
yann@1
   134
    bool
yann@1
   135
    prompt "Use -pipe"
yann@1
   136
    default y
yann@1
   137
    help
yann@1
   138
      Use gcc's option -pipe to use pipes rather than temp files when building
yann@1
   139
      the toolchain.
yann@1
   140
yann@1
   141
comment "Paths"
yann@1
   142
yann@85
   143
config LOCAL_TARBALLS_DIR
yann@1
   144
    string
yann@85
   145
    prompt "Local tarballs directory"
yann@85
   146
    default ""
yann@1
   147
    help
yann@85
   148
      If you have previously downloaded the tarballs, enter the PATH where
yann@85
   149
      you stored them here.
yann@31
   150
yann@265
   151
config SAVE_TARBALLS
yann@265
   152
    bool
yann@265
   153
    prompt "Save new tarballs"
yann@265
   154
    default n
yann@265
   155
    depends on LOCAL_TARBALLS_DIR != ""
yann@265
   156
    help
yann@425
   157
      If you say 'y' here, new downloaded tarballs will be saved in the
yann@265
   158
      directory you entered above.
yann@265
   159
yann@1
   160
config PREFIX_DIR
yann@1
   161
    string
yann@1
   162
    prompt "Prefix directory"
yann@1
   163
    default "${HOME}/${CT_TARGET}"
yann@1
   164
    help
yann@1
   165
      This is the path the toolchain will run from.
yann@1
   166
yann@1
   167
config INSTALL_DIR
yann@1
   168
    string
yann@1
   169
#    prompt "Install directory"
yann@1
   170
    default "${CT_PREFIX_DIR}"
yann@1
   171
#    help
yann@1
   172
#      This is the path the target will be installed into.
yann@1
   173
#      
yann@1
   174
#      Normally, you would set this to ${CT_PREFIX_DIR}, but if for some reasons
yann@1
   175
#      you can't write there, you can install somewhere else and have a third
yann@1
   176
#      person do the install for you.
yann@1
   177
#      The reason you might also want to install elsewhere is if you are going
yann@1
   178
#      to package your shinny new toolchain for distribution.
yann@1
   179
yann@1
   180
config CUSTOM_PATCH
yann@1
   181
    bool
yann@1
   182
    prompt "Use custom patch directory"
yann@1
   183
    default n
yann@1
   184
    help
yann@1
   185
      If you have custom patches that you want to be applied, say 'Y' here and
yann@1
   186
      enter the path directory below.
yann@1
   187
      
yann@1
   188
      Note that you must ensure that the patch directory is arranged the same
yann@1
   189
      way the official directory is.
yann@1
   190
yann@1
   191
config CUSTOM_PATCH_ONLY
yann@1
   192
    bool
yann@1
   193
    prompt "Only use custom patches"
yann@1
   194
    default n
yann@1
   195
    depends on CUSTOM_PATCH
yann@1
   196
    help
yann@197
   197
      Don't apply patches coming with crosstool-NG, only those patches available
yann@197
   198
      in the directory below.
yann@1
   199
      
yann@197
   200
      If you say 'N' here, then the patches provided with crosstool-NG will be
yann@197
   201
      applied first, and then your patches.
yann@1
   202
yann@1
   203
config CUSTOM_PATCH_DIR
yann@1
   204
    string
yann@1
   205
    prompt "Custom patch directory"
yann@1
   206
    default ""
yann@1
   207
    depends on CUSTOM_PATCH
yann@1
   208
    help
yann@1
   209
      Enter the custom patch directory here.
yann@1
   210
yann@14
   211
config REMOVE_DOCS
yann@14
   212
    bool
yann@14
   213
    prompt "Remove documentation"
yann@14
   214
    default n
yann@14
   215
    help
yann@14
   216
      Remove the installed documentation (man and info pages).
yann@14
   217
      Gains around 8MiB for a uClibc-based, C and C++ compiler.
yann@14
   218
yann@174
   219
config INSTALL_DIR_RO
yann@174
   220
    bool
yann@174
   221
    prompt "Render the toolchain read-only"
yann@174
   222
    default n
yann@174
   223
    help
yann@174
   224
      Render the directory of the toolchain (and its sub-directories)
yann@174
   225
      read-only.
yann@174
   226
      
yann@174
   227
      Usefull for toolchains destined for production.
yann@174
   228
yann@63
   229
comment "Downloading"
yann@1
   230
yann@63
   231
config FORCE_DOWNLOAD
yann@1
   232
    bool
yann@63
   233
    prompt "Force downloads"
yann@1
   234
    default n
yann@1
   235
    help
yann@63
   236
      Force downloading tarballs, even if one already exists.
yann@63
   237
      
yann@63
   238
      Usefull if you suspect a tarball to be damaged.
yann@1
   239
yann@1
   240
config ONLY_DOWNLOAD
yann@1
   241
    bool
yann@63
   242
    prompt "Stop after downloading tarballs"
yann@1
   243
    default n
yann@1
   244
    help
yann@1
   245
      Only download the tarballs. Exit once it done.
yann@1
   246
      
yann@1
   247
      Usefull to pre-retrieve the tarballs before going off-line.
yann@1
   248
yann@441
   249
choice
yann@441
   250
    bool
yann@441
   251
    prompt "Proxy type"
yann@441
   252
    default USE_NO_PROXY
yann@441
   253
yann@442
   254
config PROXY_TYPE_NONE
yann@441
   255
    bool
yann@441
   256
    prompt "No proxy"
yann@441
   257
    help
yann@441
   258
      Select this option if you have a direct connection to the internet,
yann@441
   259
      or if you already set the environment adequately.
yann@441
   260
yann@442
   261
config PROXY_TYPE_HTTP
yann@441
   262
    bool
yann@441
   263
    prompt "HTTP proxy"
yann@441
   264
    help
yann@441
   265
      Use an HTTP proxy to connect to to the internet.
yann@442
   266
      Only the http and ftp protocols will be tunneled through this
yann@441
   267
      proxy.
yann@441
   268
yann@442
   269
      Alternatively to setting this option, you can set and export the
yann@442
   270
      following variables in your environment:
yann@441
   271
        ftp_proxy=http://user:passwd@proxy.server:port/
yann@441
   272
        http_proxy=http://user:passwd@proxy.server:port/
yann@441
   273
        https_proxy=http://user:passwd@proxy.server:port/
yann@441
   274
yann@441
   275
# Haha! Here is an interesting feature/bug of mconf!
yann@441
   276
# The following config entries will be shown out-side the
yann@441
   277
# choice menu!
yann@441
   278
# To add a third entry in the choice menu, add it after the
yann@441
   279
# if...endif conditional below, and so on for a fourth entry...
yann@442
   280
if PROXY_TYPE_HTTP
yann@441
   281
yann@442
   282
config PROXY_HOST
yann@441
   283
    string
yann@442
   284
    prompt "hostname/IP"
yann@441
   285
yann@442
   286
config PROXY_PORT
yann@441
   287
    int
yann@442
   288
    prompt "port"
yann@442
   289
    default 0
yann@441
   290
    
yann@442
   291
config PROXY_USER
yann@441
   292
    string
yann@442
   293
    prompt "user name"
yann@441
   294
yann@442
   295
config PROXY_PASS
yann@441
   296
    string
yann@442
   297
    prompt "password"
yann@441
   298
yann@441
   299
endif # USE_HTTP_PROXY
yann@441
   300
yann@442
   301
config PROXY_TYPE_SOCKS
yann@442
   302
    bool
yann@442
   303
    prompt "SOCKS 4/5 proxy"
yann@442
   304
    help
yann@442
   305
      Use a Socks 4/5 proxy to connect to the internet.
yann@442
   306
      All protocols can get tunneled through this kind of proxy (depending
yann@442
   307
      on your proxy configuration, so;e do not allow all protocols, but
yann@442
   308
      chances are that protocols needed by crosstool-NG are allowed).
yann@442
   309
yann@442
   310
      Alternatively to setting this option, you can set and export the
yann@442
   311
      following variable in your environment:
yann@442
   312
        LD_PRELOAD=/path/to/your/tsocks-library.so
yann@442
   313
yann@442
   314
      In any case, wether you set this option or you export the aforementionned
yann@442
   315
      variable, you will _have_ to  configure the /etc/tsocks.conf file
yann@442
   316
      accordingly to your network setup.
yann@442
   317
yann@442
   318
      This option makes use of the tsocks library. You will have to have tsocks
yann@442
   319
      installed on your system, of course.
yann@442
   320
yann@442
   321
      If you think you do not know what tsocks is, or how to configure it,
yann@442
   322
      chances are that you do not need to set this option.
yann@442
   323
yann@442
   324
if PROXY_TYPE_SOCKS
yann@442
   325
yann@442
   326
choice
yann@442
   327
    bool
yann@442
   328
    prompt "type"
yann@442
   329
    default PROXY_TYPE_SOCKS_5
yann@442
   330
yann@442
   331
config PROXY_TYPE_SOCKS_5
yann@442
   332
    bool
yann@442
   333
    prompt "SOCKS 5"
yann@442
   334
yann@442
   335
config PROXY_TYPE_SOCKS_4
yann@442
   336
    bool
yann@442
   337
    prompt "SOCKS 4"
yann@442
   338
yann@441
   339
endchoice
yann@441
   340
yann@442
   341
config PROXY_HOST
yann@442
   342
    string
yann@442
   343
    prompt "hostname/IP"
yann@442
   344
yann@442
   345
config PROXY_PORT
yann@442
   346
    int
yann@442
   347
    prompt "port"
yann@442
   348
    default 0
yann@442
   349
yann@442
   350
config PROXY_USER
yann@442
   351
    string
yann@442
   352
    prompt "user name"
yann@442
   353
yann@442
   354
config PROXY_PASS
yann@442
   355
    string
yann@442
   356
    prompt "password"
yann@442
   357
yann@442
   358
endif # USE_SOCKS_PROXY
yann@442
   359
yann@442
   360
endchoice
yann@442
   361
yann@442
   362
config PROXY_TYPE
yann@442
   363
    string
yann@442
   364
    default "none" if PROXY_TYPE_NONE
yann@442
   365
    default "HTTP" if PROXY_TYPE_HTTP
yann@442
   366
    default "socks5" if PROXY_TYPE_SOCKS_5
yann@442
   367
    default "socks4" if PROXY_TYPE_SOCKS_4
yann@442
   368
yann@441
   369
# Force restore indentation
yann@121
   370
config FOOBAR
yann@121
   371
yann@244
   372
if ! ONLY_DOWNLOAD
yann@244
   373
yann@63
   374
comment "Extracting"
yann@1
   375
yann@1
   376
config FORCE_EXTRACT
yann@1
   377
    bool
yann@1
   378
    prompt "Force extractions"
yann@1
   379
    default n
yann@1
   380
    help
yann@1
   381
      Force extraction of already exctracted tarballs.
yann@1
   382
      
yann@1
   383
      Usefull if you suspect a previous extract did not complete (eg. broken
yann@1
   384
      tarball), or you added a new set of patches for this component.
yann@1
   385
yann@63
   386
config ONLY_EXTRACT
yann@63
   387
    bool
yann@63
   388
    prompt "Stop after extracting tarballs"
yann@63
   389
    default n
yann@63
   390
    help
yann@63
   391
      Exit after unpacking and patching tarballs.
yann@63
   392
      
yann@63
   393
      Usefull to look at the code before doing the build itself.
yann@63
   394
yann@244
   395
endif # ! ONLY_DOWNLOAD
yann@244
   396
yann@1
   397
comment "Logging"
yann@1
   398
yann@1
   399
choice
yann@1
   400
    bool
yann@1
   401
    prompt "Maximum log level to see:"
yann@252
   402
    default LOG_INFO if !DEBUG_CT
yann@252
   403
    default LOG_DEBUG if DEBUG_CT
yann@1
   404
yann@1
   405
config LOG_ERROR
yann@1
   406
    bool
yann@1
   407
    prompt "ERROR"
yann@1
   408
    help
yann@1
   409
      The build will be silent.
yann@174
   410
      Only if there is an error will you see a message.
yann@1
   411
yann@1
   412
config LOG_WARN
yann@1
   413
    bool
yann@1
   414
    prompt "WARN"
yann@1
   415
    help
yann@1
   416
      The same as above, plus warnings.
yann@1
   417
yann@1
   418
config LOG_INFO
yann@1
   419
    bool
yann@1
   420
    prompt "INFO"
yann@1
   421
    help
yann@1
   422
      The same as above, plus informational messages (main steps).
yann@1
   423
yann@1
   424
config LOG_EXTRA
yann@1
   425
    bool
yann@1
   426
    prompt "EXTRA"
yann@1
   427
    help
yann@1
   428
      The same as above, plus extra messages (sub-steps).
yann@1
   429
yann@1
   430
config LOG_DEBUG
yann@1
   431
    bool
yann@1
   432
    prompt "DEBUG"
yann@1
   433
    help
yann@78
   434
      The same as above, plus lots of crosstool-NG debug information.
yann@78
   435
yann@78
   436
config LOG_ALL
yann@78
   437
    bool
yann@78
   438
    prompt "ALL"
yann@78
   439
    help
yann@78
   440
      The same as above, plus all components build messages (very noisy!).
yann@1
   441
yann@1
   442
endchoice
yann@1
   443
yann@1
   444
config LOG_LEVEL_MAX
yann@1
   445
    string
yann@1
   446
    default "ERROR"   if LOG_ERROR
yann@1
   447
    default "WARN"    if LOG_WARN
yann@1
   448
    default "INFO"    if LOG_INFO
yann@1
   449
    default "EXTRA"   if LOG_EXTRA
yann@1
   450
    default "DEBUG"   if LOG_DEBUG
yann@78
   451
    default "ALL"     if LOG_ALL
yann@1
   452
yann@47
   453
config LOG_SEE_TOOLS_WARN
yann@47
   454
    bool
yann@174
   455
    prompt "Warnings from the tools' builds"
yann@47
   456
    default n
yann@47
   457
    depends on ! LOG_ERROR
yann@47
   458
    help
yann@197
   459
      Treat warnings from the different tools as crosstool-NG warnings.
yann@108
   460
      If you say 'y' here, then those warnings will be prefixed with
yann@108
   461
      '[WARN ]' instead of the default '[ALL  ]'.
yann@47
   462
yann@108
   463
      You can safely say 'n' here. Those warnings will anyway be
yann@108
   464
      recorded in the log file (provided you configured one).
yann@47
   465
yann@197
   466
      Tools error will always be logged as crosstool-NG errors.
yann@174
   467
yann@1
   468
config LOG_PROGRESS_BAR
yann@1
   469
    bool
yann@1
   470
    prompt "Progress bar"
yann@173
   471
    default y
yann@78
   472
    depends on ! LOG_ALL
yann@1
   473
    help
yann@112
   474
      If you say 'y' here, you'll be able to see the elapsed time.
yann@1
   475
      
yann@112
   476
      As a bonus, you'll also get a rotating bar (/-\|) showing you
yann@112
   477
      that the build is not stalled (the bar rotates 1/4 every 10 lines
yann@112
   478
      of components build log).
yann@112
   479
yann@112
   480
      Note that the elapsed time can stall for a little while if a
yann@112
   481
      component has long commands, as the elapsed time is only updated
yann@112
   482
      each line.
yann@1
   483
yann@1
   484
config LOG_TO_FILE
yann@1
   485
    bool
yann@1
   486
    prompt "Log to a file"
yann@1
   487
    default y
yann@1
   488
    help
yann@1
   489
      Save *full* logs to a file. Even log levels you didn't specify above
yann@174
   490
      will be available in this file. The log file will be named build.log
yann@174
   491
      and stored in the toolchain prefix dir (set above).
yann@1
   492
yann@47
   493
      As a bonus, there is a script in tools/extractConfig.sh that is able
yann@47
   494
      to extract the configuration of crosstool-NG from the log file.
yann@47
   495
yann@47
   496
      Definitely, say Y.
yann@47
   497
yann@174
   498
config LOG_FILE_COMPRESS
yann@174
   499
    bool
yann@174
   500
    prompt "Compress the log file"
yann@174
   501
    default n
yann@1
   502
    depends on LOG_TO_FILE
yann@1
   503
    help
yann@174
   504
      Compress the log file once the toolchain is successfully built.
yann@1
   505
yann@1
   506
endmenu