From d0ae4194d785b6515a59c985512c4c5e396d6fdc Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Fri, 27 Oct 2023 12:47:49 +0100 Subject: [PATCH] nvidia-oot: Fix ccflag for IVC legacy support The flag CONFIG_TEGRA_IVC_LEGACY_DISABLE was added so that it can be set by an external Makefile that build the out-of-tree drivers. If this flag is set by an external Makefile then the ccflags definition '-DCONFIG_TEGRA_IVC_LEGACY_DISABLE' does not get set as expected and builds fail. Fix this by setting the ccflag if the Make flag CONFIG_TEGRA_IVC_LEGACY_DISABLE is set and not just for Linux v6.2+ kernels. Bug 4221847 Change-Id: Ia662a9e6bfac064fa0571af7f0173cda2cf94b02 Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3005233 Reviewed-by: svcacv Reviewed-by: Laxman Dewangan GVS: Gerrit_Virtual_Submit --- Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Makefile b/Makefile index fdb4b095..44fa8b05 100644 --- a/Makefile +++ b/Makefile @@ -14,6 +14,9 @@ LINUX_VERSION_6_3 := $(shell expr 6 \* 256 + 3) # For Linux v6.2 kernels, don't build any drivers that requires this. ifeq ($(shell test $(LINUX_VERSION) -ge $(LINUX_VERSION_6_2); echo $$?),0) export CONFIG_TEGRA_IVC_LEGACY_DISABLE=y +endif + +ifeq ($(CONFIG_TEGRA_IVC_LEGACY_DISABLE),y) subdir-ccflags-y += -DCONFIG_TEGRA_IVC_LEGACY_DISABLE endif