config/debug/gdb.in.cross
author "Yann E. MORIN" <yann.morin.1998@free.fr>
Thu Jan 24 22:21:19 2013 +0100 (2013-01-24)
changeset 3174 239ea86a47f6
parent 2856 7723b8457efa
permissions -rw-r--r--
cc/gcc: remove 'sub-level' version form symbols

Now we use defconfig files to store the samples, we have to be a bit more
conservatives in the symbols names, so as to avoid gigantic version bumps
when updating sub-level versions from a package.

For example (using fictitious versions):
- in crosstool-NG 1.17.0, we choose:
- latest gcc is gcc-linaro-4.7-2012.10, which is the default for the
choice in the menuconfig
- gcc-linaro-4.6-2012.10 is selected
- so, sample has an explicit symbol for the selected gcc version, as it
is not the default
- we update to crosstool-NG 1.18.0:
- latest gcc version is gcc-linaro-4.7-2013.01
- gcc-linaro-46 has been updated to gcc-linaro-4.6-2013.01
- as the sample now has no *valid* symbol to set the gcc version, the
default is used, while we would have expected to still use the 4.6
release from linaro, not the 4.7

Get rid of sub-level (ie. the third digit sequence in versions) from the
symbols for linaro versions.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
     1 # Menu for the cross GDB
     2 
     3 config STATIC_TOOLCHAIN
     4     select GDB_CROSS_STATIC if GDB_CROSS
     5 
     6 config GDB_CROSS
     7     bool
     8     prompt "Cross-gdb"
     9     default y
    10     select GDB_GDBSERVER if ! BARE_METAL
    11     help
    12       Build and install a cross-gdb for the target, to run on host.
    13 
    14 if GDB_CROSS
    15 
    16 config GDB_CROSS_STATIC
    17     bool
    18     prompt "Build a static cross gdb"
    19     select WANTS_STATIC_LINK
    20     help
    21       A static cross gdb can be usefull if you debug on a machine that is
    22       not the one that is used to compile the toolchain.
    23       
    24       That way, you can share the cross-gdb without installing a toolchain
    25       on every machine that will be used to debug target programs.
    26 
    27 config GDB_CROSS_SIM
    28     bool
    29     prompt "Enable 'sim'"
    30     help
    31       Say 'y' here if you want to build the 'sim' emulator.
    32       You probably don't want it, unless you are building for bare-metal.
    33       The default is 'n'.
    34 
    35 config GDB_CROSS_PYTHON
    36     bool
    37     prompt "Enable python scripting"
    38     depends on ! GDB_CROSS_STATIC
    39     default y
    40     help
    41       Say 'y' if you want to use Python scripting inside gdb.
    42       Say 'n' if you do not want to.
    43       
    44       Beware that enabling Python scripting could render the gdb
    45       executable non-functional if you move it to another machine.
    46       Building a static gdb can help in this regard, although there
    47       have been reports of problems when linking gdb to the static
    48       libpython.a. This should be fixed in gdb >=7.3. YMMV.
    49 
    50 config GDB_CROSS_EXTRA_CONFIG_ARRAY
    51     string
    52     prompt "Cross-gdb extra config"
    53     default ""
    54     help
    55       Extra flags to pass onto ./configure when configuring the gdb cross.
    56 
    57 endif # GDB_CROSS