mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2024-12-19 12:57:53 +00:00
Bring in FreeBSD support
Check for FreeBSD specific issues, it is mostly the same as Darwin. Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
This commit is contained in:
parent
25c55cd5d7
commit
f2f782dd1c
@ -17,6 +17,9 @@ do_finish() {
|
||||
*darwin*)
|
||||
strip_args=""
|
||||
;;
|
||||
*freebsd*)
|
||||
strip_args="--strip-all"
|
||||
;;
|
||||
*)
|
||||
strip_args="--strip-all -v"
|
||||
;;
|
||||
|
@ -103,24 +103,28 @@ do_kernel_headers() {
|
||||
esac
|
||||
|
||||
CT_DoLog EXTRA "Installing kernel headers"
|
||||
CT_DoExecLog ALL \
|
||||
make -C "${kernel_path}" \
|
||||
CROSS_COMPILE="${CT_TARGET}-" \
|
||||
O="${CT_BUILD_DIR}/build-kernel-headers" \
|
||||
ARCH=${kernel_arch} \
|
||||
INSTALL_HDR_PATH="${CT_SYSROOT_DIR}/usr" \
|
||||
${V_OPT} \
|
||||
CT_DoExecLog ALL \
|
||||
make -C "${kernel_path}" \
|
||||
BASH="$(which bash)" \
|
||||
HOSTCC="${CT_BUILD}-gcc" \
|
||||
CROSS_COMPILE="${CT_TARGET}-" \
|
||||
O="${CT_BUILD_DIR}/build-kernel-headers" \
|
||||
ARCH=${kernel_arch} \
|
||||
INSTALL_HDR_PATH="${CT_SYSROOT_DIR}/usr" \
|
||||
${V_OPT} \
|
||||
headers_install
|
||||
|
||||
if [ "${CT_KERNEL_LINUX_INSTALL_CHECK}" = "y" ]; then
|
||||
CT_DoLog EXTRA "Checking installed headers"
|
||||
CT_DoExecLog ALL \
|
||||
make -C "${kernel_path}" \
|
||||
CROSS_COMPILE="${CT_TARGET}-" \
|
||||
O="${CT_BUILD_DIR}/build-kernel-headers" \
|
||||
ARCH=${kernel_arch} \
|
||||
INSTALL_HDR_PATH="${CT_SYSROOT_DIR}/usr" \
|
||||
${V_OPT} \
|
||||
CT_DoExecLog ALL \
|
||||
make -C "${kernel_path}" \
|
||||
BASH="$(which bash)" \
|
||||
HOSTCC="${CT_BUILD}-gcc" \
|
||||
CROSS_COMPILE="${CT_TARGET}-" \
|
||||
O="${CT_BUILD_DIR}/build-kernel-headers" \
|
||||
ARCH=${kernel_arch} \
|
||||
INSTALL_HDR_PATH="${CT_SYSROOT_DIR}/usr" \
|
||||
${V_OPT} \
|
||||
headers_check
|
||||
fi
|
||||
|
||||
|
@ -346,13 +346,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}" )
|
||||
|
Loading…
Reference in New Issue
Block a user