config/companion_libs/gmp.in
author Daniel Price <daniel.price@gmail.com>
Tue Nov 20 16:59:17 2012 -0800 (2012-11-20)
changeset 3126 333d3e40cbd1
parent 2651 a171c274bc12
child 3142 6569f6a9060c
permissions -rw-r--r--
scripts: refine static linking check to better guide the user

The current mechanism to check if static linking is possible, and the mesage
displayed on failure, can be puzzling to the unsuspecting user.

Also, the current implementation is not using the existing infrastructure,
and is thus difficult to enhance with new tests.

So, switch to using the standard CT_DoExecLog infra, and use four tests to
check for the host compiler:
- check we can run it
- check it can build a trivial program
- check it can statically link that program
- check if it statically link with libstdc++

That should cover most of the problems. Hopefully.

(At the same time, fix a typo in a comment)

Signed-off-by: Daniel Price <daniel.price@gmail.com>
[yann.morin.1998@free.fr: split original patch for self-contained changes]
[yann.morin.1998@free.fr: use steps to better see gcc's output]
[yann.morin.1998@free.fr: commit log]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Message-Id: <163f86b5216fc08c672a.1353459722@nipigon.dssd.com>
Patchwork-Id: 200536
     1 # GMP options
     2 
     3 choice
     4     bool
     5     prompt "GMP version"
     6 # Don't remove next line
     7 # CT_INSERT_VERSION_BELOW
     8 
     9 config GMP_V_5_0_2
    10     bool
    11     prompt "5.0.2"
    12 
    13 config GMP_V_5_0_1
    14     bool
    15     prompt "5.0.1"
    16 
    17 config GMP_V_4_3_2
    18     bool
    19     prompt "4.3.2"
    20 
    21 config GMP_V_4_3_1
    22     bool
    23     prompt "4.3.1"
    24 
    25 config GMP_V_4_3_0
    26     bool
    27     prompt "4.3.0"
    28 
    29 config GMP_V_4_2_4
    30     bool
    31     prompt "4.2.4 (OBSOLETE)"
    32     depends on OBSOLETE
    33 
    34 config GMP_V_4_2_2
    35     bool
    36     prompt "4.2.2 (OBSOLETE)"
    37     depends on OBSOLETE
    38 
    39 endchoice
    40 
    41 config GMP_VERSION
    42     string
    43 # Don't remove next line
    44 # CT_INSERT_VERSION_STRING_BELOW
    45     default "5.0.2" if GMP_V_5_0_2
    46     default "5.0.1" if GMP_V_5_0_1
    47     default "4.3.2" if GMP_V_4_3_2
    48     default "4.3.1" if GMP_V_4_3_1
    49     default "4.3.0" if GMP_V_4_3_0
    50     default "4.2.4" if GMP_V_4_2_4
    51     default "4.2.2" if GMP_V_4_2_2