config/libc/uClibc.in
author Bryan Hundven <bryanhundven@gmail.com>
Sun Jun 26 03:26:54 2011 -0700 (2011-06-26)
changeset 2515 364b06df9e3a
parent 2444 896cb0d36c1a
child 2518 aa833630f29c
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>
     1 # uClibc options
     2 
     3 ## depends on ! MINGW32 && ! BARE_METAL
     4 ##
     5 ## select LIBC_SUPPORT_LINUXTHREADS
     6 ## select LIBC_SUPPORT_THREADS_NONE
     7 ##
     8 ## help The de-facto standard for embeded linux systems.
     9 ## help
    10 ## help Highly configurable, thus as feature-rich as you
    11 ## help need, without compromising for size.
    12 
    13 choice
    14     bool
    15     prompt "uClibc version"
    16 # Don't remove next line
    17 # CT_INSERT_VERSION_BELOW
    18 
    19 config LIBC_UCLIBC_V_0_9_31
    20     bool
    21     prompt "0.9.31 (EXPERIMENTAL)"
    22     depends on EXPERIMENTAL
    23     select LIBC_UCLIBC_0_9_30_or_later
    24 
    25 config LIBC_UCLIBC_V_0_9_30_3
    26     bool
    27     prompt "0.9.30.3"
    28     select LIBC_UCLIBC_0_9_30_or_later
    29 
    30 config LIBC_UCLIBC_V_0_9_30_2
    31     bool
    32     prompt "0.9.30.2"
    33     select LIBC_UCLIBC_0_9_30_or_later
    34 
    35 config LIBC_UCLIBC_V_0_9_30_1
    36     bool
    37     prompt "0.9.30.1"
    38     select LIBC_UCLIBC_0_9_30_or_later
    39 
    40 config LIBC_UCLIBC_V_0_9_30
    41     bool
    42     prompt "0.9.30"
    43     select LIBC_UCLIBC_0_9_30_or_later
    44 
    45 config LIBC_UCLIBC_V_0_9_29
    46     bool
    47     prompt "0.9.29 (OBSOLETE)"
    48     depends on OBSOLETE
    49 
    50 config LIBC_UCLIBC_V_0_9_28_3
    51     bool
    52     prompt "0.9.28.3 (OBSOLETE)"
    53     depends on OBSOLETE
    54 
    55 # As of today (20100702) we can be pretty sure that every
    56 # snapshots made since a month ago are post -0.9.30.
    57 
    58 config LIBC_UCLIBC_V_snapshot
    59     bool
    60     prompt "latest snapshot (EXPERIMENTAL)"
    61     depends on EXPERIMENTAL
    62     select LIBC_SUPPORT_NPTL
    63     select LIBC_UCLIBC_0_9_30_or_later
    64 
    65 config LIBC_UCLIBC_V_specific_date
    66     bool
    67     prompt "<specific date> (EXPERIMENTAL)"
    68     depends on EXPERIMENTAL
    69     select LIBC_SUPPORT_NPTL
    70     select LIBC_UCLIBC_0_9_30_or_later
    71 
    72 endchoice
    73 
    74 config LIBC_VERSION
    75     string
    76     prompt "Enter date (YYYYMMDD)" if LIBC_UCLIBC_V_specific_date
    77 # Don't remove next line
    78 # CT_INSERT_VERSION_STRING_BELOW
    79     default "0.9.31" if LIBC_UCLIBC_V_0_9_31
    80     default "0.9.30.3" if LIBC_UCLIBC_V_0_9_30_3
    81     default "0.9.30.2" if LIBC_UCLIBC_V_0_9_30_2
    82     default "0.9.30.1" if LIBC_UCLIBC_V_0_9_30_1
    83     default "0.9.30" if LIBC_UCLIBC_V_0_9_30
    84     default "0.9.29" if LIBC_UCLIBC_V_0_9_29
    85     default "0.9.28.3" if LIBC_UCLIBC_V_0_9_28_3
    86     default "snapshot" if LIBC_UCLIBC_V_snapshot
    87 
    88 config LIBC_UCLIBC_0_9_30_or_later
    89     bool
    90     select LIBC_UCLIBC_PARALLEL
    91 
    92 config LIBC_UCLIBC_PARALLEL
    93     bool
    94 
    95 choice
    96     bool
    97     prompt "uClibc verbosity:"
    98     default LIBC_UCLIBC_VERBOSITY_0
    99 
   100 config LIBC_UCLIBC_VERBOSITY_0
   101     bool
   102     prompt "Quiet build"
   103     help
   104       Print terse command indications.
   105 
   106 config LIBC_UCLIBC_VERBOSITY_1
   107     bool
   108     prompt "Brief build (show defines, ld flags)"
   109     help
   110       Print simplified command lines.
   111 
   112 config LIBC_UCLIBC_VERBOSITY_2
   113     bool
   114     prompt "Very verbose build"
   115     help
   116       Print full command lines.
   117 
   118 endchoice
   119 
   120 config LIBC_UCLIBC_VERBOSITY
   121     string
   122     default ""      if LIBC_UCLIBC_VERBOSITY_0
   123     default "V=1"   if LIBC_UCLIBC_VERBOSITY_1
   124     default "V=2"   if LIBC_UCLIBC_VERBOSITY_2
   125 
   126 choice
   127     bool
   128     prompt "Debug level"
   129     default LIBC_UCLIBC_DEBUG_LEVEL_0
   130 
   131 config LIBC_UCLIBC_DEBUG_LEVEL_0
   132     bool
   133     prompt "none"
   134 
   135 config LIBC_UCLIBC_DEBUG_LEVEL_1
   136     bool
   137     prompt "minimal"
   138 
   139 config LIBC_UCLIBC_DEBUG_LEVEL_2
   140     bool
   141     prompt "all"
   142 
   143 endchoice
   144 
   145 config LIBC_UCLIBC_DEBUG_LEVEL
   146     int
   147     default 0 if LIBC_UCLIBC_DEBUG_LEVEL_0
   148     default 1 if LIBC_UCLIBC_DEBUG_LEVEL_1
   149     default 2 if LIBC_UCLIBC_DEBUG_LEVEL_2
   150 
   151 config LIBC_UCLIBC_CONFIG_FILE
   152     string
   153     prompt "Configuration file"
   154     default ""
   155     help
   156       Path to the configuration file.
   157       
   158       You _must_ provide one (for now).