我正在尝试在x86_64上编译glibc(作为辅助,而不是系统替换)2.6,并试图让它生成32位对象.当我给它一个标准配置时,它编译得很好,产生通常的64位库对象.一些信息:
Run Code Online (Sandbox Code Playgroud)$ 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)
除其他外,我尝试了以下内容:
尝试1:
Run Code Online (Sandbox Code Playgroud)$ # [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."
尝试2:
Run Code Online (Sandbox Code Playgroud)$ ../../src/glibc-2.6/configure --prefix=$HOME/glibc32-2.6 \ --host=i386-pc-linux-gnu ... $ make
配置成功,但make会导致编译错误流,如下所示:
Run Code Online (Sandbox Code Playgroud)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: …