From 08ebd6ec3db26f34ea4fcb04fc475aec5e26ad73 Mon Sep 17 00:00:00 2001 From: "Yann E. MORIN\"" Date: Thu, 2 Jun 2011 19:50:12 +0200 Subject: cc/gcc: 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. Original patch by Bryan Hundven Signed-off-by: "Yann E. MORIN" --- configure | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 69822575..d0c032a1 100755 --- a/configure +++ b/configure @@ -437,6 +437,14 @@ stdcxx_libs="$( for x in so dylib a; do \ has_or_abort lib="${stdcxx_libs}" \ err="'libstdc++' shared library was not found" +# Yes, we may be checking twice for libstdc++.a +# The first is because we need one instance of libstdc++ (shared or static) +# because it is needed for PPL; the second is because the static version is +# required for static-linking, and if missing, the option is removed. +has_or_warn lib="libstdc++.a" \ + err="static 'libstdc++' is needed to statically link the toolchain's executables" \ + kconfig=has_static_libstdcxx + #--------------------------------------------------------------------- # Compute the version string -- cgit v1.2.3