# Linux toolchain configure

**URL:** <https://forums.sifive.com/t/linux-toolchain-configure/249>\
**Category:** Freedom E300\
**Created:** [January 5, 2017, 3:24am UTC](https://forums.sifive.com/t/linux-toolchain-configure/249 "2017-01-05T03:24:44Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkzshabbaz](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@bkzshabbaz](https://forums.sifive.com/u/bkzshabbaz)\
**Post date:** [January 5, 2017, 3:24am UTC](https://forums.sifive.com/t/linux-toolchain-configure/249/1 "2017-01-05T03:24:44Z")

</div>

I’m trying to setup the toolchain for compiling Linux and when I execute

riscv-gnu-toolchain $ ./configure --prefix=/opt/riscv  
It complains:  
configure: error: Unknown arch

According to the github README, this should invoke the default settings. Am I doing something wrong?

---

<div class="post-metadata">

**Author:** ![bkzshabbaz](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@bkzshabbaz](https://forums.sifive.com/u/bkzshabbaz)\
**Post date:** [January 5, 2017, 3:52am UTC](https://forums.sifive.com/t/linux-toolchain-configure/249/2 "2017-01-05T03:52:27Z")

</div>

Just performed a git pull on the master branch and it resolved the configure.

---

<div class="post-metadata">

**Author:** ![bkzshabbaz](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@bkzshabbaz](https://forums.sifive.com/u/bkzshabbaz)\
**Post date:** [January 5, 2017, 4:08am UTC](https://forums.sifive.com/t/linux-toolchain-configure/249/3 "2017-01-05T04:08:37Z")

</div>

I got the Linux toolchain built, but when I try to build the Linux kernel I get the following error:

riscv64-unknown-linux-gnu-gcc: error: unrecognized command line option '-m64’  
riscv64-unknown-linux-gnu-gcc: error: unrecognized command line option '-m64’  
riscv64-unknown-linux-gnu-gcc: error: unrecognized command line option ‘-mno-float’; did you mean ‘-mno-plt’?

---

<div class="post-metadata">

**Author:** ![aou](https://avatars.discourse-cdn.com/v4/letter/a/e99b99/32.png) [@aou](https://forums.sifive.com/u/aou)\
**Post date:** [January 6, 2017, 9:38pm UTC](https://forums.sifive.com/t/linux-toolchain-configure/249/4 "2017-01-06T21:38:39Z")

</div>

This is now fixed as of commit [23bf08e](https://github.com/riscv/riscv-linux/commit) of riscv-linux. The compiler flags have changed in preparation for gcc upstreaming.

---

<div class="post-metadata">

**Author:** ![bkzshabbaz](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@bkzshabbaz](https://forums.sifive.com/u/bkzshabbaz)\
**Post date:** [January 8, 2017, 5:10am UTC](https://forums.sifive.com/t/linux-toolchain-configure/249/5 "2017-01-08T05:10:04Z")

</div>

Thanks, Linux compiles fine now.
