Files
uClibcxx/extra/Configs/Config.in
T
pig2014 d068332b88 feat: initial commit
Code is from cxx.uclibc.org, modified by catty to implement c++17
features
2025-03-26 09:29:24 +08:00

381 lines
12 KiB
Plaintext

#
# For a description of the syntax of this configuration file,
# see extra/config/Kconfig-language.txt
#
mainmenu "uClibc++ C++ Library Configuration"
menu "Target Features and Options"
source "extra/Configs/Config.in.arch"
endmenu
menu "String and I/O Stream Support"
config UCLIBCXX_HAS_WCHAR
bool "Wide Character Support (Not Currently Supported)"
default n
help
Answer Y to enable wide character support. This will make
uClibc++ much larger. It also requires support from the underlying
C library. Note that this code is currently unmaintained and may
not work.
Most people will answer N.
config UCLIBCXX_IOSTREAM_BUFSIZE
int "I/O stream buffer size"
default 32
help
Please select a value for BUFSIZE. This will be used by the
iostream subsystem as the default buffer size for a file, and
affects cin, cout, fstream, etc. This is independent of the
buffering provided by the underlying C library. This must be a
multiple of 2.
NOTE: Setting this to '0' will disable buffering completely.
This may break applications which extend the I/O stream
subsystem, but those are few and far between. Disabling will
result in both smaller and very likely faster code.
THIS DOESN'T WORK YET - FIXME
config UCLIBCXX_HAS_LFS
bool "Large File Support"
default y
depends on !CONFIG_CRIS
help
If you wish to build uClibc++ with support for accessing large
files (i.e. files greater then 2 GiB) then answer Y. Do not enable
this if you are using an older Linux kernel (2.0.x) that lacks
large file support. Enabling this option will increase the size
of uClibc++.
THIS DOESN'T WORK YET - FIXME
config UCLIBCXX_SUPPORT_CDIR
bool "Enable support for standard streams like cin and cout"
default y
help
Answer Y to enable the framework for cin, cout, cerr and clog as well
as their wide character versions wcin, wcout, wcerr and wclog. Note
that each of those can be manually altered at a later point.
Disabling this option will result in space savings as well as
performance improvements as some startup code can be eliminated.
This is a widely used feature. Most people will answer Y.
config UCLIBCXX_SUPPORT_CIN
bool "Enable cin"
default y
depends on UCLIBCXX_SUPPORT_CDIR
help
Answer y to have support for std::cin. This is a commonly used
feature, so you will probably want to say yes here.
config UCLIBCXX_SUPPORT_COUT
bool "Enable cout"
default y
depends on UCLIBCXX_SUPPORT_CDIR
help
Answer y to have support for std::cout. This is a commonly used
feature, so you will probably want to say yes here.
config UCLIBCXX_SUPPORT_CERR
bool "Enable cerr"
default y
depends on UCLIBCXX_SUPPORT_CDIR
help
Answer y to have support for std::cerr. This is a commonly used
feature, so you will probably want to say yes here.
config UCLIBCXX_SUPPORT_CLOG
bool "Enable clog"
default n
depends on UCLIBCXX_SUPPORT_CDIR
help
Answer y to have support for std::clog. This stream is the same as
std::cerr except that it is buffered, where cerr is not.
config UCLIBCXX_SUPPORT_WCIN
bool "Enable wcin"
default y
depends on UCLIBCXX_SUPPORT_CDIR
depends on UCLIBCXX_HAS_WCHAR
help
Answer y to have support for std::wcin. This is the wide-character
version of cin. You will probably want to say yes here.
config UCLIBCXX_SUPPORT_WCOUT
bool "Enable wcout"
default y
depends on UCLIBCXX_SUPPORT_CDIR
depends on UCLIBCXX_HAS_WCHAR
help
Answer y to have support for std::wcout. This is the wide-character
version of cout. You will probably want to say yes here.
config UCLIBCXX_SUPPORT_WCERR
bool "Enable wcerr"
default y
depends on UCLIBCXX_SUPPORT_CDIR
depends on UCLIBCXX_HAS_WCHAR
help
Answer y to have support for std::wcerr. This is the wide-character
version of cerr. You will probably want to say yes here.
config UCLIBCXX_SUPPORT_WCLOG
bool "Enable wclog"
default n
depends on UCLIBCXX_SUPPORT_CDIR
depends on UCLIBCXX_HAS_WCHAR
help
Answer y to have support for std::wclog. This is the wide-character
version of clog.
endmenu
menu "STL and Code Expansion"
config UCLIBCXX_STL_BUFFER_SIZE
int "STL buffer size"
default 32
help
Much of the STL code relies on allocating memory for a number
of objects. For objects like vectors which must reallocate
all of their memory when resizing, aquiring a few extra
objects-worth can provide a dramatic performance improvement.
This specifies the number of spare objects allocated.
NOTE: This number must be at least 4. Default: 32
config UCLIBCXX_CODE_EXPANSION
bool "Template code expansion"
default y
help
Most of the code in the C++ standard library is in the form of
templates which are compiled and linked into each executable
on demand. Answering 'Y' here will allow you to select a
number of templates to pre-expand for certain data types so
that the code is stored in the library instead of the
executable.
Almost everybody will want to answer Y
config UCLIBCXX_EXPAND_CONSTRUCTORS_DESTRUCTORS
bool "Expand constructors and destructors"
default y
depends on UCLIBCXX_CODE_EXPANSION
help
Some compilers will produce warnings or errors if some
techniques are used for code expansion (notably old versions
of gcc). Say yes to minimize the size of compiled
applications. Say no to avoid these errors and warnings.
You should say Y.
config UCLIBCXX_EXPAND_STRING_CHAR
bool "Expand std::basic_string for <char>"
default y
depends on UCLIBCXX_CODE_EXPANSION
help
If you use std::string at all, you will want to answer Y here.
The largest portions of the code for basic_string will be
expanded and placed into the library, shrinking executables.
You should only say N if you don't use strings at all.
config UCLIBCXX_EXPAND_VECTOR_BASIC
bool "Expand std::vector for basic data types"
default y
depends on UCLIBCXX_CODE_EXPANSION
help
std::basic string inherits from vector, so saying Y here is
always a good idea. This will expand std::vector for all
primitive data types, shrinking executables.
config UCLIBCXX_EXPAND_IOS_CHAR
bool "Expand ios core code for char"
default y
depends on UCLIBCXX_CODE_EXPANSION
help
Much of the STL code uses core ios classes. These classes,
though small, are used frequently and will use a lot of space
in your executibles. Expanding this code will save space.
config UCLIBCXX_EXPAND_STREAMBUF_CHAR
bool "Expand std::streambuf for char"
default y
depends on UCLIBCXX_CODE_EXPANSION
help
std::streambuf is used extensively throughout the C++ library.
Expanding this code will shrink the size of your executables.
config UCLIBCXX_EXPAND_ISTREAM_CHAR
bool "Expand std::istream for <char>"
default y
depends on UCLIBCXX_CODE_EXPANSION
help
If you use istream or it's derivatives, including fstream
and iostream with characters, you will want to say yes here
to expand the code and place it into the library.
config UCLIBCXX_EXPAND_OSTREAM_CHAR
bool "Expand std::ostream for <char>"
default y
depends on UCLIBCXX_CODE_EXPANSION
help
If you use any ostream derivative, including fstream and
iostream with characters, you will want to say yes here to
expand the code and place it into the library.
config UCLIBCXX_EXPAND_FSTREAM_CHAR
bool "Expand std::fstream for <char>"
default y
depends on UCLIBCXX_CODE_EXPANSION
help
If you use any fstream derivative, you will want to say
yes here to expand the code and place it into the library.
config UCLIBCXX_EXPAND_SSTREAM_CHAR
bool "Expand std::sstream for <char>"
default y
depends on UCLIBCXX_CODE_EXPANSION
help
If you use any stringstream derivative, you will want to say
yes here to expand the code and place it into the library.
endmenu
menu "Library Installation Options"
config UCLIBCXX_RUNTIME_PREFIX
string "uClibc++ runtime prefix directory"
default "/usr/uClibc++"
help
UCLIBCXX_RUNTIME_PREFIX is the directory into which the uClibc++
runtime libraries will be installed.
For a typical target system this should be set to "/usr", so
that 'make install' will install libuClibc++.so into
/usr/lib.
config UCLIBCXX_RUNTIME_INCLUDE_SUBDIR
string "uClibc++ header file subdirectory"
default "/include"
help
UCLIBCXX_RUNTIME_INCLUDE_SUBDIR is the subdirectory of
UCLIBCXX_RUNTIME_PREFIX in which the header files for the library
are installed. If you set the prefix to /usr, set this to /include
to install the headers into /include
config UCLIBCXX_RUNTIME_LIB_SUBDIR
string "uClibc++ library subdirectory"
default "/lib"
help
UCLIBCXX_RUNTIME_LIB_SUBDIR is the subdirectory of
UCLIBCXX_RUNTIME_PREFIX in which the library binaries are installed.
If you set the prefix to /usr, set this to /lib to install the
headers into /lib
config UCLIBCXX_RUNTIME_BIN_SUBDIR
string "uClibc++ application file subdirectory"
default "/bin"
help
UCLIBCXX_RUNTIME_BIN_SUBDIR is the subdirectory of
UCLIBCXX_RUNTIME_PREFIX in which the binary applicatons for the
library are installed - right now this is just the g++ wrapper. If
you set the prefix to /usr, set this to /bin to install the
applications headers into /bin
config UCLIBCXX_EXCEPTION_SUPPORT
bool "Exception and RTTI support"
default y
help
This option enables exception support in the library.
Exception support is part of the C++ standard, and as such
should almost always be enabled. This increases the size of
the library.
RTTI support is used for exceptions as well as operators such
as dynamic_cast<>() and others.
Using this increases the size of the library.
Most people will answer Y.
config IMPORT_LIBSUP
bool "Import libsupc++.a"
depends on UCLIBCXX_EXCEPTION_SUPPORT
default y
help
libsupc++.a is a file which comes with the g++ compiler and
provides all of the language support features required for C++
programs to run, such as exception support, rtti support, as well
as support for the C++ ABI. This is largely compiler dependent.
Since the library is statically compiled, this code would normally
need to be compiled into each executable. However, it can also be
imported into this library and shared. uClibc++ imports this code.
There is no point in importing this if you disable exception and
rtti support above.
You should say yes.
config IMPORT_LIBGCC_EH
bool "Import libgcc_eh.a"
depends on UCLIBCXX_EXCEPTION_SUPPORT
default y
help
libgcc_eh.a is a file which comes with the g++ compiler and
provides unwind support for static apps (the dynamically linked
apps use libgcc_s.so instead).
This code is largely compiler dependent.
Currently for gcc-4.0.0 it is imported only into libuClibc++.a, the
shared library will depend on libgcc_s.so.
config BUILD_STATIC_LIB
bool "Build static library"
default y
help
By default, libuClibc++ is built only as a shared library. Choosing
'y' here will also build a static library which can be used to build
statically linked executables.
There is little reason to say 'no' here.
You should say yes.
config BUILD_ONLY_STATIC_LIB
bool "Build only static library"
depends on BUILD_STATIC_LIB
default n
help
By default, libuClibc++ is built as a shared library. Choosing
'y' here will disable building the shared library. You should
only choose 'y' here if you are on a system which does not
support shared libraries.
You should say no.
config DODEBUG
bool "Build uClibc++ with debugging symbols"
default n
help
Say Y here if you wish to compile uClibc++ with debugging symbols.
This will allow you to use a debugger to examine uClibc++ internals
while applications are running. This increases the size of the
library considerably and should only be used when doing development.
If you are doing development and want to debug uClibc++, answer Y.
Otherwise, answer N.
endmenu