mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-19 04:47:52 +00:00
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 <therealmorpheu5@gmail.com> Reported-by: Bryan Hundven <bryanhundven@gmail.com> Reported-by: "Titus von Boxberg" <titus@v9g.de> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
This commit is contained in:
parent
87425910c2
commit
74a50972fb
@ -44,6 +44,7 @@ config CC_STATIC_LIBSTDCXX
|
||||
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
|
||||
|
@ -24,6 +24,7 @@ if GDB_CROSS
|
||||
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
|
||||
|
@ -51,6 +51,7 @@ config SYSROOT_DIR_PREFIX
|
||||
config STATIC_TOOLCHAIN_POSSIBLE
|
||||
bool
|
||||
default y
|
||||
depends on CONFIGURE_static_link_ok
|
||||
depends on CONFIGURE_has_static_libstdcxx
|
||||
# Add new deps here! :-)
|
||||
|
||||
|
24
configure
vendored
24
configure
vendored
@ -449,6 +449,30 @@ case "${host}" in
|
||||
;;
|
||||
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 \
|
||||
|
Loading…
Reference in New Issue
Block a user