I'm sending the updated patch based on Egeyar's work. It utilizes a new environmental variable and uses the currently existing -frecord-gcc-switches option. Thoughts?
I am leaving it to the more experienced to comment on redefining the functionality of -frecord-gcc-switches.
The code seems pretty neat to me. Thanks Martin! Best regards Egeyar