config/libc/eglibc.in
author Daniel Price <daniel.price@gmail.com>
Tue Nov 20 16:59:17 2012 -0800 (2012-11-20)
changeset 3126 333d3e40cbd1
parent 3014 0f50dc396387
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
yann@787
     1
# eglibc options
yann@787
     2
diorcet@3112
     3
## depends on ! WINDOWS && ! BARE_METAL && ARCH_USE_MMU
yann@2444
     4
##
yann@2444
     5
## select LIBC_SUPPORT_NPTL
yann@2444
     6
## select LIBC_SUPPORT_LINUXTHREADS
yann@2444
     7
##
yann@2444
     8
## help EGLIBC (Embedded GLIBC) is a variant of the standard GNU GLIBC
yann@2444
     9
## help that is designed to work well on embedded systems.  EGLIBC strives
yann@2444
    10
## help to be source and binary compatible with GLIBC.  Its goals include
yann@2444
    11
## help a reduced footprint, configurable components, and improved
yann@2444
    12
## help cross-compilation support.  EGLIBC also includes some embedded ports
yann@2444
    13
## help (such as e500/spe) that are normally separate add-ons of GLIBC.
yann@852
    14
yann@787
    15
choice
yann@787
    16
    bool
yann@787
    17
    prompt "eglibc version"
yann@1535
    18
# Don't remove next line
yann@1535
    19
# CT_INSERT_VERSION_BELOW
yann@787
    20
bryanhundven@3014
    21
config LIBC_EGLIBC_V_2_16
bryanhundven@3014
    22
    bool
bryanhundven@3014
    23
    prompt "2_16"
bryanhundven@3014
    24
    select LIBC_EGLIBC_2_16_or_later
bryanhundven@3014
    25
bryanhundven@2909
    26
config LIBC_EGLIBC_V_2_15
bryanhundven@2909
    27
    bool
bryanhundven@2909
    28
    prompt "2_15"
bryanhundven@2909
    29
    select LIBC_EGLIBC_2_15_or_later
bryanhundven@2909
    30
bryanhundven@2512
    31
config LIBC_EGLIBC_V_2_14
bryanhundven@2512
    32
    bool
bryanhundven@2512
    33
    prompt "2_14"
bryanhundven@2512
    34
    select LIBC_EGLIBC_2_14_or_later
bryanhundven@2512
    35
bryanhundven@2299
    36
config LIBC_EGLIBC_V_2_13
bryanhundven@2299
    37
    bool
bryanhundven@2299
    38
    prompt "2_13"
benoit@2489
    39
    select LIBC_EGLIBC_2_13_or_later
bryanhundven@2299
    40
bryanhundven@2239
    41
config LIBC_EGLIBC_V_2_12
bryanhundven@2156
    42
    bool
bryanhundven@2156
    43
    prompt "2_12"
benoit@2489
    44
    select LIBC_EGLIBC_2_12_or_later
bryanhundven@2156
    45
bryanhundven@2239
    46
config LIBC_EGLIBC_V_2_11
bryanhundven@2156
    47
    bool
bryanhundven@2156
    48
    prompt "2_11"
benoit@2489
    49
    select LIBC_EGLIBC_2_11_or_later
bryanhundven@2156
    50
bryanhundven@2239
    51
config LIBC_EGLIBC_V_2_10
yann@787
    52
    bool
yann@1534
    53
    prompt "2_10"
benoit@2489
    54
    select LIBC_EGLIBC_2_10_or_later
yann@1534
    55
bryanhundven@2239
    56
config LIBC_EGLIBC_V_2_9
yann@1534
    57
    bool
yann@1534
    58
    prompt "2_9"
benoit@2489
    59
    select LIBC_EGLIBC_2_9_or_later
yann@1534
    60
bryanhundven@2239
    61
config LIBC_EGLIBC_V_2_8
yann@1534
    62
    bool
yann@1615
    63
    prompt "2_8 (OBSOLETE)"
yann@1615
    64
    depends on OBSOLETE
yann@1534
    65
bryanhundven@2239
    66
config LIBC_EGLIBC_V_2_7
yann@1534
    67
    bool
yann@1615
    68
    prompt "2_7 (OBSOLETE)"
yann@1615
    69
    depends on OBSOLETE
yann@787
    70
bryanhundven@2239
    71
config LIBC_EGLIBC_V_2_6
yann@787
    72
    bool
yann@1615
    73
    prompt "2_6 (OBSOLETE)"
yann@1615
    74
    depends on OBSOLETE
yann@787
    75
bryanhundven@2239
    76
config LIBC_EGLIBC_V_2_5
yann@787
    77
    bool
yann@1615
    78
    prompt "2_5 (OBSOLETE)"
yann@1615
    79
    depends on OBSOLETE
yann@1438
    80
bryanhundven@2239
    81
config LIBC_EGLIBC_V_TRUNK
yann@865
    82
    bool
yann@865
    83
    prompt "'trunk'"
bryanhundven@2512
    84
    select LIBC_EGLIBC_2_14_or_later
yann@865
    85
    help
yann@865
    86
      Selecting this will export the trunk of the eglibc subversion repository.
yann@865
    87
yann@787
    88
endchoice
yann@787
    89
yann@787
    90
config LIBC_VERSION
yann@787
    91
    string
yann@1535
    92
# Don't remove next line
yann@1535
    93
# CT_INSERT_VERSION_STRING_BELOW
bryanhundven@3014
    94
    default "2_16" if LIBC_EGLIBC_V_2_16
bryanhundven@2909
    95
    default "2_15" if LIBC_EGLIBC_V_2_15
bryanhundven@2512
    96
    default "2_14" if LIBC_EGLIBC_V_2_14
bryanhundven@2299
    97
    default "2_13" if LIBC_EGLIBC_V_2_13
bryanhundven@2239
    98
    default "2_12" if LIBC_EGLIBC_V_2_12
bryanhundven@2239
    99
    default "2_11" if LIBC_EGLIBC_V_2_11
bryanhundven@2239
   100
    default "2_10" if LIBC_EGLIBC_V_2_10
bryanhundven@2239
   101
    default "2_9" if LIBC_EGLIBC_V_2_9
bryanhundven@2239
   102
    default "2_8" if LIBC_EGLIBC_V_2_8
bryanhundven@2239
   103
    default "2_7" if LIBC_EGLIBC_V_2_7
bryanhundven@2239
   104
    default "2_6" if LIBC_EGLIBC_V_2_6
bryanhundven@2239
   105
    default "2_5" if LIBC_EGLIBC_V_2_5
bryanhundven@2239
   106
    default "trunk" if LIBC_EGLIBC_V_TRUNK
yann@787
   107
bryanhundven@3014
   108
config LIBC_EGLIBC_2_16_or_later
bryanhundven@3014
   109
    bool
bryanhundven@3014
   110
    select LIBC_EGLIBC_2_15_or_later
bryanhundven@3014
   111
bryanhundven@2909
   112
config LIBC_EGLIBC_2_15_or_later
bryanhundven@2909
   113
    bool
bryanhundven@2909
   114
    select LIBC_EGLIBC_2_14_or_later
bryanhundven@2909
   115
bryanhundven@2512
   116
config LIBC_EGLIBC_2_14_or_later
bryanhundven@2512
   117
    bool
bryanhundven@2512
   118
    select LIBC_EGLIBC_2_13_or_later
bryanhundven@2512
   119
benoit@2489
   120
config LIBC_EGLIBC_2_13_or_later
benoit@2489
   121
    bool
benoit@2489
   122
    select LIBC_EGLIBC_2_12_or_later
benoit@2489
   123
benoit@2489
   124
config LIBC_EGLIBC_2_12_or_later
benoit@2489
   125
    bool
benoit@2489
   126
    select LIBC_EGLIBC_2_11_or_later
benoit@2489
   127
benoit@2489
   128
config LIBC_EGLIBC_2_11_or_later
benoit@2489
   129
    bool
benoit@2489
   130
    select LIBC_EGLIBC_2_10_or_later
benoit@2489
   131
benoit@2489
   132
config LIBC_EGLIBC_2_10_or_later
benoit@2489
   133
    bool
benoit@2489
   134
    select LIBC_EGLIBC_2_9_or_later
benoit@2489
   135
benoit@2489
   136
config LIBC_EGLIBC_2_9_or_later
benoit@2489
   137
    bool
benoit@2489
   138
    select LIBC_EGLIBC_HAS_PKGVERSION_BUGURL
benoit@2489
   139
benoit@2489
   140
config LIBC_EGLIBC_HAS_PKGVERSION_BUGURL
benoit@2489
   141
    bool
benoit@2489
   142
yann@2591
   143
if CONFIGURE_has_svn
yann@2591
   144
yann@787
   145
config EGLIBC_REVISION
yann@787
   146
    string
yann@787
   147
    prompt "Revision to use"
yann@787
   148
    default "HEAD"
yann@787
   149
    help
yann@787
   150
      Enter the revision of trunk you want to use.
yann@787
   151
      Default is HEAD.
yann@787
   152
      
yann@787
   153
      A revision argument can be one of:
yann@787
   154
          NUMBER       revision number
yann@787
   155
          '{' DATE '}' revision at start of the date (*)
yann@787
   156
          'HEAD'       latest in repository
yann@787
   157
      
yann@787
   158
      (*) If you want to use a date, please use ISO-8601 formats if
yann@787
   159
          at all possible.
yann@787
   160
bryanhundven@2520
   161
config EGLIBC_HTTP
bryanhundven@2520
   162
    bool
bryanhundven@2520
   163
    prompt "use http:// instead of svn://"
bryanhundven@2520
   164
    help
bryanhundven@2520
   165
      By default, when eglibc is downloaded it is checked out using
bryanhundven@2520
   166
      svn://svn.eglibc.org. This option allows you to download eglibc
bryanhundven@2520
   167
      from http://www.eglibc.org, if you are behind a proxy or firewall.
bryanhundven@2520
   168
      If you are behind a proxy, don't forget to update your
bryanhundven@2520
   169
      .subversion/servers file with your proxy info in [global].
bryanhundven@2520
   170
yann@787
   171
config EGLIBC_CHECKOUT
yann@787
   172
    bool
yann@787
   173
    prompt "checkout instead of export"
bryanhundven@2239
   174
    default y if LIBC_EGLIBC_V_TRUNK
yann@787
   175
    help
yann@787
   176
      By default, the eglibc download will be an export of the subversion
yann@787
   177
      repository. If you say 'y' here, then the repository will instead be
yann@787
   178
      checked-out, so that you can update it later.
yann@787
   179
      
yann@787
   180
      Note that crosstool-NG will *not* update your working copy, you will
yann@787
   181
      have to do that yourself.
avrac@1569
   182
yann@2591
   183
endif # ! CONFIGURE_has_svn
yann@2591
   184
if ! CONFIGURE_has_svn
yann@2591
   185
yann@2591
   186
comment "svn is missing. You'll have to either:"
yann@2591
   187
comment "|  - have a pre-downloaded local tarball"
yann@2591
   188
comment "|  - or have a LAN mirror with a pre-downloaded tarball"
yann@2591
   189
comment "otherwise you won't be able to download eglibc"
yann@2591
   190
yann@2591
   191
endif # ! CONFIGURE_has_svn
yann@2591
   192
richard@1796
   193
config EGLIBC_OPT_SIZE
richard@1796
   194
    bool
richard@1796
   195
    prompt "optimize eglibc for size (-Os)"
richard@1796
   196
    help
richard@1796
   197
      Optimize eglibc for size using -Os instead of -O2. This will make eglibc
richard@1796
   198
      smaller but may make it slower.
richard@1796
   199
avrac@1569
   200
config EGLIBC_CUSTOM_CONFIG
avrac@1569
   201
    bool
avrac@1569
   202
    prompt "Use custom configuration file"
avrac@1569
   203
    help
avrac@1569
   204
      Use a custom configuration file to disable some features in the eglibc
avrac@1569
   205
      library. The configuration file options are described in detail in the
avrac@1569
   206
      option-groups.def file in the eglibc source directory.
avrac@1569
   207
avrac@1569
   208
if EGLIBC_CUSTOM_CONFIG
avrac@1569
   209
    config EGLIBC_OPTION_GROUPS_FILE
avrac@1569
   210
        string
avrac@1569
   211
        prompt "Path to the option-groups configuration file"
avrac@1569
   212
        default ""
avrac@1569
   213
        help
avrac@1569
   214
          Path to the option groups configuration file.
avrac@1569
   215
avrac@1569
   216
    config EGLIBC_BUNDLED_NSS_CONFIG
avrac@1569
   217
        bool
avrac@1569
   218
        prompt "Use bundled NSS config file"
avrac@1569
   219
        default y
avrac@1569
   220
        help
avrac@1569
   221
          Use minimal nsswitch configuration file bundled in eglibc.
avrac@1569
   222
          This option is only meaningful when runtime nss configuration
avrac@1569
   223
          is disabled in the option groups file.
avrac@1569
   224
avrac@1569
   225
    config EGLIBC_NSS_CONFIG_FILE
avrac@1569
   226
        string
avrac@1569
   227
        prompt "Path to the NSS config file"
avrac@1569
   228
        default ""
avrac@1569
   229
        depends on !EGLIBC_BUNDLED_NSS_CONFIG
avrac@1569
   230
        help
avrac@1569
   231
          Path to the nsswitch configuration file
avrac@1569
   232
avrac@1569
   233
    config EGLIBC_BUNDLED_NSS_FUNCTIONS
avrac@1569
   234
        bool
avrac@1569
   235
        prompt "Use bundled NSS functions file"
avrac@1569
   236
        default y
avrac@1569
   237
        help
avrac@1569
   238
          Use minimal nsswitch functions file bundled in eglibc.
avrac@1569
   239
          This option is only meaningful when runtime nss configuration
avrac@1569
   240
          is disabled in the option groups file.
avrac@1569
   241
avrac@1569
   242
    config EGLIBC_NSS_FUNCTIONS_FILE
avrac@1569
   243
        string
avrac@1569
   244
        prompt "Path to the NSS functions file"
avrac@1569
   245
        default ""
avrac@1569
   246
        depends on !EGLIBC_BUNDLED_NSS_FUNCTIONS
avrac@1569
   247
        help
avrac@1569
   248
          Path to the nsswitch functions file
avrac@1569
   249
endif