简体   繁体   中英

How to build older version of glibc?

I am building gcc-8.1.0 cross-compiler for arm, for Ubuntu Xenial 16.04. That package exists as a debian package but only for Ubuntu 18.04 bionic which is why I am building it. But there is a problem - namely, gcc-8.1.0 exists as a package for x86_64 system for Ubuntu 16.04 (for native architecture). It downloads all the dependencies, among which glibc-2.23. When I want to build gcc cross-compiler for arm architecture according to the instructions given here:http://preshing.com/20141119/how-to-build-a-gcc-cross-compiler/ at step 6 when making standard C library glibc fails to be build because of an error /tmp/ccs9D1VT.s: Error: `loc1@GLIBC_2.17' can't be versioned to common symbol 'loc1' . I tried with older versions of gcc (4.9.3 & 5.4.0) in the previous steps according to manual given in the link, but seems that glibc has this bug.

So, I am wondering - if that's the bug in glibc-2.23 how is it being built at all? Since I have it installed with my debian package for x86_64 Ubuntu Xenial.

You need to backport this upstream commit:

 commit 388b4f1a02f3a801965028bbfcd48d905638b797 Author: HJ 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 […]

This commit is already included on the release/2.23/master branch , so you could just that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM