From 9e81836b8124efd11805e8050034492a8831208b Mon Sep 17 00:00:00 2001 From: Ray Donnelly Date: Sat, 24 Oct 2015 01:49:56 +0100 Subject: Add gettext and libiconv as companion libs .. they're needed for the RPC generation in glibc on both Cygwin and MinGW-w64. Neither are built on GNU/Linux and iconv is not built on Darwin. Two patches for gettext are needed, one so that -O0 works and one so that static builds can be made. They can take a good while to build, so if not needed for_host or for_build then they are not built. Signed-off-by: Ray Donnelly --- scripts/build/libc/glibc.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'scripts/build/libc') diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh index 6a840174..cfdacf0b 100644 --- a/scripts/build/libc/glibc.sh +++ b/scripts/build/libc/glibc.sh @@ -377,6 +377,20 @@ do_libc_backend_once() { CT_LDFLAGS_FOR_BUILD+=" ${CT_EXTRA_LDFLAGS_FOR_BUILD}" extra_make_args+=( "BUILD_CFLAGS=${CT_CFLAGS_FOR_BUILD}" "BUILD_LDFLAGS=${CT_LDFLAGS_FOR_BUILD}" ) + case "$CT_BUILD" in + *mingw*|*cygwin*|*msys*) + # When installing headers on Cygwin, MSYS2 and MinGW-w64 sunrpc needs + # gettext for building cross-rpcgen. + extra_make_args+=( BUILD_CPPFLAGS="-I${CT_BUILDTOOLS_PREFIX_DIR}/include/" ) + extra_make_args+=( BUILD_LDFLAGS="-L${CT_BUILDTOOLS_PREFIX_DIR}/lib -Wl,-Bstatic -lintl -liconv -Wl,-Bdynamic" ) + ;; + *darwin*) + # .. and the same goes for Darwin. + extra_make_args+=( BUILD_CPPFLAGS="-I${CT_BUILDTOOLS_PREFIX_DIR}/include/" ) + extra_make_args+=( BUILD_LDFLAGS="-L${CT_BUILDTOOLS_PREFIX_DIR}/lib -lintl" ) + ;; + esac + if [ "${libc_headers}" = "y" ]; then CT_DoLog EXTRA "Installing C library headers" -- cgit v1.2.3