Allan Posted October 20, 2017 Share Posted October 20, 2017 Hello guys. There's a way to compile a kext without Xcode? Sorry if my question are dumb. 1 Link to comment Share on other sites More sharing options...
PMheart Posted October 21, 2017 Share Posted October 21, 2017 Lacking of Xcode means no SDK available... So I'm afraid that that is a no go. Link to comment Share on other sites More sharing options...
ydeng Posted October 21, 2017 Share Posted October 21, 2017 (edited) Hello guys. There's a way to compile a kext without Xcode? Sorry if my question are dumb. It is possible. Install the headers from xnu source and figure out how to link Mach-O kext bundle. xcodebuild command line shows these linking argument for clang++ clang++ -arch x86_64 -mmacosx-version-min=10.12 -stdlib=libc++ -Xlinker -kext -nostdlib -lkmodc++ obj.o -lkmod -lcc_kext -o obj.kext/Contents/MacOS/obj I think libkmod and libcc_kext come from xnu. Actually, there is a kext test in xnu, any other kext can be built the same way as the test https://github.com/Shaneee92/SierraAMD-XNU/tree/master/tools/tests/testkext Edited October 21, 2017 by Allan 3 Link to comment Share on other sites More sharing options...
Allan Posted October 21, 2017 Author Share Posted October 21, 2017 Hmm good to know. Thanks buddy 1 Link to comment Share on other sites More sharing options...
ydeng Posted October 21, 2017 Share Posted October 21, 2017 Hmm good to know. Thanks buddy That test uses xcode. But linking options extracted about should work. You need to supply the correct -I and -L to make it actually work. 1 Link to comment Share on other sites More sharing options...
Allan Posted October 22, 2017 Author Share Posted October 22, 2017 And just to compile kexts, I always need use the last version of Xcode? 1 Link to comment Share on other sites More sharing options...
Recommended Posts