Static linking libFoundation fails when using string contains function

That flag only works for the stdlib right now, not the corelibs, not without adding more linker flags. There is a patch that fixes this that has been merged to the 5.3 branch, but it didn't make the 5.3 release for some reason. It should be there in the next 5.3.1 patch release, you can use the workarounds in my first link in the meantime.