Isn't there any way the GCC license could be written so as to make any
such output a derived work, thereby requiring other programs that use
it to be GPLed too?
No. Whether something is a derived work or not is a question of copyright
law, not something you can put into a license.