From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10116 invoked by alias); 14 Dec 2011 11:42:44 -0000 Received: (qmail 10107 invoked by uid 22791); 14 Dec 2011 11:42:44 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM X-Spam-Check-By: sourceware.org Received: from mail-ey0-f175.google.com (HELO mail-ey0-f175.google.com) (209.85.215.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 14 Dec 2011 11:42:29 +0000 Received: by eaal1 with SMTP id l1so655426eaa.20 for ; Wed, 14 Dec 2011 03:42:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.156.208 with SMTP id y16mr525111bkw.72.1323862947883; Wed, 14 Dec 2011 03:42:27 -0800 (PST) Received: by 10.205.122.141 with HTTP; Wed, 14 Dec 2011 03:42:27 -0800 (PST) In-Reply-To: <4EE88569.7000704@wippies.com> References: <4EE88569.7000704@wippies.com> Date: Wed, 14 Dec 2011 11:42:00 -0000 Message-ID: Subject: Re: aix cross(?)compiler From: =?UTF-8?Q?J=C4=99drzej_Dudkiewicz?= To: gcc-help@gcc.gnu.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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/msg00119.txt.bz2 On Wed, Dec 14, 2011 at 12:15 PM, Kai Ruottu wrote: > 14.12.2011 10:36, J=C4=99drzej 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=3D/home/jd/xcomp/sysroot/usr/ccs/bin/as \ >> LD_FOR_TARGET=3D/home/jd/xcomp/sysroot/usr/ccs/bin/ld \ >> STRIP_FOR_TARGET=3D/home/jd/xcomp/sysroot/usr/ccs/bin/strip \ >> RANLIB_FOR_TARGET=3D/home/jd/xcomp/sysroot/usr/ccs/bin/ranlib \ >> AR_FOR_TARGET=3D/home/jd/xcomp/sysroot/usr/ccs/bin/ar \ >> NM_FOR_TARGET=3D/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? Well, it must :), otherwise building it is quite probably impossible, as it seems that GNU binutils do not fully support AIX - but I can't say for sure, as I were unable to find a definite list of supported systems. I tried building using GNU binutils, but 'as' refused to compile source code, claiming that it does not know about instruction fmul, if my memory serves well. >> --with-as=3D/home/jd/xcomp/sysroot/usr/ccs/bin/as \ >> --with-ld=3D/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 : Well, RedHat 7.3 binaries do not crash on Fedora 16 for a reason :) >> /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=3D/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? I have no idea how to check it or what should I do to make it understand it - any hints or pointers to required literature? My understanding was that "--sysroot" forces gcc to provide 'ld' with required information. > 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=3D' 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. If there is a list of systems supported by GNU binutils, I will happily consult it and if my system is listed as supported, I'll report errors as soon as I reproduce them. -- J=C4=99drzej Dudkiewicz I really hate this damn machine, I wish that they would sell it. It never does just what I want, but only what I tell it.