mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-07 00:50:50 +00:00
Enable building tar for non-FreeBSD host
For DIRDEPS_BUILD we need Makefile.depend.options to force libegacy to be built on older FreeBSD and non-FreeBSD hosts. Add readpassphrase to libegacy to avoid the need for libbsd on Linux src.opts.mk disable TESTS for host if MK_host_egacy is yes Reviewed by: imp Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D39766
This commit is contained in:
parent
c5b5f2d808
commit
976ba7f02a
|
@ -100,7 +100,9 @@
|
||||||
#define HAVE_DIRENT_H 1
|
#define HAVE_DIRENT_H 1
|
||||||
#define HAVE_DIRFD 1
|
#define HAVE_DIRFD 1
|
||||||
#define HAVE_DLFCN_H 1
|
#define HAVE_DLFCN_H 1
|
||||||
|
#ifndef __linux__
|
||||||
#define HAVE_D_MD_ORDER 1
|
#define HAVE_D_MD_ORDER 1
|
||||||
|
#endif
|
||||||
#define HAVE_EFTYPE 1
|
#define HAVE_EFTYPE 1
|
||||||
#define HAVE_EILSEQ 1
|
#define HAVE_EILSEQ 1
|
||||||
#define HAVE_ERRNO_H 1
|
#define HAVE_ERRNO_H 1
|
||||||
|
|
|
@ -360,6 +360,12 @@ __DEFAULT_YES_OPTIONS+=NETLINK_SUPPORT
|
||||||
__DEFAULT_NO_OPTIONS+=NETLINK_SUPPORT
|
__DEFAULT_NO_OPTIONS+=NETLINK_SUPPORT
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
|
# MK_host_egacy is set by local.sys.mk so is valid here
|
||||||
|
.if ${MACHINE} == "host" && ${MK_host_egacy} == "yes"
|
||||||
|
# we cannot expect tests to work
|
||||||
|
BROKEN_OPTIONS+= TESTS
|
||||||
|
.endif
|
||||||
|
|
||||||
.-include <site.src.opts.mk>
|
.-include <site.src.opts.mk>
|
||||||
|
|
||||||
.include <bsd.mkopt.mk>
|
.include <bsd.mkopt.mk>
|
||||||
|
|
|
@ -208,6 +208,18 @@ CFLAGS.closefrom.c+= -DSTDC_HEADERS -DHAVE_SYS_DIR_H -DHAVE_DIRENT_H \
|
||||||
SRCS+= progname.c
|
SRCS+= progname.c
|
||||||
# Stub implementations of fflagstostr/strtofflags
|
# Stub implementations of fflagstostr/strtofflags
|
||||||
SRCS+= fflags.c
|
SRCS+= fflags.c
|
||||||
|
|
||||||
|
# tar needs readpassphrase
|
||||||
|
# the version from openssh is already "portable"
|
||||||
|
# but we need to take care with .PATH as we
|
||||||
|
# do not want getopt_long.c from crypto/openssh/openbsd-compat
|
||||||
|
# and we do not want readpassphrase.c from libc/gen
|
||||||
|
.PATH: ${SRCTOP}/crypto/openssh
|
||||||
|
OBJS_SRCS_FILTER= T R
|
||||||
|
SRCS+= openbsd-compat/readpassphrase.c
|
||||||
|
|
||||||
|
INCS+= ${SRCTOP}/crypto/openssh/openbsd-compat/readpassphrase.h
|
||||||
|
|
||||||
.endif # ${MAKE.OS} == "Linux"
|
.endif # ${MAKE.OS} == "Linux"
|
||||||
|
|
||||||
.if ${.MAKE.OS} == "Darwin"
|
.if ${.MAKE.OS} == "Darwin"
|
||||||
|
|
4
tools/build/cross-build/include/linux/includes.h
Normal file
4
tools/build/cross-build/include/linux/includes.h
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
#include <sys/cdefs.h>
|
||||||
|
#include <paths.h>
|
||||||
|
|
||||||
|
#define DEF_WEAK(a)
|
11
usr.bin/tar/Makefile.depend.host
Normal file
11
usr.bin/tar/Makefile.depend.host
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
# $FreeBSD$
|
||||||
|
# Autogenerated - do NOT edit!
|
||||||
|
|
||||||
|
DIRDEPS = \
|
||||||
|
|
||||||
|
|
||||||
|
.include <dirdeps.mk>
|
||||||
|
|
||||||
|
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
|
||||||
|
# local dependencies - needed for -jN in clean tree
|
||||||
|
.endif
|
6
usr.bin/tar/Makefile.depend.options
Normal file
6
usr.bin/tar/Makefile.depend.options
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
DIRDEPS_OPTIONS = host_egacy
|
||||||
|
|
||||||
|
DIRDEPS.host_egacy.yes = tools/build
|
||||||
|
|
||||||
|
.include <dirdeps-options.mk>
|
||||||
|
|
Loading…
Reference in a new issue