summaryrefslogtreecommitdiff
path: root/scripts/build/libc
diff options
context:
space:
mode:
authorRay Donnelly <mingw.android@gmail.com>2015-10-24 00:49:56 (GMT)
committerRay Donnelly <mingw.android@gmail.com>2015-11-13 02:17:45 (GMT)
commit9e81836b8124efd11805e8050034492a8831208b (patch)
tree35677ac92a2a793a229659c548cd540628f0e317 /scripts/build/libc
parentf9968501eeacbe6c289c93d87243473d78eb8d5c (diff)
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 <mingw.android@gmail.com>
Diffstat (limited to 'scripts/build/libc')
-rw-r--r--scripts/build/libc/glibc.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/scripts/build/libc/glibc.sh b/scripts/build/libc/glibc.sh
index 6a84017..cfdacf0 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"