From 7697a32562afcad08d13f1f721565aea3468dd66 Mon Sep 17 00:00:00 2001 From: Karmaz95 Date: Fri, 6 Dec 2024 22:03:29 +0100 Subject: [PATCH] The fix for "Binary is for x86_64, but arch arm64e" is needed while loading kext. --- .../HelloKext/HelloWorldKext.xcodeproj/project.pbxproj | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/X. NU/custom/HelloKext/HelloWorldKext.xcodeproj/project.pbxproj b/X. NU/custom/HelloKext/HelloWorldKext.xcodeproj/project.pbxproj index c63098e..f80f68a 100644 --- a/X. NU/custom/HelloKext/HelloWorldKext.xcodeproj/project.pbxproj +++ b/X. NU/custom/HelloKext/HelloWorldKext.xcodeproj/project.pbxproj @@ -113,7 +113,8 @@ 1DEB91DA08733DB10010E9CD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + ARCHS = "arm64e"; + VALID_ARCHS = "arm64e"; KERNEL_EXTENSION_HEADER_SEARCH_PATHS = "$(KERNEL_FRAMEWORK)/Headers"; KERNEL_FRAMEWORK = "$(SYSTEM_LIBRARY_DIR)/Frameworks/Kernel.framework"; ONLY_ACTIVE_ARCH = NO; @@ -132,16 +133,18 @@ MACOSX_DEPLOYMENT_TARGET = 13.0; OTHER_CFLAGS = "-mkernel -fno-builtin -static"; OTHER_LDFLAGS = "-static -lkmod"; + SYSTEM_HEADER_SEARCH_PATHS = "$(KERNEL_FRAMEWORK)/Headers"; + HEADER_SEARCH_PATHS = "$(KERNEL_FRAMEWORK)/Headers"; }; name = Release; }; 1DEB91DE08733DB10010E9CD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + ARCHS = "arm64e"; + VALID_ARCHS = "arm64e"; ONLY_ACTIVE_ARCH = NO; SDKROOT = macosx; - VALID_ARCHS = "x86_64 arm64"; }; name = Release; };