0

I try to build GDB for arm, to upload it inside antminer s9 firmware. I have installed the package arm-linux-gnueabihf, it was installed by default in /usr/bin So when i type arm-linux-gnueabihf-gcc -v i see correct output.

I have downloaded gdb 8.2 sources from official repository, however i'm failing to build it:

./configure --target=arm-linux-gnueabihf --host=arm-linux-gnueabihf

Gives errors like this:

Checking build system type... configure error: cannot guess build type; you must specify one 

The value "--build=x86_64-unknown-linux-gnu" i found in google doesn't seem to work. It produces an error:

invalid value of canonical build

What do I put in build?

jww
  • 97,681
  • 90
  • 411
  • 885
  • 1
    I think you need `--host` and `--build`. I believe `--target` is used for cross-compiling toolchains. For build I think you can just use `--build=$(config.guess)` or `--build=x86_64`. You would then use `--host=arm-linux-gnueabihf`. Also see [14.1 Specifying target triplets](https://www.gnu.org/software/autoconf/manual/autoconf-2.65/html_node/Specifying-Target-Triplets.html) in the Autoconf manual. – jww Oct 08 '18 at 12:23
  • 1
    This may be your duplicate: [Cross-compiling for ARM with Autoconf](https://stackoverflow.com/q/15234959/608639). Be sure to set you path to include the cross compile tools, and set `CPP`, `CC`, `CXX`, `LD` and friends. Sometimes you also have to set `AR` if building a library. [Need cross gdb for device](https://stackoverflow.com/a/13275882/608639) and [Errors while trying to build GDB for ARM](https://stackoverflow.com/q/47807718/608639) may also be helpful. – jww Oct 08 '18 at 12:30
  • 1
    Here's a good explanation of Autoconf if you don't like their manual: [How to determine host value for configure when using cross compiler](https://stackoverflow.com/q/21990021/608639). – jww Oct 08 '18 at 12:36

0 Answers0