config/libc.in
author Johannes Stezenbach <js@sig21.net>
Thu Jul 29 19:47:16 2010 +0200 (2010-07-29)
changeset 2045 fdaa6c7f6dea
parent 2017 f637b6c2162b
child 2052 72731e124d7e
permissions -rw-r--r--
cc/gcc: add option to compile against static libstdc++, for gcc-4.4 and newer

Idea and know-how taken from CodeSourcery build script.

Normal build:
$ ldd arm-unknown-linux-uclibcgnueabi-gcc
linux-gate.so.1 => (0xb77f3000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb76e8000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb75a1000)
libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb757a000)
/lib/ld-linux.so.2 (0xb77f4000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb755c000)

CC_STATIC_LIBSTDCXX=y:
$ ldd arm-unknown-linux-uclibcgnueabi-gcc
linux-gate.so.1 => (0xb7843000)
libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb76e6000)
/lib/ld-linux.so.2 (0xb7844000)

I made CC_STATIC_LIBSTDCXX default=y since I think
it is always desirable.

Signed-off-by: Johannes Stezenbach <js@sig21.net>
yann@1
     1
# C library options
yann@1
     2
yann@1585
     3
menu "C-library"
yann@1585
     4
yann@850
     5
config LIBC
yann@850
     6
    string
yann@850
     7
yann@852
     8
config LIBC_VERSION
yann@852
     9
    string
yann@852
    10
    help
yann@852
    11
      Enter the date of the snapshot you want to use in the form: YYYYMMDD
yann@852
    12
      where YYYY is the 4-digit year, MM the 2-digit month and DD the 2-digit
yann@852
    13
      day in the month.
yann@852
    14
      
yann@852
    15
      Please note:
yann@852
    16
      - glibc has snapshots done every monday, and only the last ten are kept.
yann@852
    17
      - uClibc has daily snapshots, and only the last 30-or-so are kept.
yann@852
    18
      
yann@852
    19
      So if you want to be able to re-build your toolchain later, you will
yann@852
    20
      have to save your C library tarball by yourself.
yann@852
    21
yann@1870
    22
source "config.gen/libc.in"
yann@1
    23
yann@2016
    24
config LIBC_SUPPORT_THREADS_ANY
yann@2016
    25
    bool
yann@2016
    26
    default n
yann@2016
    27
yann@95
    28
config LIBC_SUPPORT_NPTL
yann@95
    29
    bool
yann@95
    30
    default n
yann@2016
    31
    select LIBC_SUPPORT_THREADS_ANY
yann@95
    32
yann@95
    33
config LIBC_SUPPORT_LINUXTHREADS
yann@95
    34
    bool
yann@95
    35
    default n
yann@2016
    36
    select LIBC_SUPPORT_THREADS_ANY
yann@95
    37
bartvdrmeulen@2017
    38
config LIBC_SUPPORT_WIN32THREADS
bartvdrmeulen@2017
    39
    bool
bartvdrmeulen@2017
    40
    default n
bartvdrmeulen@2017
    41
    select LIBC_SUPPORT_THREADS_ANY
bartvdrmeulen@2017
    42
yann@852
    43
config THREADS
yann@852
    44
    string
yann@852
    45
    default "nptl"          if THREADS_NPTL
yann@852
    46
    default "linuxthreads"  if THREADS_LINUXTHREADS
bartvdrmeulen@2017
    47
    default "win32"         if THREADS_WIN32THREADS
yann@1591
    48
    default "none"          if THREADS_NONE || LIBC_none
yann@1591
    49
#                              No C library, no threads!
yann@1591
    50
yann@1591
    51
if ! LIBC_none
yann@1591
    52
yann@1591
    53
comment "Common C library options"
yann@852
    54
yann@802
    55
choice
yann@802
    56
    bool
yann@802
    57
    prompt "Threading implementation to use:"
yann@802
    58
    default THREADS_NPTL           if LIBC_SUPPORT_NPTL
yann@802
    59
    default THREADS_LINUXTHREADS   if LIBC_SUPPORT_LINUXTHREADS && ! LIBC_SUPPORT_NPTL
bartvdrmeulen@2017
    60
    default THREADS_WIN32          if LIBC_SUPPORT_WIN32THREADS
yann@2016
    61
    default THREADS_NONE           if ! LIBC_SUPPORT_THREADS_ANY
yann@1
    62
yann@802
    63
config THREADS_NPTL
yann@802
    64
    bool
yann@802
    65
    prompt "nptl"
yann@802
    66
    depends on LIBC_SUPPORT_NPTL
yann@787
    67
yann@802
    68
config THREADS_LINUXTHREADS
yann@802
    69
    bool
yann@802
    70
    prompt "linuxthreads"
yann@802
    71
    depends on LIBC_SUPPORT_LINUXTHREADS
yann@802
    72
bartvdrmeulen@2017
    73
config THREADS_WIN32THREADS
bartvdrmeulen@2017
    74
    bool
bartvdrmeulen@2017
    75
    prompt "win32"
bartvdrmeulen@2017
    76
    depends on LIBC_SUPPORT_WIN32THREADS
bartvdrmeulen@2017
    77
yann@802
    78
config THREADS_NONE
yann@802
    79
    bool
yann@802
    80
    prompt "none"
yann@802
    81
yann@802
    82
endchoice
yann@802
    83
yann@2034
    84
config LIBC_XLDD
yann@2034
    85
    bool
yann@2034
    86
    prompt "Install a cross ldd-like helper"
yann@2034
    87
    default y
yann@2034
    88
    help
yann@2034
    89
      Say 'Y' here if you want to have a ldd-like helper that
yann@2034
    90
      you can run on your build system, and that will (try to)
yann@2034
    91
      resolve shared libraries dependencies as if run on the
yann@2034
    92
      target.
yann@2034
    93
      
yann@2034
    94
      Note that the cross-ldd helper is not a full replacement
yann@2034
    95
      for the native ldd. Please see the help, by running it
yann@2034
    96
      with '--help' for more explanations.
yann@2034
    97
yann@1976
    98
source "config.gen/libc.in.2"
yann@1976
    99
yann@1591
   100
endif # ! LIBC_none
yann@1591
   101
yann@1
   102
endmenu