This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Tue, May 31, 2011 at 5:13 AM, Yann E. MORIN
<yann.morin.1998@anciens.enib.fr> wrote:
> # HG changeset patch
> # User Bryan Hundven <bryanhundven@gmail.com>
> # Date 1306822450 25200
> # Node ID 2b8da144f6a51d1f82f53cd7e564c0dc59f190f0
> # Parent Â94a989d4e73b60775a1bfcfb0fc05790017f165d
> config/cc: CC_STATIC_LIBSTDCXX 'depends on' CONFIGURE_has_static_libstdcpp
>
> Hide the staticaly linked libstdc++ option if the static libstdc++ is not
> present, detected at configure time.
>
> Add a blind option that says whether static linking is possible at all.
> It defaults to 'y', but depends on the needed CONFIGURE_* options. For
> now, it only depends on static libtdc++, but new dependencies can be
> easily added.
>
> Hide the global static toolchain option behind this new option.
>
> Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
> [yann.morin.1998@anciens.enib.fr: change logic to keep forward deps]
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
>
> diff --git a/config/cc/gcc.in.2 b/config/cc/gcc.in.2
> --- a/config/cc/gcc.in.2
> +++ b/config/cc/gcc.in.2
> @@ -64,6 +64,7 @@
> Â Â bool
> Â Â prompt "Link libstdc++ statically into the gcc binary"
> Â Â default y
> + Â Âdepends on CONFIGURE_has_static_libstdcxx
> Â Â depends on CC_GCC_4_4_or_later
> Â Â help
> Â Â Â Newer gcc versions use the PPL library which is C++ code. ÂStatically
> diff --git a/config/toolchain.in b/config/toolchain.in
> --- a/config/toolchain.in
> +++ b/config/toolchain.in
> @@ -47,10 +47,19 @@
> Â Â Â In fact, the sysroot path is constructed as:
> Â Â Â Â ${CT_PREFIX_DIR}/${CT_TARGET}/${CT_SYSROOT_DIR_PREFIX}/${CT_SYSROOT_NAME}
>
> +# 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?

> Âconfig STATIC_TOOLCHAIN
> Â Â bool
> Â Â prompt "Build Static Toolchain (EXPERIMENTAL)"
> Â Â depends on EXPERIMENTAL
> + Â Âdepends on STATIC_TOOLCHAIN_POSSIBLE
> Â Â default n
> Â Â help
> Â Â Â Build static host binaries.
> diff --git a/configure b/configure
> --- a/configure
> +++ b/configure
> @@ -436,6 +436,10 @@
> Âhas_or_abort lib="${stdcxx_libs}" \
> Â Â Â Â Â Â Âerr="'libstdc++' shared library was not found"
>
> +has_or_warn Âlib="libstdc++.a" \
> + Â Â Â Â Â Â err="'libstdc++' static library was not found" \
> + Â Â Â Â Â Â kconfig=has_static_libstdcxx
> +
> Â#---------------------------------------------------------------------
> Â# Compute the version string
>
>

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]