Overview

GCC 4.3 will be the first release where libgcc is not built from inside the GCC subdirectory. Instead, it is built from the libgcc subdirectory. The libgcc build system lives in this directory; but most of the source files and machine-specific configuration still come from gcc. Here's how you can help improve that. What's the point? Well, when libgcc no longer requires configuration data recorded during the gcc build process, it will be possible to build it separately from gcc. That's convenient especially during system bringup.

Target Macros

The machine-specific configuration headers in gcc define several macros that are also used in libgcc. These macros must be made available during the compilation of libgcc (by having the compiler define them) or by moving their definitions into headers residing in libgcc. The same issue applies to other libraries built for the target. A hopefully complete (as of 2014-09-08, but not including macros that are tested in libgcc code but have no non-default definitions for any target) list of relevant macros which remain to be addressed in libgcc and other code built for the target follows.

ROUND_TYPE_SIZE (removed from targets in 2003 but still used in libobjc)

STRUCT_VALUE

libobjc/thr.c includes tm.h but only uses target macros via their use in gthr.h

Source Files

Source files still live usually in the GCC subdirectory. It's easy to migrate them to libgcc once all references are in libgcc; just update references in the libgcc configure fragments to use $(srcdir) instead of $(gcc_srcdir). This is currently (2011-08-11) being worked in in multiple stages: