The first solution is really not the way to proceed. It will inhibit all initializations of variables in xdata.
And the second is a pretty hard way to do the right thing.
All that is required is to declare an _XPAGE sfr at the address of EMI0CN as explaind in the SDCC manual.
__sfr __at(0xAA) _XPAGE; // EMI0CN for C8015F930
Replace the address with the value from the datasheet of your MCU.
The reason behind this is that the original 8051 used P2 to output the MSB of the address when a MOVX @Ri is used. And this instruction is used for copying initializations from code memory to xdata at startup. SDCC sets _XPAGE which is overlayed on P2 in the library, but when _XPAGE is already specified in the project, that overrules whatever is in the library. We chose the name _XPAGE as there is no common name used for this register among all 8051 derivative manufacturers.