I have a portable gas generator that I want to connect to a 1hp, 240 volt irrigation pump. The pump is out in a field and not connected in any way to power at the house. I want to use a twist lock extension cord from the Generator to the pump. The generator has a floating neutral. Do I need to bond the neutral and ground wire in the extension cord together? Thanks
Your pump doesn't use neutral. So there's no need or reason to modify anything.
Regardless... You would never modify an extension cord like that, because then it'd be dangerous to use anyplace else. If you must violate Code, you can do it more sanely by getting a NEMA 5-20 plug, and jumper it internally neutral to ground with a #12 wire, and just plug it into the generator in an unused 5-20 socket.
A 5-20 plug looks like a common 5-15 but with a sideways neutral. The beauty of it is the generator will take it, but few other sockets will.