back-porting "-o" bug to cgo branch