config/debug/duma.in
author Oron Peled <oron@actcom.co.il>
Mon Aug 03 00:49:25 2009 +0200 (2009-08-03)
changeset 1449 8ad2773e7ae3
parent 916 68af6b83ff7e
child 1487 79c3cd3818d9
permissions -rw-r--r--
[complib:mpfr] Fix building MPFR in some weird cases

The tmul test uses a compiled-in input file in $(srcdir).
The problem is that the Makefile passes it unquoted. The C code
tries to stringify it using clever macros, which may *usually* work.

In my case the source directory was named:
.../toolchain-powerpc-e500v2-linux-gnuspe-1.0-2.fc10/.../tests
And guess what? During testing I found out the program fails because
it tries to open:
.../toolchain-powerpc-e500v2-1-gnuspe-1.0-2.fc10/.../tests

Yes, CPP tokenized the macro before stringifying it and not surprisingly
the 'linux' part was converted to 1.
[on Fedora-10: cpp (GCC) 4.3.2 20081105 (Red Hat 4.3.2-7)]

So the attached patch simplify the macros and pass the path as string
from the Makefile.
     1 # D.U.M.A. - Detect Unintended Memory Access - Memory checker
     2 
     3 config DEBUG_duma
     4     help
     5       D.U.M.A. - Detect Unintended Memory Access
     6       A memory bound checker, with additional features.
     7       Formerly known as Electric Fence.
     8 
     9 config DUMA_A
    10     bool
    11     prompt "Build a static library"
    12     default y
    13 
    14 config DUMA_SO
    15     bool
    16     prompt "Build a shared library"
    17     default y if SHARED_LIBS
    18     default n if ! SHARED_LIBS
    19 
    20 choice
    21     bool
    22     prompt "D.U.M.A. version"
    23 
    24 config DUMA_V_2_5_1
    25     bool
    26     prompt "2_5_1"
    27 
    28 config DUMA_V_2_5_8
    29     bool
    30     prompt "2_5_8"
    31 
    32 config DUMA_V_2_5_12
    33     bool
    34     prompt "2_5_12"
    35 
    36 config DUMA_V_2_5_14
    37     bool
    38     prompt "2_5_14"
    39 
    40 config DUMA_V_2_5_15
    41     bool
    42     prompt "2.5.15"
    43 
    44 # CT_INSERT_VERSION_ABOVE
    45 # Don't remove above line!
    46 endchoice
    47 
    48 config DUMA_VERSION
    49     string
    50     default "2_5_1" if DUMA_V_2_5_1
    51     default "2_5_8" if DUMA_V_2_5_8
    52     default "2_5_12" if DUMA_V_2_5_12
    53     default "2_5_14" if DUMA_V_2_5_14
    54     default "2.5.15" if DUMA_V_2_5_15
    55 # CT_INSERT_VERSION_STRING_ABOVE
    56 # Don't remove above line!