小编roy*_*oyh的帖子

如何在x86_64机器上编译glibc 32bit

我正在尝试在x86_64上编译glibc(作为辅助,而不是系统替换)2.6,并试图让它生成32位对象.当我给它一个标准配置时,它编译得很好,产生通常的64位库对象.一些信息:

$ uname -a
Linux localhost.localdomain 2.6.18-164.11.1.el5 #1 SMP Wed Jan 20 07:32:21 \
EST 2010 x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/redhat-release
CentOS release 5.4 (Final)
Run Code Online (Sandbox Code Playgroud)

除其他外,我尝试了以下内容:

尝试1:

$ # [in build/glibc-2.6]
$ ../../src/glibc-2.6/configure --prefix=$HOME/glibc32-2.6 \
                                --with-cpu=i386-pc-linux-gnu

...

checking sysdep dirs... configure: error: The i386-pc-linux-gnu
subspecies of x86_64 is not supported."
Run Code Online (Sandbox Code Playgroud)

尝试2:

$ ../../src/glibc-2.6/configure --prefix=$HOME/glibc32-2.6 \
                                --host=i386-pc-linux-gnu

...

$ make
Run Code Online (Sandbox Code Playgroud)

配置成功,但make会导致编译错误流,如下所示:

nptl/sysdeps/i386/tls.h:65:3: error: #error "TLS support is required."
In file included from include/tls.h:6,
                 from sysdeps/unix/sysv/linux/i386/sysdep.h:30,
                 from <stdin>:1: …
Run Code Online (Sandbox Code Playgroud)

linux glibc

19
推荐指数
3
解决办法
3万
查看次数

标签 统计

glibc ×1

linux ×1