freebsd-dev/usr.sbin/jail/Makefile
Ed Maste 1da495d063 revert r354935 and apply fix for cleandir failure
This reapplies the RISC-V GNU ld workaround from r354896, r354899, and
354900, along with a fix for the build failure during cleandir.

LINKER_TYPE was not being set during cleandir, resulting in
Malformed conditional (${LINKER_TYPE} == "bfd" && ${MACHINE} == "riscv")
from Cirrus-CI.

PR:		242109
Sponsored by:	The FreeBSD Foundation
2019-11-21 13:56:16 +00:00

38 lines
714 B
Makefile

# $FreeBSD$
.include <src.opts.mk>
PROG= jail
MAN= jail.8 jail.conf.5
SRCS= jail.c command.c config.c state.c jailp.h jaillex.l jailparse.y y.tab.h
LIBADD= jail kvm util
PACKAGE=jail
NO_WMISSING_VARIABLE_DECLARATIONS=
YFLAGS+=-v
CFLAGS+=-I. -I${.CURDIR}
# workaround for GNU ld (GNU Binutils) 2.33.1:
# relocation truncated to fit: R_RISCV_GPREL_I against `.LANCHOR2'
# https://bugs.freebsd.org/242109
.if defined(LINKER_TYPE) && ${LINKER_TYPE} == "bfd" && ${MACHINE} == "riscv"
CFLAGS+=-Wl,--no-relax
.endif
.if ${MK_INET6_SUPPORT} != "no"
CFLAGS+= -DINET6
.endif
.if ${MK_INET_SUPPORT} != "no"
CFLAGS+= -DINET
.endif
CLEANFILES= y.output
HAS_TESTS=
SUBDIR.${MK_TESTS}+= tests
.include <bsd.prog.mk>