关于ubuntu:如何构建旧版本的glibc?

How to build older version of glibc?

我正在为Ubuntu Xenial 16.04构建用于手臂的gcc-8.1.0交叉编译器。
该软件包以debian软件包的形式存在,但仅适用于Ubuntu 18.04 bionic,这就是我要构建它的原因。
但是有一个问题-gcc-8.1.0作为用于Ubuntu 16.04(用于本机体系结构)的x86_64系统的软件包存在。 它会下载所有依赖项,其中包括glibc-2.23。
当我想按照此处给出的说明为手臂架构构建gcc交叉编译器时:http://preshing.com/20141119/how-to-build-a-gcc-cross-compiler/
在步骤6中,当由于错误/tmp/ccs9D1VT.s: Error: `loc1@GLIBC_2.17' can't be versioned to common symbol 'loc1'而导致无法构建标准C库glibc时。
我在以前的步骤中根据链接中给出的手册尝试了较旧版本的gcc(4.9.3&5.4.0),但似乎glibc存在此错误。

所以,我想知道-如果这是glibc-2.23中的错误,那么它将如何构建?
由于我已将其与x86_64 Ubuntu Xenial的debian软件包一起安装。


您需要向后移植此上游提交:

1
2
3
commit 388b4f1a02f3a801965028bbfcd48d905638b797
Author: H.J. Lu <[email protected]>
Date:   Fri Jun 23 14:38:46 2017 -0700

Avoid .symver on common symbols [BZ #21666]

The .symver directive on common symbol just creates a new common symbol, not an alias and the newer assembler with the bug fix for

https://sourceware.org/bugzilla/show_bug.cgi?id=21661

will issue an error. Before the fix, we got

该提交已经包含在release/2.23/master分支中,因此您可以做到这一点。