编译fuchsia的工具链

安装必要的工具

sudo apt-get install bison


进入$SRC目录

保持网络畅通

下载源码

git clone https://fuchsia.googlesource.com/third_party/gcc_none_toolchains


下载完可以看到主要是控制脚本和补丁文件


简单看下doit脚本

脚本主要下载gcc等源码工具

然后解压打补丁编译

:~/fuchsia/gcc_none_toolchains$ ./doit -h
Options
 -a <arch list>               architectures to build
    example: -a 'arm' or -a 'arm i386 x86_64' for multiple
 -c                           use compilation cache (ccache must be installed)
 -f                           fetch source releases from upstream
 -h|-?                        display this help message
 -j<#>                        use <#> parallel workers to build
 -o <dir>                     output directory
 -q                           make the build quieter
 -s                           strip the binaries

执行命令./doit -a 'x86_64' -f -j8

脚本执行完便得到生成的x86_64工具链

在目录x86_64-elf-5.3.0-Linux-x86_64下


执行cleanit脚本清除编译的中间结果

如果报错,把cleanit脚本的第一行改为#!/bin/bash

使用bash来解释执行


如果需要再次编译

执行./doit -a 'x86_64' -j8

不用加-f参数了

源码包在archives目录



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值