config/companion_libs/mpc.in
author Daniel Price <daniel.price@gmail.com>
Tue Nov 20 16:59:17 2012 -0800 (2012-11-20)
changeset 3126 333d3e40cbd1
parent 2319 ef1c7007dfeb
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 # MPC options
     2 
     3 choice
     4     bool
     5     prompt "MPC version"
     6 # Don't remove next line
     7 # CT_INSERT_VERSION_BELOW
     8 
     9 config MPC_V_0_9
    10     bool
    11     prompt "0.9"
    12 
    13 config MPC_V_0_8_2
    14     bool
    15     prompt "0.8.2"
    16 
    17 
    18 config MPC_V_0_8_1
    19     bool
    20     prompt "0.8.1"
    21 
    22 config MPC_V_0_7
    23     bool
    24     prompt "0.7"
    25 
    26 config MPC_V_0_6
    27     bool
    28     prompt "0.6 (OBSOLETE)"
    29     depends on OBSOLETE
    30 
    31 endchoice
    32 
    33 config MPC_VERSION
    34     string
    35 # Don't remove next line
    36 # CT_INSERT_VERSION_STRING_BELOW
    37     default "0.9" if MPC_V_0_9
    38     default "0.8.2" if MPC_V_0_8_2
    39     default "0.8.1" if MPC_V_0_8_1
    40     default "0.7" if MPC_V_0_7
    41     default "0.6" if MPC_V_0_6