make gcc wrapper support -shared correctly