config/libc/glibc.in
author Daniel Price <daniel.price@gmail.com>
Tue Nov 20 16:59:17 2012 -0800 (2012-11-20)
changeset 3126 333d3e40cbd1
parent 3070 24c8bae2216f
child 3131 bd172b161ff8
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 # glibc options
     2 
     3 ## depends on ! WINDOWS && ! BARE_METAL && ARCH_USE_MMU
     4 ##
     5 ## select LIBC_SUPPORT_NPTL
     6 ##
     7 ## help The de-facto standard for Linux distributions.
     8 ## help Feature-rich, but large...  Most usefull for desktop-like systems.
     9 
    10 choice
    11     bool
    12     prompt "glibc version"
    13 # Don't remove next line
    14 # CT_INSERT_VERSION_BELOW
    15 
    16 config LIBC_GLIBC_V_2_14_1
    17     bool
    18     prompt "2.14.1"
    19 
    20 config LIBC_GLIBC_V_2_14
    21     bool
    22     prompt "2.14"
    23 
    24 config LIBC_GLIBC_V_2_13
    25     bool
    26     prompt "2.13"
    27 
    28 config LIBC_GLIBC_V_2_12_2
    29     bool
    30     prompt "2.12.2"
    31 
    32 config LIBC_GLIBC_V_2_12_1
    33     bool
    34     prompt "2.12.1"
    35 
    36 config LIBC_GLIBC_V_2_11_1
    37     bool
    38     prompt "2.11.1"
    39 
    40 config LIBC_GLIBC_V_2_11
    41     bool
    42     prompt "2.11"
    43 
    44 config LIBC_GLIBC_V_2_10_1
    45     bool
    46     prompt "2.10.1"
    47     select LIBC_GLIBC_USE_PORTS
    48 
    49 config LIBC_GLIBC_V_2_9
    50     bool
    51     prompt "2.9"
    52 
    53 config LIBC_GLIBC_V_2_8
    54     bool
    55     prompt "2.8"
    56 
    57 config LIBC_GLIBC_V_2_7
    58     bool
    59     prompt "2.7 (OBSOLETE)"
    60     depends on OBSOLETE
    61 
    62 config LIBC_GLIBC_V_2_6_1
    63     bool
    64     prompt "2.6.1 (OBSOLETE)"
    65     depends on OBSOLETE
    66 
    67 config LIBC_GLIBC_V_2_6
    68     bool
    69     prompt "2.6 (OBSOLETE)"
    70     depends on OBSOLETE
    71 
    72 config LIBC_GLIBC_V_2_5_1
    73     bool
    74     prompt "2.5.1 (OBSOLETE)"
    75     depends on OBSOLETE
    76     select LIBC_SUPPORT_LINUXTHREADS
    77 
    78 config LIBC_GLIBC_V_2_5
    79     bool
    80     prompt "2.5 (OBSOLETE)"
    81     depends on OBSOLETE
    82     select LIBC_SUPPORT_LINUXTHREADS
    83 
    84 endchoice
    85 
    86 config LIBC_VERSION
    87     string
    88 # Don't remove next line
    89 # CT_INSERT_VERSION_STRING_BELOW
    90     default "2.14.1" if LIBC_GLIBC_V_2_14_1
    91     default "2.14" if LIBC_GLIBC_V_2_14
    92     default "2.13" if LIBC_GLIBC_V_2_13
    93     default "2.12.2" if LIBC_GLIBC_V_2_12_2
    94     default "2.12.1" if LIBC_GLIBC_V_2_12_1
    95     default "2.11.1" if LIBC_GLIBC_V_2_11_1
    96     default "2.11" if LIBC_GLIBC_V_2_11
    97     default "2.10.1" if LIBC_GLIBC_V_2_10_1
    98     default "2.9" if LIBC_GLIBC_V_2_9
    99     default "2.8" if LIBC_GLIBC_V_2_8
   100     default "2.7" if LIBC_GLIBC_V_2_7
   101     default "2.6.1" if LIBC_GLIBC_V_2_6_1
   102     default "2.6" if LIBC_GLIBC_V_2_6
   103     default "2.5.1" if LIBC_GLIBC_V_2_5_1
   104     default "2.5" if LIBC_GLIBC_V_2_5