# HG changeset patch # User "Yann E. MORIN" # Date 1309201420 -7200 # Node ID e5fb003a354c33e9ac1bfcf5959677f0623e7e0a # Parent 00054087dab2f7d17ecd9cc78d7a8fcd5295d4ff configure: disable static linking on Darwin Static liunking is not supported on Darwin, so hide the corresponding options when the build machine is Darwin. Reported-by: Andrea Franceschini Reported-by: Bryan Hundven Reported-by: "Titus von Boxberg" Signed-off-by: "Yann E. MORIN" diff -r 00054087dab2 -r e5fb003a354c config/cc/gcc.in.2 --- a/config/cc/gcc.in.2 Tue Jun 28 17:25:02 2011 +0200 +++ b/config/cc/gcc.in.2 Mon Jun 27 21:03:40 2011 +0200 @@ -44,6 +44,7 @@ bool prompt "Link libstdc++ statically into the gcc binary" default y + depends on CONFIGURE_static_link_ok depends on CONFIGURE_has_static_libstdcxx depends on CC_GCC_4_4_or_later help diff -r 00054087dab2 -r e5fb003a354c config/debug/gdb.in.cross --- a/config/debug/gdb.in.cross Tue Jun 28 17:25:02 2011 +0200 +++ b/config/debug/gdb.in.cross Mon Jun 27 21:03:40 2011 +0200 @@ -24,6 +24,7 @@ config GDB_CROSS_STATIC bool prompt "Build a static cross gdb" + depends on CONFIGURE_static_link_ok depends on CONFIGURE_has_static_expat help A static cross gdb can be usefull if you debug on a machine that is diff -r 00054087dab2 -r e5fb003a354c config/toolchain.in --- a/config/toolchain.in Tue Jun 28 17:25:02 2011 +0200 +++ b/config/toolchain.in Mon Jun 27 21:03:40 2011 +0200 @@ -51,6 +51,7 @@ config STATIC_TOOLCHAIN_POSSIBLE bool default y + depends on CONFIGURE_static_link_ok depends on CONFIGURE_has_static_libstdcxx # Add new deps here! :-) diff -r 00054087dab2 -r e5fb003a354c configure --- a/configure Tue Jun 28 17:25:02 2011 +0200 +++ b/configure Mon Jun 27 21:03:40 2011 +0200 @@ -449,6 +449,30 @@ ;; esac +printf "Checking if static linking is possible... " +static_link_ok="" +case "${host}" in + Darwin) ;; + *) tmp=.static.tmp + if gcc -xc - -static -o "${tmp}" >/dev/null 2>&1<<-_EOF_ + int main() { return 0; } + _EOF_ + then + static_link_ok="y" + fi + rm -f "${tmp}" + ;; +esac +if [ "${static_link_ok}" = "y" ]; then + printf "yes\n" +else + printf "no\n" + printf " * An optional host feature is missing, some features will be disabled:\n" + printf " * - It will not be possible to statically link toolchain's binaries\n" +fi +add_to_kconfig_list static_link_ok + +# Library checks ncurses_hdrs="ncurses/ncurses.h ncurses/curses.h ncurses.h curses.h" ncurses_libs="$( for l in ncursesw ncurses curses; do \ for x in so a dylib; do \