larmel / lacc

A simple, self-hosting C compiler
MIT License
916 stars 65 forks source link

Mac OS X #33

Open nicebub opened 3 years ago

nicebub commented 3 years ago

I'm trying to slowly get the ioquake3 engine to compile under os x, as well as the test files and anything else that isn't compiling. Currently I'm copying over a few of the Xcode includes headers and editing them as needed to get the files to compile.

I've added a stub #warning directive but commented out a few others i needed until later.

Currently I have to add:

-I /PATH_TO_XCODE_INCLUDE/include to lacc calls

if i want my own custom edited headers, I have included -I /PATH_TO_LACC_LIB/include/ ahead of the previous include so that the compiler picks those files up in the correct order, as I don't know if the flag to have it appended to the include list is available. Maybe I'll add that too?

Thoughts?

larmel commented 3 years ago

Ideally it should be supported with the correct configuration generated by configure script, but I have no experience with OS X so not sure what is required to make it work. Sounds like you at least need different defaults for builtin include paths.

There is also -isystem, which will append include path after the ones specified with -I.