From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21307 invoked by alias); 5 May 2003 21:30:02 -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 21300 invoked from network); 5 May 2003 21:30:01 -0000 Received: from unknown (HELO aimail.aiinet.com) (205.245.180.30) by sources.redhat.com with SMTP; 5 May 2003 21:30:01 -0000 Received: by aimail.aiinet.com with Internet Mail Service (5.5.2653.19) id ; Mon, 5 May 2003 17:29:49 -0400 Message-ID: <3B785392832ED71192AE00D0B7B0D75B1C647C@aimail.aiinet.com> From: "Harris, Jeff" To: gdb@sources.redhat.com Subject: gdbserver cross compile Date: Mon, 05 May 2003 21:30:00 -0000 MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2003-05/txt/msg00060.txt.bz2 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? Thanks, Jeff