From owner-freebsd-hackers@FreeBSD.ORG Wed May 6 15:21:43 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B5EC1065672 for ; Wed, 6 May 2009 15:21:43 +0000 (UTC) (envelope-from xorquewasp@googlemail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.24]) by mx1.freebsd.org (Postfix) with ESMTP id B4F268FC21 for ; Wed, 6 May 2009 15:21:42 +0000 (UTC) (envelope-from xorquewasp@googlemail.com) Received: by ey-out-2122.google.com with SMTP id 9so58521eyd.7 for ; Wed, 06 May 2009 08:21:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:received:date:from:to:cc :subject:message-id:references:mime-version:content-type :content-disposition:in-reply-to; bh=rJS67wkEH3kGh69YhV64UOX2gwjwG7FKi28FYoswJl0=; b=QWV9SZUDbV0sdVsnevG2SV2yu1xr2/enUMsHJ5UMjjqYdOpbNwVMhsqwzXJXcw+1RP 6/UIF9PRq5Pi+Ls2rvJEj1wbffE+VOc3Xdjp0kSfdKV8KEbESIo7n7VrG1Z5ZgOEo5t2 o6TurjOiR4sU3fY6zpQdiK5DoVJ5yZ9WvVYzc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to; b=er/zH9ps8g/21tUsEQOJXQurkBGaMuHZBwQlyvMN3Ye+pfMaKIHyv/eUCGINIJxg2b NQOiIpOalHFB/Di3Lk97FFIr0/sJd9mc/2rfzQQrYP+Z2+q+GjdhrVcg9Bwi8S3NAKTw qQ7+iDOE/2MxpNny54MotZgEcW3fy3Sh4NdRY= Received: by 10.210.88.3 with SMTP id l3mr6126860ebb.55.1241623301680; Wed, 06 May 2009 08:21:41 -0700 (PDT) Received: from logik.internal.network (81-86-41-187.dsl.pipex.com [81.86.41.187]) by mx.google.com with ESMTPS id 24sm11268875ewy.1.2009.05.06.08.21.41 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 06 May 2009 08:21:41 -0700 (PDT) Received: by logik.internal.network (Postfix, from userid 11001) id F21025C31; Wed, 6 May 2009 15:21:39 +0000 (UTC) Date: Wed, 6 May 2009 16:21:39 +0100 From: xorquewasp@googlemail.com To: Daniel Eischen Message-ID: <20090506152139.GB69468@logik.internal.network> References: <20090504182714.GA52480@logik.internal.network> <20090504185644.GA16315@logik.internal.network> <20090505005128.GA4519@logik.internal.network> <20090505022151.GA32477@logik.internal.network> <20090506140325.GA69468@logik.internal.network> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Cc: freebsd-hackers@freebsd.org Subject: Re: bootstrapping gnat GCC on amd64 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 May 2009 15:21:44 -0000 On 2009-05-06 10:57:25, Daniel Eischen wrote: > > Back in the day when I did it, it was with gcc-2.7.x or > gcc-2.8.x I believe. The cross build process with gnat > was a little different. I couldn't do a normal gnat build, > which did a bootstrap and then rebuilt the compiler again > using the bootstrap. I believe I had to manually build > bootstrap, gnatlib-cross, and gnattools-cross or targets > named something like that. I don't even think "install" > worked - I think I had to manually install the cross. > > This does sound vaguely familiar though. I may have > just rebuilt the target->target GNAT with the cross > GNAT, then whenever the build process stopped with > gnatmake errors, I would manually build whatever target > it stopped at with the cross gnatbind and gnatlink. > > I don't even know if gnatmake is required to rebuild > the target->target GNAT, all the dependencies should > be listed in the Makefiles, so gcc should get called > directly as opposed through gnatmake. So try going > forward with rebuilding that x86_64 native GNAT and > see what happens. This is really what your goal is, > having the i386->x86_64 cross is nice, but not really > essential. > > Hmm, I do know that building gnat as a cross > does work though, since we have and use GNAT for > sparc-solaris hosted ppc-vxworks cross compilers. > And gnatmake works just fine as a cross. Thanks for the notes. This is an example of one of the build failures when compiling the x86_64 native GNAT: mkdir -p ada/bldtools/nmake_b rm -f ada/bldtools/nmake_b/sinfo.ads ada/bldtools/nmake_b/nmake.adt ada/bldtools/nmake_b/xnmake.adb ada/bldtools/nmake_b/xutil.ads ada/bldtools/nmake_b/xutil.adb cp -p ../../gcc-4.4.0/gcc/ada/sinfo.ads ../../gcc-4.4.0/gcc/ada/nmake.adt ../../gcc-4.4.0/gcc/ada/xnmake.adb ../../gcc-4.4.0/gcc/ada/xutil.ads ../../gcc-4.4.0/gcc/ada/xutil.adb ada/bldtools/nmake_b (cd ada/bldtools/nmake_b && x86_64-unknown-freebsd7.2-gnatmake -q xnmake && ./xnmake -b ../../nmake.adb ) x86_64-unknown-freebsd7.2-gnatmake: "xnmake.ali" incompatible ALI file, please recompile x86_64-unknown-freebsd7.2-gnatmake: "xnmake.adb" compilation error gmake[2]: *** [ada/nmake.adb] Error 4 gmake[2]: Leaving directory `/root/gcc-4.4.0-obj/gcc' gmake[1]: *** [all-gcc] Error 2 gmake[1]: Leaving directory `/root/gcc-4.4.0-obj' gmake: *** [all] Error 2 The Makefiles are pretty twisted and hard to comprehend. I'll try your suggestion, stepping through each target and ideally try to get the whole process down to shell script form. More news to follow... xw