config/libc/newlib.in.2
author Daniel Price <daniel.price@gmail.com>
Tue Nov 20 16:59:17 2012 -0800 (2012-11-20)
changeset 3126 333d3e40cbd1
parent 2781 504b0759c149
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@2165
     1
# newlib second-part options
yann@2165
     2
yann@2167
     3
config LIBC_NEWLIB_IO_C99FMT
yann@2167
     4
    bool
yann@2167
     5
    prompt "Enable IOs on C99 formats"
yann@2167
     6
    help
yann@2167
     7
      Enable support for IOs on C99 formats.
yann@2167
     8
yann@2166
     9
config LIBC_NEWLIB_IO_LL
yann@2166
    10
    bool
yann@2166
    11
    prompt "Enable IOs on long long"
yann@2166
    12
    help
yann@2166
    13
      Enable support for IOs on long long integers.
yann@2166
    14
yann@2165
    15
config LIBC_NEWLIB_IO_FLOAT
yann@2165
    16
    bool
yann@2165
    17
    prompt "Enable IOs on floats and doubles"
yann@2165
    18
    help
yann@2165
    19
      Enable support for IOs on floating point
yann@2165
    20
      values (float and double).
yann@2165
    21
yann@2165
    22
config LIBC_NEWLIB_IO_LDBL
yann@2165
    23
    bool
yann@2165
    24
    prompt "Enable IOs on long doubles"
yann@2165
    25
    depends on LIBC_NEWLIB_IO_FLOAT
yann@2165
    26
    help
yann@2165
    27
      Enable support for IOs on long doubles.
kpet@2647
    28
kpet@2647
    29
config LIBC_NEWLIB_DISABLE_SUPPLIED_SYSCALLS
kpet@2647
    30
    bool
kpet@2647
    31
    prompt "Disable the syscalls supplied with newlib"
kpet@2647
    32
    help
kpet@2647
    33
      Disable the syscalls that come with newlib. You
kpet@2647
    34
	  will have to implement your own _sbrk, _read,
kpet@2647
    35
	  _write... If you plan to port newlib to a new
kpet@2647
    36
	  platform/board, say Yes.
kpet@2647
    37
zhenqiang@2783
    38
config LIBC_NEWLIB_ENABLE_TARGET_OPTSPACE
zhenqiang@2783
    39
    bool
zhenqiang@2783
    40
    prompt "Optimize newlib for size"
zhenqiang@2783
    41
    default y
zhenqiang@2783
    42
    help
zhenqiang@2783
    43
      Pass --enable-target-optspace to newlib configure.
zhenqiang@2783
    44
      
zhenqiang@2783
    45
      This will compile newlib with -Os.
zhenqiang@2783
    46
zhenqiang@2781
    47
config LIBC_NEWLIB_EXTRA_CONFIG_ARRAY
zhenqiang@2781
    48
    string
zhenqiang@2781
    49
    prompt "Extra config for newlib"
zhenqiang@2781
    50
    default ""
zhenqiang@2781
    51
    help
zhenqiang@2781
    52
      Extra flags to pass onto ./configure when configuring the newlib.