config/libc/eglibc.in
author Bryan Hundven <bryanhundven@gmail.com>
Sun Jun 26 03:26:54 2011 -0700 (2011-06-26)
changeset 2515 364b06df9e3a
parent 2489 b7c9f410704f
child 2520 e3523df95b6b
permissions -rw-r--r--
glibc: Refactor startfiles/headers into do_libc_backend()

Refactor the contents of 'do_libc_start_files()' and 'do_libc()' into a
parameterized 'do_libc_backend()'. 'do_libc_start_files()' and 'do_libc()'
call 'do_libc_backend()' with either 'libc_mode=startfiles' or
'libc_mode=final' (respectively) so that the startfiles/headers and
the final libc builds are configured and built with the same options.

One example of where this is needed is when building a mips toolchain.
Previously, if you were building an n32 toolchain, you wouldn't have
noticed an issue, because if '-mabi' is not in CFLAGS, n32 is the
default:

http://sourceware.org/git/?p=glibc-ports.git;a=blob;f=sysdeps/mips/preconfigure;hb=HEAD

But when trying to build an o32 or n64 toolchain the build would
have failed. This is because (e)glibc expects "-mabi={o32,n32,n64}" to be
in CFLAGS, but was not previously provided in 'do_libc_start_files()'.
The build failure would happen in the shared-core gcc when it tries to
configure an n64 or o32 gcc with an n32 libc.

A simpler solution would have been to just add TARGET_CFLAGS to configure
in 'do_libc_start_files()', but this way makes configure and make
consistent for both steps.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
yann@787
     1
# eglibc options
yann@787
     2
yann@2444
     3
## depends on ! MINGW32 && ! 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@2512
    21
config LIBC_EGLIBC_V_2_14
bryanhundven@2512
    22
    bool
bryanhundven@2512
    23
    prompt "2_14"
bryanhundven@2512
    24
    depends on EXPERIMENTAL
bryanhundven@2512
    25
    select LIBC_EGLIBC_2_14_or_later
bryanhundven@2512
    26
bryanhundven@2299
    27
config LIBC_EGLIBC_V_2_13
bryanhundven@2299
    28
    bool
bryanhundven@2299
    29
    prompt "2_13"
bryanhundven@2299
    30
    depends on EXPERIMENTAL
benoit@2489
    31
    select LIBC_EGLIBC_2_13_or_later
bryanhundven@2299
    32
bryanhundven@2239
    33
config LIBC_EGLIBC_V_2_12
bryanhundven@2156
    34
    bool
bryanhundven@2156
    35
    prompt "2_12"
benoit@2489
    36
    select LIBC_EGLIBC_2_12_or_later
bryanhundven@2156
    37
bryanhundven@2239
    38
config LIBC_EGLIBC_V_2_11
bryanhundven@2156
    39
    bool
bryanhundven@2156
    40
    prompt "2_11"
benoit@2489
    41
    select LIBC_EGLIBC_2_11_or_later
bryanhundven@2156
    42
bryanhundven@2239
    43
config LIBC_EGLIBC_V_2_10
yann@787
    44
    bool
yann@1534
    45
    prompt "2_10"
benoit@2489
    46
    select LIBC_EGLIBC_2_10_or_later
yann@1534
    47
bryanhundven@2239
    48
config LIBC_EGLIBC_V_2_9
yann@1534
    49
    bool
yann@1534
    50
    prompt "2_9"
benoit@2489
    51
    select LIBC_EGLIBC_2_9_or_later
yann@1534
    52
bryanhundven@2239
    53
config LIBC_EGLIBC_V_2_8
yann@1534
    54
    bool
yann@1615
    55
    prompt "2_8 (OBSOLETE)"
yann@1615
    56
    depends on OBSOLETE
yann@1534
    57
bryanhundven@2239
    58
config LIBC_EGLIBC_V_2_7
yann@1534
    59
    bool
yann@1615
    60
    prompt "2_7 (OBSOLETE)"
yann@1615
    61
    depends on OBSOLETE
yann@787
    62
bryanhundven@2239
    63
config LIBC_EGLIBC_V_2_6
yann@787
    64
    bool
yann@1615
    65
    prompt "2_6 (OBSOLETE)"
yann@1615
    66
    depends on OBSOLETE
yann@787
    67
bryanhundven@2239
    68
config LIBC_EGLIBC_V_2_5
yann@787
    69
    bool
yann@1615
    70
    prompt "2_5 (OBSOLETE)"
yann@1615
    71
    depends on OBSOLETE
yann@1438
    72
bryanhundven@2239
    73
config LIBC_EGLIBC_V_TRUNK
yann@865
    74
    bool
yann@865
    75
    prompt "'trunk'"
bryanhundven@2512
    76
    select LIBC_EGLIBC_2_14_or_later
yann@865
    77
    help
yann@865
    78
      Selecting this will export the trunk of the eglibc subversion repository.
yann@865
    79
yann@787
    80
endchoice
yann@787
    81
yann@787
    82
config LIBC_VERSION
yann@787
    83
    string
yann@1535
    84
# Don't remove next line
yann@1535
    85
# CT_INSERT_VERSION_STRING_BELOW
bryanhundven@2512
    86
    default "2_14" if LIBC_EGLIBC_V_2_14
bryanhundven@2299
    87
    default "2_13" if LIBC_EGLIBC_V_2_13
bryanhundven@2239
    88
    default "2_12" if LIBC_EGLIBC_V_2_12
bryanhundven@2239
    89
    default "2_11" if LIBC_EGLIBC_V_2_11
bryanhundven@2239
    90
    default "2_10" if LIBC_EGLIBC_V_2_10
bryanhundven@2239
    91
    default "2_9" if LIBC_EGLIBC_V_2_9
bryanhundven@2239
    92
    default "2_8" if LIBC_EGLIBC_V_2_8
bryanhundven@2239
    93
    default "2_7" if LIBC_EGLIBC_V_2_7
bryanhundven@2239
    94
    default "2_6" if LIBC_EGLIBC_V_2_6
bryanhundven@2239
    95
    default "2_5" if LIBC_EGLIBC_V_2_5
bryanhundven@2239
    96
    default "trunk" if LIBC_EGLIBC_V_TRUNK
yann@787
    97
bryanhundven@2512
    98
config LIBC_EGLIBC_2_14_or_later
bryanhundven@2512
    99
    bool
bryanhundven@2512
   100
    select LIBC_EGLIBC_2_13_or_later
bryanhundven@2512
   101
benoit@2489
   102
config LIBC_EGLIBC_2_13_or_later
benoit@2489
   103
    bool
benoit@2489
   104
    select LIBC_EGLIBC_2_12_or_later
benoit@2489
   105
benoit@2489
   106
config LIBC_EGLIBC_2_12_or_later
benoit@2489
   107
    bool
benoit@2489
   108
    select LIBC_EGLIBC_2_11_or_later
benoit@2489
   109
benoit@2489
   110
config LIBC_EGLIBC_2_11_or_later
benoit@2489
   111
    bool
benoit@2489
   112
    select LIBC_EGLIBC_2_10_or_later
benoit@2489
   113
benoit@2489
   114
config LIBC_EGLIBC_2_10_or_later
benoit@2489
   115
    bool
benoit@2489
   116
    select LIBC_EGLIBC_2_9_or_later
benoit@2489
   117
benoit@2489
   118
config LIBC_EGLIBC_2_9_or_later
benoit@2489
   119
    bool
benoit@2489
   120
    select LIBC_EGLIBC_HAS_PKGVERSION_BUGURL
benoit@2489
   121
benoit@2489
   122
config LIBC_EGLIBC_HAS_PKGVERSION_BUGURL
benoit@2489
   123
    bool
benoit@2489
   124
yann@787
   125
config EGLIBC_REVISION
yann@787
   126
    string
yann@787
   127
    prompt "Revision to use"
yann@787
   128
    default "HEAD"
yann@787
   129
    help
yann@787
   130
      Enter the revision of trunk you want to use.
yann@787
   131
      Default is HEAD.
yann@787
   132
      
yann@787
   133
      A revision argument can be one of:
yann@787
   134
          NUMBER       revision number
yann@787
   135
          '{' DATE '}' revision at start of the date (*)
yann@787
   136
          'HEAD'       latest in repository
yann@787
   137
      
yann@787
   138
      (*) If you want to use a date, please use ISO-8601 formats if
yann@787
   139
          at all possible.
yann@787
   140
yann@787
   141
config EGLIBC_CHECKOUT
yann@787
   142
    bool
yann@787
   143
    prompt "checkout instead of export"
bryanhundven@2239
   144
    default y if LIBC_EGLIBC_V_TRUNK
yann@787
   145
    help
yann@787
   146
      By default, the eglibc download will be an export of the subversion
yann@787
   147
      repository. If you say 'y' here, then the repository will instead be
yann@787
   148
      checked-out, so that you can update it later.
yann@787
   149
      
yann@787
   150
      Note that crosstool-NG will *not* update your working copy, you will
yann@787
   151
      have to do that yourself.
avrac@1569
   152
richard@1796
   153
config EGLIBC_OPT_SIZE
richard@1796
   154
    bool
richard@1796
   155
    prompt "optimize eglibc for size (-Os)"
richard@1796
   156
    help
richard@1796
   157
      Optimize eglibc for size using -Os instead of -O2. This will make eglibc
richard@1796
   158
      smaller but may make it slower.
richard@1796
   159
avrac@1569
   160
config EGLIBC_CUSTOM_CONFIG
avrac@1569
   161
    bool
avrac@1569
   162
    prompt "Use custom configuration file"
avrac@1569
   163
    help
avrac@1569
   164
      Use a custom configuration file to disable some features in the eglibc
avrac@1569
   165
      library. The configuration file options are described in detail in the
avrac@1569
   166
      option-groups.def file in the eglibc source directory.
avrac@1569
   167
avrac@1569
   168
if EGLIBC_CUSTOM_CONFIG
avrac@1569
   169
    config EGLIBC_OPTION_GROUPS_FILE
avrac@1569
   170
        string
avrac@1569
   171
        prompt "Path to the option-groups configuration file"
avrac@1569
   172
        default ""
avrac@1569
   173
        help
avrac@1569
   174
          Path to the option groups configuration file.
avrac@1569
   175
avrac@1569
   176
    config EGLIBC_BUNDLED_NSS_CONFIG
avrac@1569
   177
        bool
avrac@1569
   178
        prompt "Use bundled NSS config file"
avrac@1569
   179
        default y
avrac@1569
   180
        help
avrac@1569
   181
          Use minimal nsswitch configuration file bundled in eglibc.
avrac@1569
   182
          This option is only meaningful when runtime nss configuration
avrac@1569
   183
          is disabled in the option groups file.
avrac@1569
   184
avrac@1569
   185
    config EGLIBC_NSS_CONFIG_FILE
avrac@1569
   186
        string
avrac@1569
   187
        prompt "Path to the NSS config file"
avrac@1569
   188
        default ""
avrac@1569
   189
        depends on !EGLIBC_BUNDLED_NSS_CONFIG
avrac@1569
   190
        help
avrac@1569
   191
          Path to the nsswitch configuration file
avrac@1569
   192
avrac@1569
   193
    config EGLIBC_BUNDLED_NSS_FUNCTIONS
avrac@1569
   194
        bool
avrac@1569
   195
        prompt "Use bundled NSS functions file"
avrac@1569
   196
        default y
avrac@1569
   197
        help
avrac@1569
   198
          Use minimal nsswitch functions file bundled in eglibc.
avrac@1569
   199
          This option is only meaningful when runtime nss configuration
avrac@1569
   200
          is disabled in the option groups file.
avrac@1569
   201
avrac@1569
   202
    config EGLIBC_NSS_FUNCTIONS_FILE
avrac@1569
   203
        string
avrac@1569
   204
        prompt "Path to the NSS functions file"
avrac@1569
   205
        default ""
avrac@1569
   206
        depends on !EGLIBC_BUNDLED_NSS_FUNCTIONS
avrac@1569
   207
        help
avrac@1569
   208
          Path to the nsswitch functions file
avrac@1569
   209
endif