I'm trying to compile source for a utility for an ARM system (host machine: x86_64, Debian, uname -v reports version as "Debian 4.9.110-3+deb9u1") but when it tries to pack the file into a final binary for use on the target system, I receive an error:

as: unrecognized switch -EL

I noticed I had two different binaries of as; one in /usr/bin and one in /bin. I renamed the one in /usr/bin as the copy in /bin has support for the -EL switch, but now I'm getting a new error:

as: unrecognized switch: --64

The previous as binary has support for this switch, even though it doesn't have support for -EL.

I'm fairly sure this is just an issue of not having the right version of as, but I don't know where to go get the right version. I've updated all the gcc and similar packages through apt-get, but this hasn't fixed the issue?

1 Answer 1


If you have binaries with the same name in /usr/bin and in /bin, they should be the same. Usually one would be a symlink to the other. It seems like a part of your cross compiler was installed over the existing tools. This will only result in confusion.

The program as is usually part of binutils, not gcc.

If you compiled the cross compiler yourself, you should make sure you don't overwrite the native utilities.

  • 1
    @Rafriedi is raising a very interesting concern, the OP seems to have mixed the native and the cross-compiling toolchain. Aug 12, 2018 at 7:44
  • I didn't add any packages before I noticed that. That was how it was when I installed Debian. Aug 12, 2018 at 20:03
  • I have the latest version of binutils (2.28-5) as reported by apt-get. Aug 12, 2018 at 20:08
  • (Why can't I edit comments?) After reinstalling binutils, I'm back to the original -EL error. Aug 12, 2018 at 20:31
  • How did you get your cross compiler? Installed from package, or compiled yourself?
    – RalfFriedl
    Aug 13, 2018 at 5:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .