I just moved a bunch of code into a separate framework. Nothing has changed in the code since the move and it compiles fine. However, on runtime, It crashes with "misaligned_stack_error". I've been looking around and some people are saying -mstackrealign fixes it, however I have added it to the C flags for both projects in Xcode and it still crashes, exactly the same way.
(Please note the format of the projects: a framework, loaded into a plugin, which installs into some 3rd party software).
I'd greatly appreciate some help to resolve this issue.