如何构建较旧版本的glibc?

5
我正在为Ubuntu Xenial 16.04构建gcc-8.1.0交叉编译器,用于arm。尽管该软件包存在于debian软件包中,但仅适用于Ubuntu 18.04 bionic。因此,我需要自己构建它。但是出现了一个问题 - 针对Ubuntu 16.04(本机架构)的x86_64系统存在gcc-8.1.0软件包。它会下载所有依赖项,其中包括glibc-2.23。根据这里http://preshing.com/20141119/how-to-build-a-gcc-cross-compiler/给出的说明,在制作标准C库glibc时,第6步失败了,因为出现错误/tmp/ccs9D1VT.s: Error: `loc1@GLIBC_2.17' can't be versioned to common symbol 'loc1'。我已经按照链接中提供的手册使用旧版本的gcc(4.9.3和5.4.0)进行了尝试,但似乎glibc仍有这个错误。

所以,我想知道 - 如果这是glibc-2.23中的错误,那么它是如何被构建的呢? 因为我已经在我的x86_64 Ubuntu Xenial的debian软件包中安装了它。

1个回答

6

您需要将此上游提交回移植:

commit 388b4f1a02f3a801965028bbfcd48d905638b797
Author: H.J. Lu <hjl.tools@gmail.com>
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分支中(链接),所以你可以直接使用它。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接