Merge pull request #627 from dankm/freebsd

FreeBSD build support
This commit is contained in:
Alexey Neyman
2017-03-07 08:50:43 -08:00
committed by GitHub
23 changed files with 50 additions and 225 deletions

View File

@ -247,6 +247,10 @@ do_libc_backend_once() {
[ -n "${CT_TOOLCHAIN_BUGURL}" ] && extra_config+=("--with-bugurl=${CT_TOOLCHAIN_BUGURL}")
touch config.cache
# Hide host C++ binary from configure
echo "ac_cv_prog_ac_ct_CXX=${CT_TARGET}-g++" >>config.cache
if [ "${CT_LIBC_GLIBC_FORCE_UNWIND}" = "y" ]; then
echo "libc_cv_forced_unwind=yes" >>config.cache
echo "libc_cv_c_cleanup=yes" >>config.cache
@ -346,13 +350,21 @@ do_libc_backend_once() {
build_ldflags="${CT_LDFLAGS_FOR_BUILD}"
case "$CT_BUILD" in
*mingw*|*cygwin*|*msys*|*darwin*)
*mingw*|*cygwin*|*msys*|*darwin*|*freebsd*)
# When installing headers on Cygwin, Darwin, MSYS2 and MinGW-w64 sunrpc needs
# gettext for building cross-rpcgen.
build_cppflags="${build_cppflags} -I${CT_BUILDTOOLS_PREFIX_DIR}/include/"
build_ldflags="${build_ldflags} -lintl -liconv"
case "$CT_BUILD" in
*cygwin*|*freebsd*)
# Additionally, stat in FreeBSD, Cygwin, and possibly others
# is always 64bit, so replace struct stat64 with stat.
build_cppflags="${build_cppflags} -Dstat64=stat"
;;
esac
;;
esac
extra_make_args+=( "BUILD_CFLAGS=${build_cflags}" )
extra_make_args+=( "BUILD_CPPFLAGS=${build_cppflags}" )
extra_make_args+=( "BUILD_LDFLAGS=${build_ldflags}" )