False sharing mostly needs to be avoided with program design. I'm not aware of any compiler flags that help here.