码迷,mamicode.com
首页 > 其他好文 > 详细

如何构建RISC-V的交叉编译工具链?

时间:2020-01-06 18:00:16      阅读:310      评论:0      收藏:0      [点我收藏+]

标签:安装   uil   path   curl   sel   源码   build   href   sele   

  1. 创建risc-v目录
    $ mkdir risc-v
    $ cd risc-v
  2. 获取源码
  3. 安装依赖包
    $ sudo apt-get install autoconf automake autotools-dev curl libmpc-dev libmpfr-dev
    libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev (on ubuntu 18.04)
  4. 编译并安装
    $ cd riscv-gnu-toolchain
    $ ./configure --prefix=/opt/riscv
    $ make (newlib cross-compiler, a generic ELF toolchain, select generic ELF toolchain)
    $ sudo make install
  5. 配置环境变量
    $ export RISCV=/opt/riscv
    $ export PATH=/opt/riscv/bin:$PATH

如何构建RISC-V的交叉编译工具链?

标签:安装   uil   path   curl   sel   源码   build   href   sele   

原文地址:https://www.cnblogs.com/dakewei/p/12157381.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!