[PATCH 2 of 3] config/cc: CC_STATIC_LIBSTDCXX 'depends on' CONFIGURE_has_static_libstdcpp

Yann E. MORIN yann.morin.1998@anciens.enib.fr
Wed Jun 1 00:05:00 GMT 2011


Bryan, All,

On Tuesday 31 May 2011 16:36:32 Bryan Hundven wrote:
> On Tue, May 31, 2011 at 5:13 AM, Yann E. MORIN
> <yann.morin.1998@anciens.enib.fr> wrote:
[--SNIP--]
> > +# In case we need to add more conditions to enable static
> > +# toolchain, we'll be adding them here
> > +config STATIC_TOOLCHAIN_POSSIBLE
> > +    bool
> > +    default y
> > +    depends on CONFIGURE_has_static_libstdcxx
> > +    # Add new deps here! :-)
> > +
> 
> Why? I don't understand why you want a config option with its own set
> of dependencies... this will cause more problems in the future then
> will solve. Another patch I don't get.
> 
> Why not just put the dependency in STATIC_TOOLCHAIN where it belongs?

For this particular case, I agree with you: adding the dependency directly
to the affected symbol would be more appropriate.

On the other hand, this is begining to be quite complex, and I envision a
situation where the list of dependencies could grow very, very quickly. To
keep that kconfig part readable, it seems more fit to move the CONFIGURE_*
dependencies to an intermediate symbol.

Apart from the required static libstdc++, we also need to check for other
libs static format being available. At least we need libc.a, probably libm.a
and a few others.

Another reason is that we may have to disable shared building, and be able
to force static build. Having separate intermediate symbols for the deps
will highly simplify that kconfig part.

> >  config STATIC_TOOLCHAIN
> >     bool
> >     prompt "Build Static Toolchain (EXPERIMENTAL)"
> >     depends on EXPERIMENTAL
> > +    depends on STATIC_TOOLCHAIN_POSSIBLE
> >     default n
> >     help
> >       Build static host binaries.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list