I need to cross compile from a 32-bit system for a 64-bit target withgnu as, but the script doing the compilation produces the error message that x86_64-linux-as cannot be found.Is there a 32-bit Debian or Ubuntu package that contains x86_64-linux-as? I am not quite sure why the script requires x86_64-linux-as.  Shouldn't be possible to use the 32-bit version to produce 64-bit code?
Is there a gnu-as variant for targetting 64-bit code from a 32-bit system?
cross compilation
You can use binutils-x86-64-linux-gnu, available in Debian Jessie (but not Ubuntu). It contains x86_64-linux-gnu-as, so you need to configure using x86_64-linux-gnu as target.