Backtrace library [1/3]

Message ID
State New
Headers show

Commit Message

Ian Taylor Sept. 13, 2012, 4:59 a.m.
On Wed, Sep 12, 2012 at 2:04 PM, Joseph S. Myers
<> wrote:
> On Wed, 12 Sep 2012, Ian Lance Taylor wrote:
>> On Wed, Sep 12, 2012 at 9:23 AM, Joseph S. Myers
>> <> 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 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, it will be enabled by default.

Looks right.  If libbacktrace is approved and committed, I will
included this patch to gcc/go/  I tested that it indeed
causes libbacktrace to be built only for the host, not for the target,
when not building Go.



Index: gcc/go/
--- gcc/go/	(revision 191171)
+++ gcc/go/	(working copy)
@@ -28,7 +28,7 @@  language="go"


-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.