# # SPDX-License-Identifier: BSD-3-Clause # # Copyright © 2019 Keith Packard # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following # disclaimer in the documentation and/or other materials provided # with the distribution. # # 3. Neither the name of the copyright holder nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED # OF THE POSSIBILITY OF SUCH DAMAGE. # option('fast-strcmp', type: 'boolean', value: true, description: 'Always optimize strcmp for performance') option('have-alias-attribute', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Compiler supports __alias__ attribute') option('have-format-attribute', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Compiler supports __format__ attribute') option('multilib', type: 'boolean', value: true, description: 'Enable multilib compile') option('multilib-list', type: 'array', value: [], description: 'List of multilib configurations to build for') option('picolib', type: 'boolean', value: true, description: 'Include pico lib bits') option('picocrt', type: 'boolean', value: true, description: 'Include pico crt bits') option('specsdir', type: 'string', description: 'Installation directory for .specs file') option('sysroot-install', type: 'boolean', value: false, description: 'Install in gcc sysroot') # # Testing options # option('native-tests', type: 'boolean', value: false, description: 'Run math tests against native libc too') option('tests', type: 'boolean', value: false, description: 'Enable tests') option('tests-enable-stack-protector', type: 'boolean', value: true, description: 'tests enable stack protector') option('tests-disable-full-malloc-stress', type: 'boolean', value: true, description: 'tests disable stress test for full malloc') option('newlib-tinystdio', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Use tiny stdio from avr libc') option('tinystdio', type: 'boolean', value: true, description: 'Use tiny stdio from avr libc') # # Options applying to both legacy stdio and tinystdio # option('io-c99-formats', type: 'boolean', value: true, description: 'enable C99 support in IO functions like printf/scanf') option('newlib-io-c99-formats', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'enable C99 support in IO functions like printf/scanf') option('io-long-long', type: 'boolean', value: false, description: 'enable long long type support in IO functions like printf/scanf') option('newlib-io-long-long', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'enable long long type support in IO functions like printf/scanf') # # Options applying only to tinystdio # option('io-float-exact', type: 'boolean', value: true, description: 'use float/string code which supports round-tripping') option('atomic-ungetc', type: 'boolean', value: true, description: 'use atomics in fgetc/ungetc to make them re-entrant') option('posix-io', type: 'boolean', value: true, description: 'Provide fopen/fdopen using POSIX I/O (open, close, read, write, lseek)') option('posix-console', type: 'boolean', value: false, description: 'Use POSIX I/O for stdin/stdout/stderr') # # Options applying to only legacy stdio # option('newlib-elix-level', type: 'integer', value: 0, description: 'desired elix library level (0-4)') option('newlib-fseek-optimization', type: 'boolean', value: false, description: 'enable fseek optimization') option('newlib-fvwrite-in-streamio', type: 'boolean', value: false, description: 'disable iov in streamio') option('newlib-global-stdio-streams', type: 'boolean', value: false, description: 'enable global stdio streams') option('newlib-io-float', type: 'boolean', value: false, description: 'enable printf/scanf family float support') option('newlib-io-pos-args', type: 'boolean', value: false, description: 'enable printf-family positional arg support') option('newlib-io-long-double', type: 'boolean', value: false, description: 'enable long double type support in IO functions printf/scanf (newlib stdio only)') option('newlib-nano-formatted-io', type: 'boolean', value: false, description: 'Use nano version formatted IO') option('newlib-reent-small', type: 'boolean', value: false, description: 'enable small reentrant struct support') option('newlib-stdio64', type: 'boolean', value: true, description: 'Include stdio64 with newlib stdio') option('newlib-unbuf-stream-opt', type: 'boolean', value: false, description: 'enable unbuffered stream optimization in streamio') option('newlib-wide-orient', type: 'boolean', value: false, description: 'Turn off wide orientation in streamio') # # Internationalization options # option('newlib-iconv-encodings', type: 'array', description: 'enable specific comma-separated list of bidirectional iconv encodings to be built-in') option('newlib-iconv-from-encodings', type: 'array', description: 'enable specific comma-separated list of "from" iconv encodings to be built-in') option('newlib-iconv-to-encodings', type: 'array', description: 'enable specific comma-separated list of "to" iconv encodings to be built-in') option('newlib-iconv-external-ccs', type: 'boolean', value:false, description: 'Load iconv CCS tables from files rather than having them built-in') option('newlib-iconv-dir', type: 'string', description: 'Installation directory for iconv CCS files') option('newlib-iconv-runtime-dir', type: 'string', description: 'Path used at runtime to locate iconv CCS files') option('newlib-locale-info', type: 'boolean', value: false, description: 'locale support') option('newlib-locale-info-extended', type: 'boolean', value: false, description: 'extended locale support') option('newlib-mb', type: 'boolean', value: false, description: 'enable multibyte support') # # Startup/shutdown options # option('lite-exit', type: 'boolean', value: true, description: 'enable light weight exit') option('newlib-atexit-dynamic-alloc', type: 'boolean', value: false, description: 'enable dynamic allocation of atexit entries') option('newlib-global-atexit', type: 'boolean', value: false, description: 'enable atexit data structure as global') option('newlib-initfini', type: 'boolean', value: true, description: 'Supports _init() and _fini()') option('newlib-initfini-array', type: 'boolean', value: true, description: 'compiler supports INIT_ARRAY section types') option('newlib-register-fini', type: 'boolean', value: false, description: 'enable finalization function registration using atexit') # # Malloc option # option('newlib-nano-malloc', type: 'boolean', value: true, description: 'use small-footprint nano-malloc implementation') # # Locking support # option('newlib-multithread', type: 'boolean', value: false, description: 'enable support for multiple threads') option('newlib-retargetable-locking', type: 'boolean', value: false, description: 'Allow locking routines to be retargeted at link time') # # Thread-local storage support # option('thread-local-storage', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'use thread local storage for static data (default: automatically detect support)') option('tls-model', type: 'string', value: 'local-exec', description: 'tls model (global-dynamic, local-dynamic, initial-exec or local-exec)') option('newlib-global-errno', type: 'boolean', value: false, description: 'use global errno variable') # # Math options # # Use "obsolete" math code, which use 'float' for 'float' functions # instead of the newer code which uses 'double' instead. # option('newlib-obsolete-math', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Use float type for float valued math routines (default: automatic based on platform)') option('newlib-obsolete-math-float', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Use old math code that uses float type for float valued math routines (default: automatic based on platform)') option('newlib-obsolete-math-double', type: 'combo', choices: ['true', 'false', 'auto'], value: 'auto', description: 'Use old math code for double valued math routines (default: automatic based on platform)') option('want-math-errno', type: 'boolean', value: false, description: 'Set errno in math functions according to stdc (default: false)') # # Obsolete newlib options # option('newlib-long-time_t', type: 'boolean', value: false, description: 'define time_t to long instead of a 64-bit type') option('newlib-missing-syscall-names', type: 'boolean', value: false, description: 'system only provides regular syscall API') option('newlib-reentrant-syscalls-provided', type: 'boolean', value: false, description: 'system provides reentrant syscall API') option('newlib-supplied-syscalls', type: 'boolean', value: false, description: 'newlib supplies system call functions')