opnsense-src/sys/modules/linux_common/Makefile
Ed Maste 6e481f83f7 Share a single bsd-linux errno table across MD consumers
Three copies of the linuxulator linux_sysvec.c contained identical
BSD to Linux errno translation tables, and future work to support other
architectures will also use the same table.  Move the table to a common
file to be used by all.  Make it 'const int' to place it in .rodata.

(Some existing Linux architectures use MD errno values, but x86 and Arm
share the generic set.)

This change should introduce no functional change; a followup will add
missing errno values.

MFC after:	3 weeks
Sponsored by:	Turing Robotic Industries Inc.
Differential Revision:	https://reviews.freebsd.org/D14665
2018-03-16 14:46:38 +00:00

27 lines
589 B
Makefile

# $FreeBSD$
.PATH: ${SRCTOP}/sys/compat/linux
KMOD= linux_common
SRCS= linux_common.c linux_mib.c linux_mmap.c linux_util.c linux_emul.c \
linux_errno.c \
linux.c opt_compat.h device_if.h vnode_if.h bus_if.h
EXPORT_SYMS=
EXPORT_SYMS+= bsd_to_linux_errno_generic
EXPORT_SYMS+= linux_emul_path
EXPORT_SYMS+= linux_ioctl_register_handler
EXPORT_SYMS+= linux_ioctl_unregister_handler
EXPORT_SYMS+= linux_get_osname
EXPORT_SYMS+= linux_get_osrelease
.if !defined(KERNBUILDDIR)
.if defined(DEBUG)
CFLAGS+=-DDEBUG
.endif
.if defined(KTR)
CFLAGS+=-DKTR
.endif
.endif
.include <bsd.kmod.mk>