config/kernel/linux.in
author Daniel Price <daniel.price@gmail.com>
Tue Nov 20 16:59:17 2012 -0800 (2012-11-20)
changeset 3126 333d3e40cbd1
parent 3086 946d6d133a90
child 3136 927ca2e79394
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@448
     1
# Linux kernel options
yann@448
     2
yann@2444
     3
## select KERNEL_SUPPORTS_SHARED_LIBS
yann@2444
     4
##
yann@2444
     5
## help Build a toolchain targeting systems running Linux as a kernel.
yann@2446
     6
yann@2446
     7
config KERNEL_LINUX_USE_CUSTOM_HEADERS
yann@2446
     8
    bool
yann@2602
     9
    prompt "Use pre-installed headers tree (OBSOLETE)"
yann@2602
    10
    depends on OBSOLETE
yann@2446
    11
    help
yann@2446
    12
      If you have some pre-installed kernel headers lying around, you can
yann@2446
    13
      enter the path to these headers, below, they will be copied from
yann@2446
    14
      there, and into the toolchain's sysroot.
yann@2446
    15
      
yann@2446
    16
      Note:
yann@2446
    17
      This will *not* let you use a complete kernel tree!
yann@2602
    18
      If you want to use your own full kernel tree, then you want to say 'N'
yann@2602
    19
      here, and select KERNEL_LINUX_CUSTOM, in the versions list, below.
yann@2446
    20
yann@2603
    21
if ! KERNEL_LINUX_USE_CUSTOM_HEADERS
yann@2446
    22
yann@2446
    23
choice
yann@2446
    24
    bool
yann@2446
    25
    prompt "Linux kernel version"
yann@2446
    26
# Don't remove next line
yann@2446
    27
# CT_INSERT_VERSION_BELOW
yann@2446
    28
benoit@3114
    29
config KERNEL_V_3_6_6
benoit@3114
    30
    bool
benoit@3114
    31
    prompt "3.6.6"
benoit@3114
    32
benoit@3114
    33
config KERNEL_V_3_6_5
benoit@3114
    34
    bool
benoit@3114
    35
    prompt "3.6.5"
benoit@3114
    36
benoit@3114
    37
config KERNEL_V_3_6_4
benoit@3114
    38
    bool
benoit@3114
    39
    prompt "3.6.4"
benoit@3114
    40
yann@3086
    41
config KERNEL_V_3_6_3
yann@3086
    42
    bool
yann@3086
    43
    prompt "3.6.3"
yann@3086
    44
yann@3086
    45
config KERNEL_V_3_6_2
yann@3086
    46
    bool
yann@3086
    47
    prompt "3.6.2"
yann@3086
    48
benoit@3069
    49
config KERNEL_V_3_6_1
benoit@3056
    50
    bool
benoit@3069
    51
    prompt "3.6.1"
benoit@3056
    52
benoit@3069
    53
config KERNEL_V_3_6
benoit@3056
    54
    bool
benoit@3069
    55
    prompt "3.6"
benoit@3056
    56
yann@3086
    57
config KERNEL_V_3_5_7
benoit@3038
    58
    bool
yann@3086
    59
    prompt "3.5.7"
benoit@3038
    60
benoit@3114
    61
config KERNEL_V_3_4_18
benoit@3038
    62
    bool
benoit@3114
    63
    prompt "3.4.18"
benoit@2940
    64
yann@2993
    65
config KERNEL_V_3_3_8
benoit@2940
    66
    bool
yann@2993
    67
    prompt "3.3.8"
benoit@2940
    68
benoit@3114
    69
config KERNEL_V_3_2_33
benoit@2940
    70
    bool
benoit@3114
    71
    prompt "3.2.33"
yann@2812
    72
yann@2852
    73
config KERNEL_V_3_1_10
yann@2799
    74
    bool
yann@2852
    75
    prompt "3.1.10"
yann@2799
    76
benoit@3114
    77
config KERNEL_V_3_0_51
yann@2799
    78
    bool
benoit@3114
    79
    prompt "3.0.51"
yann@2568
    80
yann@2596
    81
config KERNEL_V_2_6_39_4
yann@2566
    82
    bool
yann@2596
    83
    prompt "2.6.39.4"
yann@2473
    84
bryanhundven@2513
    85
config KERNEL_V_2_6_38_8
yann@2473
    86
    bool
bryanhundven@2513
    87
    prompt "2.6.38.8"
yann@2446
    88
yann@2446
    89
config KERNEL_V_2_6_37_6
yann@2446
    90
    bool
yann@2446
    91
    prompt "2.6.37.6"
yann@2446
    92
yann@2446
    93
config KERNEL_V_2_6_36_4
yann@2446
    94
    bool
yann@2446
    95
    prompt "2.6.36.4"
yann@2446
    96
yann@2741
    97
config KERNEL_V_2_6_33_20
yann@2446
    98
    bool
yann@2741
    99
    prompt "2.6.33.20"
yann@2596
   100
    help
yann@2596
   101
      This is primarily for the use of those people who are stuck using the
yann@2596
   102
      .33-rt kernel.  Anyone else who really wants to use the .33 kernel tree
yann@2596
   103
      is welcome to use this one as well.
yann@2446
   104
benoit@3069
   105
config KERNEL_V_2_6_32_60
yann@2446
   106
    bool
benoit@3069
   107
    prompt "2.6.32.60 (longterm)"
yann@2446
   108
    help
yann@2446
   109
      The Linux 2.6.32 tree is a "longterm" maintenance branch.
yann@2446
   110
      
yann@2446
   111
      It is intended to fill the niche for users who are not using distribution
yann@2446
   112
      kernels but want to use a regression-free kernel for a longer time.
yann@2446
   113
      
yann@2446
   114
      Critical bug fixes to later 2.6 releases are often ported to this branch
yann@2446
   115
      which makes 2.6.32 a very useful base for many embedded developers seeking
yann@2446
   116
      stable APIs or those who do not need the latest bleeding edge features.
yann@2446
   117
      
yann@2446
   118
      ... and no, this kernel has not undergone any specific QA testing.
yann@2446
   119
      
yann@2446
   120
      See the original announcement by Greg Kroah-Hartman in the following
yann@2446
   121
      mailing list entry:
yann@2446
   122
        http://marc.info/?l=linux-kernel&m=126384198403392&w=4
yann@2446
   123
yann@2446
   124
config KERNEL_V_2_6_31_14
yann@2446
   125
    bool
yann@2446
   126
    prompt "2.6.31.14"
yann@2446
   127
yann@2921
   128
config KERNEL_V_2_6_27_62
yann@2446
   129
    bool
yann@2921
   130
    prompt "2.6.27.62 (longterm)"
yann@2446
   131
    help
yann@2446
   132
      The Linux 2.6.27 tree is a "longterm" maintenance branch.
yann@2446
   133
      
yann@2446
   134
      It is intended to fill the niche for users who are not using distribution
yann@2446
   135
      kernels but want to use a regression-free kernel for a longer time.
yann@2446
   136
      
yann@2446
   137
      Critical bug fixes to later 2.6 releases are often ported to this branch
yann@2446
   138
      which makes 2.6.27 a very useful base for many embedded developers seeking
yann@2446
   139
      stable APIs or those who do not need the latest bleeding edge features.
yann@2446
   140
      
yann@2446
   141
      ... and no, this kernel has not undergone any specific QA testing.
yann@2446
   142
      
yann@2446
   143
      See the original announcement by Adrian Bunk in the following mailing list
yann@2446
   144
      entry:
yann@2446
   145
        http://marc.info/?l=linux-kernel&m=122375909403298&w=4
yann@2446
   146
      
yann@2446
   147
      It is now maintained by Greg Kroah-Hartman, see this mailing list entry:
yann@2446
   148
        http://marc.info/?l=linux-kernel&m=129133701916793&w=4
yann@2446
   149
yann@2446
   150
config KERNEL_LINUX_CUSTOM
yann@2446
   151
    bool
sinseman44@2680
   152
    prompt "custom tarball or directory"
yann@2446
   153
    help
sinseman44@2680
   154
      Use a local tarball or local kernel directory of a complete kernel source tree.
yann@2446
   155
sinseman44@2680
   156
config KERNEL_LINUX_CUSTOM_LOCATION
yann@2446
   157
    string
sinseman44@2680
   158
    prompt "Path to custom source, tarball or directory"
yann@2446
   159
    depends on KERNEL_LINUX_CUSTOM
yann@2446
   160
    help
sinseman44@2680
   161
      Enter here the path to the tarball of your full kernel tree or
sinseman44@2680
   162
      kernel directory
yann@2446
   163
yann@2446
   164
endchoice
yann@2446
   165
yann@2446
   166
config KERNEL_VERSION
yann@2446
   167
    string
yann@2446
   168
# Don't remove next line
yann@2446
   169
# CT_INSERT_VERSION_STRING_BELOW
benoit@3114
   170
    default "3.6.6" if KERNEL_V_3_6_6
benoit@3114
   171
    default "3.6.5" if KERNEL_V_3_6_5
benoit@3114
   172
    default "3.6.4" if KERNEL_V_3_6_4
yann@3086
   173
    default "3.6.3" if KERNEL_V_3_6_3
yann@3086
   174
    default "3.6.2" if KERNEL_V_3_6_2
benoit@3069
   175
    default "3.6.1" if KERNEL_V_3_6_1
benoit@3069
   176
    default "3.6" if KERNEL_V_3_6
yann@3086
   177
    default "3.5.7" if KERNEL_V_3_5_7
benoit@3114
   178
    default "3.4.18" if KERNEL_V_3_4_18
yann@2993
   179
    default "3.3.8" if KERNEL_V_3_3_8
benoit@3114
   180
    default "3.2.33" if KERNEL_V_3_2_33
yann@2852
   181
    default "3.1.10" if KERNEL_V_3_1_10
benoit@3114
   182
    default "3.0.51" if KERNEL_V_3_0_51
yann@2596
   183
    default "2.6.39.4" if KERNEL_V_2_6_39_4
bryanhundven@2513
   184
    default "2.6.38.8" if KERNEL_V_2_6_38_8
yann@2446
   185
    default "2.6.37.6" if KERNEL_V_2_6_37_6
yann@2446
   186
    default "2.6.36.4" if KERNEL_V_2_6_36_4
yann@2741
   187
    default "2.6.33.20" if KERNEL_V_2_6_33_20
benoit@3069
   188
    default "2.6.32.60" if KERNEL_V_2_6_32_60
yann@2446
   189
    default "2.6.31.14" if KERNEL_V_2_6_31_14
yann@2921
   190
    default "2.6.27.62" if KERNEL_V_2_6_27_62
yann@2603
   191
    default "custom" if KERNEL_LINUX_CUSTOM
yann@2446
   192
yann@2603
   193
endif # ! KERNEL_LINUX_USE_CUSTOM_HEADERS
yann@2446
   194
yann@2446
   195
if KERNEL_LINUX_USE_CUSTOM_HEADERS
yann@2446
   196
yann@2446
   197
config KERNEL_LINUX_CUSTOM_PATH
yann@2446
   198
    string
yann@2446
   199
    prompt "Path to custom headers directory/tarball"
yann@2446
   200
    help
yann@2446
   201
      See KERNEL_LINUX_CUSTOM_IS_TARBALL, below.
yann@2446
   202
yann@2446
   203
config KERNEL_LINUX_CUSTOM_IS_TARBALL
yann@2446
   204
    bool
yann@2446
   205
    prompt "This is a tarball"
yann@2446
   206
    help
yann@2446
   207
      If you say 'n' here, the path above is expected to point to a directory
yann@2446
   208
      containing readily prepared headers
yann@2446
   209
      
yann@2446
   210
      If you say 'y' here, then the path above is expected to point to a
yann@2446
   211
      tarball of such a directory.
yann@2446
   212
      
yann@2446
   213
      Eg., if your headers are available in: /foo/bar/buz/my_hdrs/include,
yann@2446
   214
      say 'n' here, and enter: /foo/bar/buz/my_hdrs below.
yann@2446
   215
      
yann@2446
   216
      Now, passing a tarball around is easier than passing a directory, so
yann@2446
   217
      if you want to, you can make a tarball of /foo/bar/buz/my_hdrs/include,
yann@2446
   218
      say 'y' here, and enter the path to this tarball below.
yann@2446
   219
yann@2446
   220
endif # KERNEL_LINUX_USE_CUSTOM_HEADERS