config/companion_libs/ppl.in
author Daniel Price <daniel.price@gmail.com>
Tue Nov 20 16:59:17 2012 -0800 (2012-11-20)
changeset 3126 333d3e40cbd1
parent 2484 d1a8c2ae7946
child 3135 3829050af02a
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
yann@1324
     1
# PPL options
yann@1324
     2
yann@1324
     3
choice
yann@1324
     4
    bool
yann@1324
     5
    prompt "PPL version"
yann@1535
     6
# Don't remove next line
yann@1535
     7
# CT_INSERT_VERSION_BELOW
yann@1324
     8
yann@2338
     9
config PPL_V_0_11_2
yann@2338
    10
    bool
yann@2957
    11
    prompt "0.11.2"
yann@2368
    12
    select PPL_0_11
yann@2338
    13
yann@2318
    14
config PPL_V_0_11_1
yann@2318
    15
    bool
yann@2957
    16
    prompt "0.11.1"
yann@2368
    17
    select PPL_0_11
yann@2318
    18
yann@2072
    19
config PPL_V_0_11
yann@2072
    20
    bool
yann@2957
    21
    prompt "0.11"
yann@2368
    22
    select PPL_0_11
yann@2072
    23
yann@1324
    24
config PPL_V_0_10_2
yann@1324
    25
    bool
yann@1324
    26
    prompt "0.10.2"
yann@1324
    27
yann@1324
    28
endchoice
yann@1324
    29
yann@1324
    30
config PPL_VERSION
yann@1324
    31
    string
yann@1535
    32
# Don't remove next line
yann@1535
    33
# CT_INSERT_VERSION_STRING_BELOW
yann@2338
    34
    default "0.11.2" if PPL_V_0_11_2
yann@2318
    35
    default "0.11.1" if PPL_V_0_11_1
yann@2072
    36
    default "0.11" if PPL_V_0_11
yann@1324
    37
    default "0.10.2" if PPL_V_0_10_2
yann@2368
    38
yann@2368
    39
# For PPL 0.11, we need to pull libpwl if configured static
yann@2368
    40
config PPL_0_11
yann@2368
    41
    bool
yann@2368
    42
    select PPL_NEEDS_LIBPWL if ! COMPLIBS_SHARED
yann@2368
    43
yann@2368
    44
config PPL_NEEDS_LIBPWL
yann@2368
    45
    bool