embeddedartistry / libc

libc targeted for embedded systems usage. Reduced set of functionality (due to embedded nature). Chosen for portability and quick bringup.
MIT License
524 stars 67 forks source link

Support configuration of printf options in Meson #163

Open phillipjohnston opened 2 years ago

phillipjohnston commented 2 years ago

Based on #159, we have a new printf implementation. This uses CMake and has a configuration header input, among a number of options. These options similarly should be exposed to Meson.

One option here is to try to find a simple way to do it in the toplevel libc build. Another option is to create a Meson equivalent. We can either use that exclusively in our fork or work on getting it merged into the eyalroz/printf repository.

phillipjohnston commented 2 years ago

Note this define will be necessary:

// Define this globally (e.g. gcc -DPRINTF_INCLUDE_CONFIG_H ...) to include the
// printf_config.h header file
#ifndef PRINTF_INCLUDE_CONFIG_H
#define PRINTF_INCLUDE_CONFIG_H 0
#endif