On Wed, Sep 12, 2012 at 2:04 PM, Joseph S. Myers <jos...@codesourcery.com> wrote: > On Wed, 12 Sep 2012, Ian Lance Taylor wrote: > >> On Wed, Sep 12, 2012 at 9:23 AM, Joseph S. Myers >> <jos...@codesourcery.com> wrote: >> > On Tue, 11 Sep 2012, Ian Lance Taylor wrote: >> > >> >> The configury is fairly standard. Note that libbacktrace is built as >> >> both a host library (to link into the compilers) and as a target library >> >> (to link into libgo and possibly other libraries). >> > >> > Under what circumstances will the library be built for the target - only >> > if a relevant language such as Go is being built, or unconditionally? >> >> My intent is to only build it when something needs it, e.g., libgo. I >> don't know if I've expressed that intent correctly. > > I think that if a library is listed in target_libs in config-lang.in for > at least one language, and if all languages with it so listed are > disabled, then that library will be disabled - but if no languages list it > in config-lang.in, it will be enabled by default.
Looks right. If libbacktrace is approved and committed, I will included this patch to gcc/go/config-lang.in. I tested that it indeed causes libbacktrace to be built only for the host, not for the target, when not building Go. Ian Index: gcc/go/config-lang.in =================================================================== --- gcc/go/config-lang.in (revision 191171) +++ gcc/go/config-lang.in (working copy) @@ -28,7 +28,7 @@ language="go" compilers="go1\$(exeext)" -target_libs="target-libgo target-libffi" +target_libs="target-libgo target-libffi target-libbacktrace" # The Go frontend is written in C++, so we need to build the C++ # compiler during stage 1.