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