Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd Narrow the CPPFLAGS for drm subsystems.
details: https://anonhg.NetBSD.org/src/rev/3b1542bf2312
branches: trunk
changeset: 1028389:3b1542bf2312
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 10:55:27 2021 +0000
description:
Narrow the CPPFLAGS for drm subsystems.
No need for the whole kernel to be built with -I flags for the drm
header files.
diffstat:
sys/external/bsd/common/conf/files.linux | 4 +-
sys/external/bsd/drm2/amdgpu/files.amdgpu | 10 ++--
sys/external/bsd/drm2/drm/files.drmkms | 48 +++++++++++++------------
sys/external/bsd/drm2/i915drm/files.i915drmkms | 22 ++++++-----
sys/external/bsd/drm2/linux/files.drmkms_linux | 6 +-
sys/external/bsd/drm2/nouveau/files.nouveau | 19 +++++----
sys/external/bsd/drm2/pci/files.drmkms_pci | 5 ++-
sys/external/bsd/drm2/radeon/files.radeon | 13 ++++--
sys/external/bsd/drm2/ttm/files.ttm | 4 +-
sys/external/bsd/drm2/via/files.via | 6 +-
10 files changed, 76 insertions(+), 61 deletions(-)
diffs (truncated from 309 to 300 lines):
diff -r 039c66f3828d -r 3b1542bf2312 sys/external/bsd/common/conf/files.linux
--- a/sys/external/bsd/common/conf/files.linux Sun Dec 19 10:55:15 2021 +0000
+++ b/sys/external/bsd/common/conf/files.linux Sun Dec 19 10:55:27 2021 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: files.linux,v 1.4 2021/12/19 01:37:27 riastradh Exp $
+# $NetBSD: files.linux,v 1.5 2021/12/19 10:55:27 riastradh Exp $
define linux
-makeoptions linux CPPFLAGS+="-I$S/external/bsd/common/include"
+makeoptions linux "CPPFLAGS.linux"+="-I$S/external/bsd/common/include"
file external/bsd/common/linux/linux_rcu.c linux
file external/bsd/common/linux/linux_srcu.c linux
diff -r 039c66f3828d -r 3b1542bf2312 sys/external/bsd/drm2/amdgpu/files.amdgpu
--- a/sys/external/bsd/drm2/amdgpu/files.amdgpu Sun Dec 19 10:55:15 2021 +0000
+++ b/sys/external/bsd/drm2/amdgpu/files.amdgpu Sun Dec 19 10:55:27 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.amdgpu,v 1.11 2021/12/19 10:20:46 riastradh Exp $
+# $NetBSD: files.amdgpu,v 1.12 2021/12/19 10:55:27 riastradh Exp $
version 20180827
@@ -12,10 +12,10 @@
attach amdgpufb at amdgpufbbus
# Match order in dist/drm/amd/amdgpu/Makefile.
-makeoptions amdgpu CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/amd/include/asic_reg"
-makeoptions amdgpu CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/amd/include"
-makeoptions amdgpu CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/amd/amdgpu"
-makeoptions amdgpu CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/amd/scheduler"
+makeoptions amdgpu "CPPFLAGS.amdgpu"+="-I$S/external/bsd/drm2/dist/drm/amd/include/asic_reg"
+makeoptions amdgpu "CPPFLAGS.amdgpu"+="-I$S/external/bsd/drm2/dist/drm/amd/include"
+makeoptions amdgpu "CPPFLAGS.amdgpu"+="-I$S/external/bsd/drm2/dist/drm/amd/amdgpu"
+makeoptions amdgpu "CPPFLAGS.amdgpu"+="-I$S/external/bsd/drm2/dist/drm/amd/scheduler"
makeoptions amdgpu "CWARNFLAGS.amdgpu"+="-Wno-missing-field-initializers"
makeoptions amdgpu "CWARNFLAGS.amdgpu"+="-Wno-shadow"
diff -r 039c66f3828d -r 3b1542bf2312 sys/external/bsd/drm2/drm/files.drmkms
--- a/sys/external/bsd/drm2/drm/files.drmkms Sun Dec 19 10:55:15 2021 +0000
+++ b/sys/external/bsd/drm2/drm/files.drmkms Sun Dec 19 10:55:27 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.drmkms,v 1.62 2021/12/19 10:46:35 riastradh Exp $
+# $NetBSD: files.drmkms,v 1.63 2021/12/19 10:55:27 riastradh Exp $
version 20180827
@@ -17,38 +17,38 @@
makeoptions drmkms "COPTS.drmkms"+="-fwrapv"
# Overrides first.
-makeoptions drmkms CPPFLAGS+="-I$S/external/bsd/drm2/include"
-makeoptions drmkms_ttm CPPFLAGS+="-I$S/external/bsd/drm2/include/drm"
+makeoptions drmkms "CPPFLAGS.drmkms"+="-I$S/external/bsd/drm2/include"
+makeoptions drmkms "CPPFLAGS.drmkms"+="-I$S/external/bsd/drm2/include/drm"
-makeoptions drmkms CPPFLAGS+="-I$S/external/bsd/common/include"
+makeoptions drmkms "CPPFLAGS.drmkms"+="-I$S/external/bsd/common/include"
# Then upstream.
-makeoptions drmkms CPPFLAGS+="-I$S/external/bsd/drm2/dist/include"
-makeoptions drmkms CPPFLAGS+="-I$S/external/bsd/drm2/dist/include/drm"
-makeoptions drmkms CPPFLAGS+="-I$S/external/bsd/drm2/dist/include/uapi"
+makeoptions drmkms "CPPFLAGS.drmkms"+="-I$S/external/bsd/drm2/dist/include"
+makeoptions drmkms "CPPFLAGS.drmkms"+="-I$S/external/bsd/drm2/dist/include/drm"
+makeoptions drmkms "CPPFLAGS.drmkms"+="-I$S/external/bsd/drm2/dist/include/uapi"
-makeoptions drmkms CPPFLAGS+="-D__KERNEL__"
+makeoptions drmkms "CPPFLAGS.drmkms"+="-D__KERNEL__"
ifdef i386
-makeoptions drmkms CPPFLAGS+="-DCONFIG_X86"
-makeoptions drmkms CPPFLAGS+="-DCONFIG_X86_PAT"
+makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_X86"
+makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_X86_PAT"
elifdef amd64
-makeoptions drmkms CPPFLAGS+="-DCONFIG_X86"
-makeoptions drmkms CPPFLAGS+="-DCONFIG_X86_64"
-makeoptions drmkms CPPFLAGS+="-DCONFIG_X86_PAT"
+makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_X86"
+makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_X86_64"
+makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_X86_PAT"
elifdef arm
-makeoptions drmkms CPPFLAGS+="-DCONFIG_ARM"
+makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_ARM"
elifdef aarch64
-makeoptions drmkms CPPFLAGS+="-DCONFIG_AARCH64"
+makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_AARCH64"
endif
-makeoptions drmkms CPPFLAGS+="-DCONFIG_BACKLIGHT_CLASS_DEVICE=0"
-makeoptions drmkms CPPFLAGS+="-DCONFIG_BACKLIGHT_CLASS_DEVICE_MODULE=0"
-makeoptions drmkms CPPFLAGS+="-DCONFIG_DRM_FBDEV_EMULATION=1"
-makeoptions drmkms CPPFLAGS+="-DCONFIG_DRM_FBDEV_OVERALLOC=100"
-makeoptions drmkms CPPFLAGS+="-DCONFIG_FB=0"
-makeoptions drmkms CPPFLAGS+="-DCONFIG_LOCKDEP=0"
-makeoptions drmkms CPPFLAGS+="-DCONFIG_PCI=1"
+makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_BACKLIGHT_CLASS_DEVICE=0"
+makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_BACKLIGHT_CLASS_DEVICE_MODULE=0"
+makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_DRM_FBDEV_EMULATION=1"
+makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_DRM_FBDEV_OVERALLOC=100"
+makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_FB=0"
+makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_LOCKDEP=0"
+makeoptions drmkms "CPPFLAGS.drmkms"+="-DCONFIG_PCI=1"
makeoptions drmkms "CWARNFLAGS.drmkms"+="-Wno-missing-field-initializers"
@@ -63,6 +63,7 @@
# Generic, unaccelerated kms framebuffer.
define drmfb: genfb
file external/bsd/drm2/drm/drmfb.c drmfb
+makeoptions drmfb "CPPFLAGS.drmfb"+="${CPPFLAGS.drmkms}"
include "external/bsd/drm2/ttm/files.ttm"
@@ -80,7 +81,8 @@
# Legacy user-mode setting
define drmums: drmkms
-makeoptions drmums CPPFLAGS+="-DCONFIG_DRM_LEGACY"
+makeoptions drmums "CPPFLAGS.drmkms"+="-DCONFIG_DRM_LEGACY"
+makeoptions drmums "CPPFLAGS.drmums"+="-DCONFIG_DRM_LEGACY"
file external/bsd/drm2/dist/drm/drm_bufs.c drmums
file external/bsd/drm2/dist/drm/drm_context.c drmums
file external/bsd/drm2/dist/drm/drm_dma.c drmums
diff -r 039c66f3828d -r 3b1542bf2312 sys/external/bsd/drm2/i915drm/files.i915drmkms
--- a/sys/external/bsd/drm2/i915drm/files.i915drmkms Sun Dec 19 10:55:15 2021 +0000
+++ b/sys/external/bsd/drm2/i915drm/files.i915drmkms Sun Dec 19 10:55:27 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.i915drmkms,v 1.56 2021/12/19 10:20:54 riastradh Exp $
+# $NetBSD: files.i915drmkms,v 1.57 2021/12/19 10:55:27 riastradh Exp $
version 20180827
@@ -13,17 +13,19 @@
# overflow is OK.
makeoptions i915drmkms "COPTS.i915drmkms"+="-fwrapv"
-makeoptions i915drmkms CPPFLAGS+="-I$S/external/bsd/drm2/i915drm"
+makeoptions i915drmkms "CPPFLAGS.i915drmkms"+="${CPPFLAGS.drmkms}"
-makeoptions i915drmkms CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/i915"
+makeoptions i915drmkms "CPPFLAGS.i915drmkms"+="-I$S/external/bsd/drm2/i915drm"
+
+makeoptions i915drmkms "CPPFLAGS.i915drmkms"+="-I$S/external/bsd/drm2/dist/drm/i915"
-makeoptions i915drmkms CPPFLAGS+="-DCONFIG_DRM_FBDEV_EMULATION=1"
-makeoptions i915drmkms CPPFLAGS+="-DCONFIG_DRM_I915_DEBUG=1" # XXX
-makeoptions i915drmkms CPPFLAGS+="-DCONFIG_DRM_I915_DEBUG_GEM=1" # XXX
-makeoptions i915drmkms CPPFLAGS+="-DCONFIG_DRM_I915_ALPHA_SUPPORT=0"
-makeoptions i915drmkms CPPFLAGS+="-DCONFIG_DRM_I915_FBDEV=1"
-makeoptions i915drmkms CPPFLAGS+="-DCONFIG_DRM_I915_GVT=0"
-makeoptions i915drmkms CPPFLAGS+="-DCONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT=0"
+makeoptions i915drmkms "CPPFLAGS.i915drmkms"+="-DCONFIG_DRM_FBDEV_EMULATION=1"
+makeoptions i915drmkms "CPPFLAGS.i915drmkms"+="-DCONFIG_DRM_I915_DEBUG=1" # XXX
+makeoptions i915drmkms "CPPFLAGS.i915drmkms"+="-DCONFIG_DRM_I915_DEBUG_GEM=1" # XXX
+makeoptions i915drmkms "CPPFLAGS.i915drmkms"+="-DCONFIG_DRM_I915_ALPHA_SUPPORT=0"
+makeoptions i915drmkms "CPPFLAGS.i915drmkms"+="-DCONFIG_DRM_I915_FBDEV=1"
+makeoptions i915drmkms "CPPFLAGS.i915drmkms"+="-DCONFIG_DRM_I915_GVT=0"
+makeoptions i915drmkms "CPPFLAGS.i915drmkms"+="-DCONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT=0"
makeoptions i915drmkms "CWARNFLAGS.i915drmkms"+="-Wno-shadow"
makeoptions i915drmkms "CWARNFLAGS.i915drmkms"+="-Wno-pointer-arith"
diff -r 039c66f3828d -r 3b1542bf2312 sys/external/bsd/drm2/linux/files.drmkms_linux
--- a/sys/external/bsd/drm2/linux/files.drmkms_linux Sun Dec 19 10:55:15 2021 +0000
+++ b/sys/external/bsd/drm2/linux/files.drmkms_linux Sun Dec 19 10:55:27 2021 +0000
@@ -1,9 +1,9 @@
-# $NetBSD: files.drmkms_linux,v 1.28 2021/12/19 10:50:46 riastradh Exp $
+# $NetBSD: files.drmkms_linux,v 1.29 2021/12/19 10:55:27 riastradh Exp $
define drmkms_linux: i2cexec, i2c_bitbang
-makeoptions drmkms_linux CPPFLAGS+="-I$S/external/bsd/common/include"
-makeoptions drmkms_linux CPPFLAGS+="-I$S/external/bsd/drm2/include"
+makeoptions drmkms_linux "CPPFLAGS.drmkms_linux"+="-I$S/external/bsd/common/include"
+makeoptions drmkms_linux "CPPFLAGS.drmkms_linux"+="-I$S/external/bsd/drm2/include"
file external/bsd/drm2/linux/linux_atomic64.c drmkms_linux
file external/bsd/drm2/linux/linux_backlight.c drmkms_linux
diff -r 039c66f3828d -r 3b1542bf2312 sys/external/bsd/drm2/nouveau/files.nouveau
--- a/sys/external/bsd/drm2/nouveau/files.nouveau Sun Dec 19 10:55:15 2021 +0000
+++ b/sys/external/bsd/drm2/nouveau/files.nouveau Sun Dec 19 10:55:27 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.nouveau,v 1.34 2021/12/19 10:51:59 riastradh Exp $
+# $NetBSD: files.nouveau,v 1.35 2021/12/19 10:55:27 riastradh Exp $
version 20180827
@@ -7,9 +7,11 @@
attach nouveau at pci with nouveau_pci: drmkms_pci
file external/bsd/drm2/nouveau/nouveau_pci.c nouveau_pci
+makeoptions nouveau_pci "CPPFLAGS.nouveau_pci"+="${CPPFLAGS.nouveau}"
device nouveaufb: nouveaufbbus, drmfb, drmfb_pci, wsemuldisplaydev
attach nouveaufb at nouveaufbbus
+makeoptions nouveaufb "CPPFLAGS.nouveaufb"+="${CPPFLAGS.nouveau}"
# Local additions. External sources are listd below.
file external/bsd/drm2/nouveau/nouveau_vga.c nouveau
@@ -19,14 +21,15 @@
# overflow is OK.
makeoptions nouveau "COPTS.nouveau"+="-fwrapv"
-makeoptions nouveau CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/nouveau"
-makeoptions nouveau CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/nouveau/include"
-makeoptions nouveau CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/nouveau/include/nvkm"
-makeoptions nouveau CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/nouveau/nvkm"
-makeoptions nouveau CPPFLAGS+="-I$S/external/bsd/drm2/nouveau"
+makeoptions nouveau "CPPFLAGS.nouveau"+="${CPPFLAGS.drmkms}"
+makeoptions nouveau "CPPFLAGS.nouveau"+="-I$S/external/bsd/drm2/dist/drm/nouveau"
+makeoptions nouveau "CPPFLAGS.nouveau"+="-I$S/external/bsd/drm2/dist/drm/nouveau/include"
+makeoptions nouveau "CPPFLAGS.nouveau"+="-I$S/external/bsd/drm2/dist/drm/nouveau/include/nvkm"
+makeoptions nouveau "CPPFLAGS.nouveau"+="-I$S/external/bsd/drm2/dist/drm/nouveau/nvkm"
+makeoptions nouveau "CPPFLAGS.nouveau"+="-I$S/external/bsd/drm2/nouveau"
-makeoptions nouveau CPPFLAGS+="-DCONFIG_NOUVEAU_DEBUG=5"
-makeoptions nouveau CPPFLAGS+="-DCONFIG_NOUVEAU_DEBUG_DEFAULT=3"
+makeoptions nouveau "CPPFLAGS.nouveau"+="-DCONFIG_NOUVEAU_DEBUG=5"
+makeoptions nouveau "CPPFLAGS.nouveau"+="-DCONFIG_NOUVEAU_DEBUG_DEFAULT=3"
makeoptions nouveau "CWARNFLAGS.nouveau"+="-Wno-missing-field-initializers"
makeoptions nouveau "CWARNFLAGS.nouveau"+="-Wno-pointer-arith"
diff -r 039c66f3828d -r 3b1542bf2312 sys/external/bsd/drm2/pci/files.drmkms_pci
--- a/sys/external/bsd/drm2/pci/files.drmkms_pci Sun Dec 19 10:55:15 2021 +0000
+++ b/sys/external/bsd/drm2/pci/files.drmkms_pci Sun Dec 19 10:55:27 2021 +0000
@@ -1,13 +1,16 @@
-# $NetBSD: files.drmkms_pci,v 1.13 2018/08/28 03:41:39 riastradh Exp $
+# $NetBSD: files.drmkms_pci,v 1.14 2021/12/19 10:55:27 riastradh Exp $
define drmkms_pci: drmkms
+makeoptions drmkms_pci "CPPFLAGS.drmkms_pci"+="${CPPFLAGS.drmkms}"
+
#file external/bsd/drm2/dist/drm/ati_pcigart.c drmkms_pci
file external/bsd/drm2/dist/drm/drm_agpsupport.c drmkms_pci & agp
file external/bsd/drm2/pci/drm_pci.c drmkms_pci
file external/bsd/drm2/pci/drm_pci_module.c drmkms_pci
define drmfb_pci: drmfb, drmkms_pci
+makeoptions drmfb_pci "CPPFLAGS.drmfb_pci"+="${CPPFLAGS.drmkms_pci}"
file external/bsd/drm2/pci/drmfb_pci.c drmfb_pci
include "external/bsd/drm2/amdgpu/files.amdgpu"
diff -r 039c66f3828d -r 3b1542bf2312 sys/external/bsd/drm2/radeon/files.radeon
--- a/sys/external/bsd/drm2/radeon/files.radeon Sun Dec 19 10:55:15 2021 +0000
+++ b/sys/external/bsd/drm2/radeon/files.radeon Sun Dec 19 10:55:27 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.radeon,v 1.33 2021/12/19 10:21:01 riastradh Exp $
+# $NetBSD: files.radeon,v 1.34 2021/12/19 10:55:27 riastradh Exp $
version 20180827
@@ -14,13 +14,16 @@
# overflow is OK.
makeoptions radeon "COPTS.radeon"+="-fwrapv"
+makeoptions radeon "CPPFLAGS.radeon"+="${CPPFLAGS.drmkms}"
+makeoptions radeondrmkmsfb "CPPFLAGS.radeondrmkmsfb"+="${CPPFLAGS.radeon}"
+
# Our overrides first.
-makeoptions radeon CPPFLAGS+="-I$S/external/bsd/drm2/include/radeon"
-makeoptions radeon CPPFLAGS+="-I$S/external/bsd/drm2/radeon"
+makeoptions radeon "CPPFLAGS.radeon"+="-I$S/external/bsd/drm2/include/radeon"
+makeoptions radeon "CPPFLAGS.radeon"+="-I$S/external/bsd/drm2/radeon"
# Then their header files.
-makeoptions radeon CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/amd/include"
-makeoptions radeon CPPFLAGS+="-I$S/external/bsd/drm2/dist/drm/radeon"
+makeoptions radeon "CPPFLAGS.radeon"+="-I$S/external/bsd/drm2/dist/drm/amd/include"
+makeoptions radeon "CPPFLAGS.radeon"+="-I$S/external/bsd/drm2/dist/drm/radeon"
makeoptions radeon "CPPFLAGS.radeon"+="-DCONFIG_AGP=1"
diff -r 039c66f3828d -r 3b1542bf2312 sys/external/bsd/drm2/ttm/files.ttm
--- a/sys/external/bsd/drm2/ttm/files.ttm Sun Dec 19 10:55:15 2021 +0000
+++ b/sys/external/bsd/drm2/ttm/files.ttm Sun Dec 19 10:55:27 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.ttm,v 1.5 2021/12/19 01:50:54 riastradh Exp $
+# $NetBSD: files.ttm,v 1.6 2021/12/19 10:55:27 riastradh Exp $
# TTM, the texture and tiling manager.
@@ -6,6 +6,8 @@
define drmkms_ttm: drmkms
+makeoptions drmkms_ttm "CPPFLAGS.drmkms_ttm"+="${CPPFLAGS.drmkms}"
+
makeoptions drmkms "CWARNFLAGS.ttm_bo.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} >= 7:? -Wno-error=implicit-fallthrough :}"
makeoptions drmkms_ttm "CPPFLAGS.drmkms_ttm"+="-DCONFIG_AGP=1"
makeoptions drmkms_ttm "CWARNFLAGS.drmkms_ttm"+="-Wno-missing-field-initializers"
diff -r 039c66f3828d -r 3b1542bf2312 sys/external/bsd/drm2/via/files.via
--- a/sys/external/bsd/drm2/via/files.via Sun Dec 19 10:55:15 2021 +0000
+++ b/sys/external/bsd/drm2/via/files.via Sun Dec 19 10:55:27 2021 +0000
@@ -1,10 +1,10 @@
-# $NetBSD: files.via,v 1.3 2015/04/29 11:28:32 riastradh Exp $
+# $NetBSD: files.via,v 1.4 2021/12/19 10:55:28 riastradh Exp $
device viadrmums: drmkms, drmkms_pci
Home |
Main Index |
Thread Index |
Old Index