From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32175 invoked by alias); 5 May 2003 21:53:04 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 32162 invoked from network); 5 May 2003 21:53:03 -0000 Received: from unknown (HELO crack.them.org) (146.82.138.56) by sources.redhat.com with SMTP; 5 May 2003 21:53:03 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 19Cntl-0004T3-00; Mon, 05 May 2003 16:53:25 -0500 Received: from drow by nevyn.them.org with local (Exim 3.36 #1 (Debian)) id 19CntM-0001Pn-00; Mon, 05 May 2003 17:53:00 -0400 Date: Mon, 05 May 2003 21:53:00 -0000 From: Daniel Jacobowitz To: "Harris, Jeff" Cc: gdb@sources.redhat.com Subject: Re: gdbserver cross compile Message-ID: <20030505215300.GA5409@nevyn.them.org> Mail-Followup-To: "Harris, Jeff" , gdb@sources.redhat.com References: <3B785392832ED71192AE00D0B7B0D75B1C647D@aimail.aiinet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3B785392832ED71192AE00D0B7B0D75B1C647D@aimail.aiinet.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-05/txt/msg00063.txt.bz2 To be honest, I don't remember how I solved this in our local environment... you could just rebuild that one configure file locally with 2.5x if that works. I think it's simple enough to work in both. Most other configure files in the source are not. On Mon, May 05, 2003 at 05:46:16PM -0400, Harris, Jeff wrote: > I tried setting both cross_compiling and ac_cv_prog_cc_cross environment > variables to "yes" before running configure. Neither seemed to stop it from > running its program and overriding my values. > > In thinking about setting ac_cv_header_stdc to yes, this also won't help > since the problem program, the one which checks ctype macros, will still be > run unless I can get cross_compiling to be set to "yes". > > Jeff > -----Original Message----- > From: Daniel Jacobowitz [mailto:drow@mvista.com] > Sent: Monday, May 05, 2003 5:35 PM > To: Harris, Jeff > Cc: gdb@sources.redhat.com > Subject: Re: gdbserver cross compile > > > On Mon, May 05, 2003 at 05:29:48PM -0400, Harris, Jeff wrote: > > I was having problems with getting gdbserver to correctly detect whether > it > > is being built with a cross-compiler or not. I was trying to > cross-compile > > from i386 (RedHat 7.2) to i386(gcc 3.2.3 and glibc 2.3.2). The configure > > script for gdbserver looks to have been created with an old version of > > autoconf (2.13 I believe). The mechanism it uses to detect a cross > compiler > > simply tries to compile a simple program and run it. If it runs, it > decides > > it isn't cross-compiling otherwise it is cross-compiling. > > > > My problem was that while this program runs with the cross-compiler, the > > program to detect whether standard C headers are used does not run. As a > > result, the STDC_HEADERS #define is not set and ultimately a compile error > > to occur. > > > > There doesn't seem to be a way to override the configure script's > detection > > mechanism. However, if I rerun autoconf (version 2.53) in the gdbserver > > directory, the resulting configure script is updated to include better > > logic. Basically, it compares the build and host options to configure to > > determine its cross-compile state. This mechanism works for me since I > have > > different values for these options. > > > > Is an updated version of configure something that would be considered for > > GDB 5.4? > > Sadly, no. You can't use autoconf 2.5x with the current source tree, > in general; the conversion process is still being talked about. > > It's pretty easy to fake out the 2.13 logic for this case. I don't > remember exactly what the magic was, since I can't find any specific > reference to it in our cross build scripts; but all you should need to > do is preload one of the configure script's cache variables with > something that says no, don't run programs. > > -- > Daniel Jacobowitz > MontaVista Software Debian GNU/Linux Developer > -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer