Embedded toolchains face conflicting requirements from different
customers. Some need the best possible speed while others are tightly
size constrained. To avoid having every toolchain user need to
re-compile all libraries, it's convenient to add -Os/-Oz as an
additional multilib selector so that provided libraries will be built
both ways.

This series provides a new configure time options,
--enable-multilib-space, which takes each library configuration and
adds a duplicate with -Os appended.

When this option is not enabled, there is no effect on the resulting
toolchain.

This series includes a couple of preparatory changes:

 * To make this pass the right compiler flags while building libgcc,
   any -Os or -Oz option included in CFLAGS is appended to the arguments
   to override the -O2 option present in LIBGCC2_CFLAGS.

 * The arm multilib configuration was missing a couple of
   MULTILIB_DEFAULTS values that don't affect "normal" operation but
   break things when -Os is added.

Keith Packard (3):
  libgcc: Use -Os/-Oz from CC or CFLAGS
  arm: Add missing multilib default values
  gcc: Add --enable-multilib-space option

 config-ml.in              |  2 +-
 gcc/Makefile.in           | 32 +++++++++++++++++++++++++++-----
 gcc/config/arm/arm-mlib.h |  2 +-
 gcc/configure             | 13 +++++++++++++
 gcc/configure.ac          |  7 +++++++
 gcc/doc/install.texi      | 12 ++++++++++++
 libgcc/Makefile.in        | 10 +++++++---
 7 files changed, 68 insertions(+), 10 deletions(-)

-- 
2.49.0

Reply via email to