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