|
|
第一次用 gentoo,请多多指教。
手头上有些库没有源代码,依赖 libstdc++-v3,所以想编一个 gcc3.2.3 或 gcc3.3.6 来编译链接到这些库的程序。从官网 http://gcc.gnu.org 下载源代码,如果正常的话
../configure --enable-shared --enable-threads=posix --disable-checking --with-system-zlib --enable-__cxa_atexit --enable-languages=c,c++ --disable-libgcj --host=i686-pc-linux-gnu --disable-nls --prefix=/usr/local/gcc-3.2.3
make install
ln -s /usr/local/gcc-3.2.3/bin/gcc /usr/local/bin/gcc32
ln -s /usr/local/gcc-3.2.3/bin/g++ /usr/local/bin/g++32
以后只需要指定 CC=gcc32 CXX=g++32 就可以了,而且对现有的系统没影响,使用也简单。
可惜以上操作用 gcc4.3.3 都编译不通过,难道要先编个 gcc3.4.x 然后用 gcc3.4.x 去编一个 gcc3.2.3 ?
foo@BAR ~ $ emerge --info
Portage 2.1.6.13 (default/linux/x86/2008.0, gcc-4.3.3, glibc-2.9_p20081201-r2, 2.6.29-gentoo-r3 i686)
=================================================================
System uname: Linux-2.6.29-gentoo-r3-i686-Intel-R-_Celeron-R-_M_CPU_430_@_1.73GHz-with-gentoo-2.0.0
Timestamp of tree: Sat, 09 May 2009 09:45:01 +0000
ccache version 2.4 [enabled]
app-shells/bash: 4.0_p17-r1
dev-lang/python: 2.5.4-r2, 2.6.2
dev-util/ccache: 2.4-r8
sys-apps/baselayout: 2.0.0
sys-apps/openrc: 0.4.3-r2
sys-apps/sandbox: 1.9
sys-devel/autoconf: 2.63-r1
sys-devel/automake: 1.9.6-r2, 1.10.2
sys-devel/binutils: 2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool: 2.2.6a
virtual/os-headers: 2.6.28-r1
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/init.d /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=prescott -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://61.135.158.199"
LANG=" OSIX"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/gentoo-china"
SYNC="rsync://61.135.158.199/gentoo-portage"
USE="X acl acpi alsa bash-completion berkdb bzip2 bzlib cjk cleartype cli cracklib crypt cups dri fb fortran freetype gdbm gpm iconv ipv6 isdnlog jpeg midi mmx mudflap ncurses nls nptl nptlonly openmp pam pcre perl png pppd python readline reflection session spl sse sse2 ssl sysfs tcpd truetype unicode x86 xft xorg zlib" ALSA_CARDS="hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="intel"
Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS |
|