From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15775 invoked by alias); 7 Feb 2011 17:57:57 -0000 Received: (qmail 15765 invoked by uid 22791); 7 Feb 2011 17:57:56 -0000 X-SWARE-Spam-Status: No, hits=1.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_CX X-Spam-Check-By: sourceware.org Received: from mail-iy0-f175.google.com (HELO mail-iy0-f175.google.com) (209.85.210.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 07 Feb 2011 17:57:51 +0000 Received: by iyj8 with SMTP id 8so2547120iyj.20 for ; Mon, 07 Feb 2011 09:57:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.42.172.198 with SMTP id o6mr17317332icz.132.1297101470133; Mon, 07 Feb 2011 09:57:50 -0800 (PST) Received: by 10.42.132.202 with HTTP; Mon, 7 Feb 2011 09:57:50 -0800 (PST) Date: Mon, 07 Feb 2011 18:17:00 -0000 Message-ID: Subject: mip64 cross gcc build problem From: Jacky Cao To: gcc-help Content-Type: text/plain; charset=ISO-8859-1 X-IsSubscribed: yes Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org X-SW-Source: 2011-02/txt/msg00145.txt.bz2 I want build cross gcc (version 4.4.5) with binutils 2.21, glibc 2.12.1, and prepared lib32 for n32 abi, lib for o32 and lib64 for n64. I configured second pass gcc with:../../gcc-4.4.5/configure --prefix=/usr/home/Jacky/xtools/xlp-toolchain --target=mipsisa64r2-linux-gnu --with-mips-plt --with-headers=/usr/home/Jacky/xtools/xlp-toolchain/mipsisa64r2-linux-gnu/usr/include --enable-__cxa_atexit --enable-c99 --disable-libssp --disable-libmudflap --enable-libgomp --enable-threads=posix --enable-multilib --enable-shared --with-dwarf2 --enable-languages=c,c++ --enable-symvers=gnu --with-gmp=/usr/local --with-mpfr=/usr/local --with-system-zlib but the building process stuck at 32/64 libgcc mulitlib, because the line in configure "FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -isystem $(build_tooldir)/include -isystem $(build_tooldir)/sys-include'" wired .../lib/ to all multilib buildings while it's suppose to be .../lib/ .../lib32/ .../lib64/ for each. I took the suggestion from CLFS powerpc64 cross building book, removed "-B$(build_tooldir)/lib/", then cross ld can't find crti.o; In my situation, the crti.o was in the same directory with libc.so, libc.so.6 and so on. I've looked at configure and Makefile.in, and can manually adjust it to choose the right lib but I believe there has been a simple solution already, or is there anything I did wrong?