git: 097e0b895576 - stable/12 - Add warning to the Linuxulator makefiles that building it outside of a kernel does not make sence.

Dmitry Chagin dchagin at FreeBSD.org
Sat Mar 20 15:18:50 UTC 2021


The branch stable/12 has been updated by dchagin:

URL: https://cgit.FreeBSD.org/src/commit/?id=097e0b8955762c043b01ba247e59d704a83d222a

commit 097e0b8955762c043b01ba247e59d704a83d222a
Author:     Dmitry Chagin <dchagin at FreeBSD.org>
AuthorDate: 2019-05-13 18:28:40 +0000
Commit:     Dmitry Chagin <dchagin at FreeBSD.org>
CommitDate: 2021-03-20 15:18:01 +0000

    Add warning to the Linuxulator makefiles that building it outside of a
    kernel does not make sence.
    
    PR:             222861
    MFC after:      2 weeks
    Differential Revision:  https://reviews.freebsd.org/D20179
    
    (cherry picked from commit 6e4cf32e95841b4c3ef0caeb80802bf528a35cd0)
---
 sys/modules/linprocfs/Makefile    | 4 ++++
 sys/modules/linsysfs/Makefile     | 4 ++++
 sys/modules/linux/Makefile        | 4 ++++
 sys/modules/linux64/Makefile      | 4 ++++
 sys/modules/linux_common/Makefile | 4 ++++
 5 files changed, 20 insertions(+)

diff --git a/sys/modules/linprocfs/Makefile b/sys/modules/linprocfs/Makefile
index 6408a9882147..fa7ac8725d14 100644
--- a/sys/modules/linprocfs/Makefile
+++ b/sys/modules/linprocfs/Makefile
@@ -7,4 +7,8 @@ SRCS=	vnode_if.h \
 	device_if.h bus_if.h \
 	linprocfs.c
 
+.if !defined(KERNBUILDDIR)
+.warning Building Linuxulator outside of a kernel does not make sense
+.endif
+
 .include <bsd.kmod.mk>
diff --git a/sys/modules/linsysfs/Makefile b/sys/modules/linsysfs/Makefile
index 6eaa844e9ea5..058fbbc521b1 100644
--- a/sys/modules/linsysfs/Makefile
+++ b/sys/modules/linsysfs/Makefile
@@ -7,4 +7,8 @@ SRCS=	vnode_if.h \
 	device_if.h bus_if.h  pci_if.h \
 	linsysfs.c
 
+.if !defined(KERNBUILDDIR)
+.warning Building Linuxulator outside of a kernel does not make sense
+.endif
+
 .include <bsd.kmod.mk>
diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile
index 7ff1fdd1a17e..7065c1f0f6cd 100644
--- a/sys/modules/linux/Makefile
+++ b/sys/modules/linux/Makefile
@@ -80,4 +80,8 @@ ${VDSO}.so: linux${SFX}_locore.o
 linux${SFX}_genassym.o: offset.inc
 	${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon ${.IMPSRC}
 
+.if !defined(KERNBUILDDIR)
+.warning Building Linuxulator outside of a kernel does not make sense
+.endif
+
 .include <bsd.kmod.mk>
diff --git a/sys/modules/linux64/Makefile b/sys/modules/linux64/Makefile
index f084df6cc466..046eeeda30f2 100644
--- a/sys/modules/linux64/Makefile
+++ b/sys/modules/linux64/Makefile
@@ -55,4 +55,8 @@ linux_support.o: assym.inc linux_assym.h
 linux_genassym.o: offset.inc
 	${CC} -c ${CFLAGS:N-flto:N-fno-common} -fcommon ${.IMPSRC}
 
+.if !defined(KERNBUILDDIR)
+.warning Building Linuxulator outside of a kernel does not make sense
+.endif
+
 .include <bsd.kmod.mk>
diff --git a/sys/modules/linux_common/Makefile b/sys/modules/linux_common/Makefile
index 9fb0210810fb..5b49a7409997 100644
--- a/sys/modules/linux_common/Makefile
+++ b/sys/modules/linux_common/Makefile
@@ -15,4 +15,8 @@ EXPORT_SYMS+=	linux_ioctl_unregister_handler
 EXPORT_SYMS+=	linux_get_osname
 EXPORT_SYMS+=	linux_get_osrelease
 
+.if !defined(KERNBUILDDIR)
+.warning Building Linuxulator outside of a kernel does not make sense
+.endif
+
 .include <bsd.kmod.mk>


More information about the dev-commits-src-all mailing list