It seems the easiest (not easy of course but simply easier) way to handle this would be for the various EU member nations to agree on a tax scheme unilaterally. No matter where your "profit" is made it is taxed at x%. This would equalize the playing field and each country would have to find some other way of attracting business by adding value.
Of course Ireland and Luxembourg might not agree. Or France.
It seems silly to me to complain about companies minimizing tax payments when they are using your rules against you. If you get beat on home court you should be looking internally for the answer, not for some boogeyman.