From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2480 invoked by alias); 14 Dec 2011 11:16:16 -0000 Received: (qmail 2465 invoked by uid 22791); 14 Dec 2011 11:16:15 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from wmh1.mail.saunalahti.fi (HELO wmh1.mail.saunalahti.fi) (62.142.5.133) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Dec 2011 11:16:00 +0000 Received: from [192.168.1.2] (dsl-kmibrasgw1-feddf800-71.dhcp.inet.fi [84.248.221.71]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: kai.ruottu@wippies.com) by wmh1.mail.saunalahti.fi (Postfix) with ESMTPSA id CEB6B1FC06C for ; Wed, 14 Dec 2011 13:15:58 +0200 (EET) Message-ID: <4EE88569.7000704@wippies.com> Date: Wed, 14 Dec 2011 11:16:00 -0000 From: Kai Ruottu User-Agent: Mozilla/5.0 (Windows NT 5.0; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: Re: aix cross(?)compiler References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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-12/txt/msg00117.txt.bz2 14.12.2011 10:36, Jędrzej Dudkiewicz kirjoitti: > Hi, > > I'm building gcc 4.6.2 (C and C++) on AIX 5.2 to compile for AIX > 4.3.3. I copied libraries and /usr/ccs/bin (as, nm, ld and others) > from 4.3.3 to sysroot/ directory on AIX 5.2. > > AS_FOR_TARGET=/home/jd/xcomp/sysroot/usr/ccs/bin/as \ > LD_FOR_TARGET=/home/jd/xcomp/sysroot/usr/ccs/bin/ld \ > STRIP_FOR_TARGET=/home/jd/xcomp/sysroot/usr/ccs/bin/strip \ > RANLIB_FOR_TARGET=/home/jd/xcomp/sysroot/usr/ccs/bin/ranlib \ > AR_FOR_TARGET=/home/jd/xcomp/sysroot/usr/ccs/bin/ar \ > NM_FOR_TARGET=/home/jd/xcomp/sysroot/usr/ccs/bin/nm \ This makes the build to differ from the normal cross GCC case where GNU binutils are used as the target binutils. Here the native AIX 4.3.3 binutils are used on a AIX 5.2 cross host as the target binutils. So my stupid question is whether this choice should work at all? > --with-as=/home/jd/xcomp/sysroot/usr/ccs/bin/as \ > --with-ld=/home/jd//xcomp/sysroot/usr/ccs/bin/ld \ These AIX 4.3.3 'as' and 'ld' seemingly don't crash on AIX 5.2 but : > /home/jd/xcomp/build/./gcc/xgcc -B/home/jd/xcomp/build/./gcc/ > -B/opt/xgcc/gcc-4.6.2/powerpc-ibm-aix4.3.3.0/bin/ > -B/opt/xgcc/gcc-4.6.2/powerpc-ibm-aix4.3.3.0/lib/ -isystem > /opt/xgcc/gcc-4.6.2/powerpc-ibm-aix4.3.3.0/include -isystem > /opt/xgcc/gcc-4.6.2/powerpc-ibm-aix4.3.3.0/sys-include > --sysroot=/home/jd/xcomp/sysroot what about the native AIX 4.3.3 'ld' understanding where the target library stuff is? What the libgcc configure understood about the target libraries? If behaving normally, building GNU binutils for the AIX 5.2 $host and targeting to the AIX 4.3.3 $target and configuring them using '--with-sysroot=' to search from $sysroot for the AIX 4.3.3, there wouldn't be these suspicicions and stupid questions... And any crash in the build would be a clear bug but it is hard to say what this case really is.