config/cc.in
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Dec 13 23:32:39 2011 +0100 (2011-12-13)
branch1.13
changeset 2847 c0bf2319af08
parent 2484 d1a8c2ae7946
child 3131 bd172b161ff8
permissions -rw-r--r--
scripts: fix dumping execution backtrace

Dumping the backtrace has been broken since changeset #652e56d6d35a:
scripts: execute each steps in a subshell

We can spawn sub-sub-shells in some cases.

The way the fault handler works is to dump the backtrace, but to avoid
printing it once for every sub-shell (which could get quite confusing),
it simply exits when it detects that it is being run in a sub-shell,
leaving to the top-level shell the work to dump the backtrace.

Because each step is executed in its own sub-shell, the variable arrays
that contain the step name, the source file and line number, are lost
when exiting the per-step sub-shell.

Hence, the backtrace is currently limited to printing only the top-level
main procedure of the shell.

Fix this thus:
- when dumping the bckatraces for the steps & the functions, remember
it was dumped, and only dump it if it was not already dumped
- at the top-level shell, print the hints

Also, rename the top-level step label.

Reported-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
(transplanted from 4193d6e6a17430a177fa88c287879c2c35e319f3)
yann@1
     1
# Compiler options
yann@1
     2
yann@1
     3
menu "C compiler"
yann@1
     4
yann@923
     5
config CC
yann@923
     6
    string
yann@1
     7
yann@1
     8
config CC_VERSION
yann@1
     9
    string
yann@1
    10
yann@1870
    11
source "config.gen/cc.in"
yann@1
    12
yann@1
    13
config CC_SUPPORT_CXX
yann@1
    14
    bool
yann@1
    15
yann@1
    16
config CC_SUPPORT_FORTRAN
yann@1
    17
    bool
yann@1
    18
yann@1
    19
config CC_SUPPORT_JAVA
yann@1
    20
    bool
yann@1
    21
yann@1
    22
config CC_SUPPORT_ADA
yann@1
    23
    bool
yann@1
    24
yann@1
    25
config CC_SUPPORT_OBJC
yann@1
    26
    bool
yann@1
    27
yann@1
    28
config CC_SUPPORT_OBJCXX
yann@1
    29
    bool
yann@1
    30
yann@425
    31
comment "Additional supported languages:"
yann@1
    32
yann@1
    33
config CC_LANG_CXX
yann@1
    34
    bool
yann@1
    35
    prompt "C++"
yann@1
    36
    depends on CC_SUPPORT_CXX
yann@1
    37
    help
yann@346
    38
      Enable building a C++ compiler.
yann@346
    39
yann@346
    40
      Only select this if you know that your specific version of the
yann@346
    41
      compiler supports this language.
yann@1
    42
yann@1107
    43
if ! BARE_METAL
yann@1107
    44
yann@1
    45
config CC_LANG_FORTRAN
yann@1
    46
    bool
yann@1
    47
    prompt "Fortran"
yann@1
    48
    depends on CC_SUPPORT_FORTRAN
yann@1
    49
    help
yann@346
    50
      Enable building a FORTRAN compiler.
yann@346
    51
yann@346
    52
      Only select this if you know that your specific version of the
yann@346
    53
      compiler supports this language.
yann@1
    54
yann@1
    55
config CC_LANG_JAVA
yann@1
    56
    bool
yann@1
    57
    prompt "Java"
yann@1
    58
    depends on CC_SUPPORT_JAVA
yann@1
    59
    help
yann@346
    60
      Enable building a Java compiler.
yann@346
    61
yann@346
    62
      Only select this if you know that your specific version of the
yann@346
    63
      compiler supports this language.
yann@1
    64
yann@1
    65
config CC_LANG_ADA
yann@1
    66
    bool
yann@760
    67
    prompt "ADA (EXPERIMENTAL)"
yann@1
    68
    depends on CC_SUPPORT_ADA
yann@760
    69
    depends on EXPERIMENTAL
yann@1
    70
    help
yann@346
    71
      Enable building an Ada compiler.
yann@346
    72
yann@346
    73
      Only select this if you know that your specific version of the
yann@346
    74
      compiler supports this language.
yann@1
    75
yann@1
    76
config CC_LANG_OBJC
yann@1
    77
    bool
yann@760
    78
    prompt "Objective-C (EXPERIMENTAL)"
yann@1
    79
    depends on CC_SUPPORT_OBJC
yann@760
    80
    depends on EXPERIMENTAL
yann@1
    81
    help
yann@346
    82
      Enable building an Objective C compiler.
yann@346
    83
yann@346
    84
      Only select this if you know that your specific version of the
yann@346
    85
      compiler supports this language.
yann@1
    86
yann@1
    87
config CC_LANG_OBJCXX
yann@1
    88
    bool
yann@760
    89
    prompt "Objective-C++ (EXPERIMENTAL)"
yann@760
    90
    depends on EXPERIMENTAL
yann@1
    91
    depends on CC_SUPPORT_OBJCXX
yann@1
    92
    help
yann@346
    93
      Enable building an Objective C++ compiler.
yann@346
    94
yann@346
    95
      Only select this if you know that your specific version of the
yann@346
    96
      compiler supports this language.
yann@1
    97
yann@1
    98
config CC_LANG_OTHERS
yann@1
    99
    string
yann@760
   100
    prompt "Other languages (EXPERIMENTAL)"
yann@1
   101
    default ""
yann@760
   102
    depends on EXPERIMENTAL
yann@1
   103
    help
yann@1
   104
      Enter here a comma-separated list of languages that you know your compiler
yann@1
   105
      supports, besides those listed above.
yann@1
   106
antony@2564
   107
      Eg. gcc-4.1+ has a toy programming language, treelang. As it is not useful
yann@1
   108
      in real life, it is not available in the selection above.
yann@1
   109
yann@850
   110
endif # ! BARE_METAL
yann@850
   111
yann@1976
   112
source "config.gen/cc.in.2"
yann@1976
   113
yann@1
   114
endmenu