在CentOS/Debian/Ubuntu上编译安装最新版gnu make 和GNU 'binutils' (as and ld)

c++ 同时被 3 个专栏收录
77 篇文章 4 订阅
125 篇文章 4 订阅

先查看make版本:

root@:~/clickhouse/gcc-build# make --version
GNU Make 3.82
Built for x86_64-redhat-linux-gnu
Copyright (C) 2010  Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

要求版本:

   * GNU 'make' 4.0 or newer

     As of relase time, GNU 'make' 4.2.1 is the newest verified to work
     to build the GNU C Library.

编译安装make:
你需要先安装make,才能使用make进行编译安装make

wget https://ftp.gnu.org/gnu/make/make-4.2.tar.gz
tar xvf make-4.2.tar.gz
cd make-4.2/
./configure 
make
sudo make install

查看版本:

root@:~/clickhouse/ft_local/make-4.2# /usr/local/bin/make --version
GNU Make 4.2
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

你可以把旧版本卸载了,链接新版本过去:

yum remove make
ln -s /usr/local/bin/make /usr/bin/
make --version

参考链接:makefile - how to update make 3.81 linux - Stack Overflow


然后安装最新版GNU ‘binutils’ (as and ld)
gnu binutils中有很多,但是编译glibc只需之2个:

   * GNU 'binutils' 2.25 or later

     You must use GNU 'binutils' (as and ld) to build the GNU C Library.
     No other assembler or linker has the necessary functionality at the
     moment.  As of release time, GNU 'binutils' 2.31.1 is the newest
     verified to work to build the GNU C Library.

编译安装方法:

wget https://ftp.gnu.org/gnu/binutils/binutils-2.32.tar.gz
tar xvf binutils-2.32.tar.gz
cd binutils-2.32/
./configure =
make
sudo make install

查看版本:

root@:~/clickhouse/binutils-2.32# /usr/local/bin/ld --version
GNU ld (GNU Binutils) 2.32
Copyright (C) 2019 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
  • 1
    点赞
  • 1
    评论
  • 1
    收藏
  • 打赏
    打赏
  • 扫一扫,分享海报

©️2021 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页

打赏作者

淡竹云开

你的鼓励将是我创作的最大动力

¥2 ¥4 ¥6 ¥10 ¥20
输入1-500的整数
余额支付 (余额:-- )
扫码支付
扫码支付:¥2
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值