Hi Jantje,
Thank you for the clear write up and problem capture. To prevent confusion with any previous work in this area I recommend using a new bug that references the wiki. Once this work is done, we can update old bugs to say they are resolved or no longer relevant.
Your email mentions 3 solutions, but the wiki seems to have 5 possible solutions. I assume the last one titled "only Uppercase environment variables from windows OSin that are explicitly used by CDT" is the last one you are referring to? I further assume that you think CBuildConfiguration.findCommand should be refactored to use EnvironmentReader (I would agree with that) and that EnvironmentReader would be responsible for the upper casing of those special environment variables (I agree with that too).
I think we should continue discussion on this topic in the aforementioned bug you create. Please post a link here to that bug so that others can follow along on further conversation if they want.
Thank you Jantje for tackling such a tricky piece of legacy code. I suspect there will be other things that come up as you implement this fix and I hope that I and the rest of the community can support your changes by testing and/or reviewing your changes.
Jonah