From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4701 invoked by alias); 14 Mar 2007 12:18:23 -0000 Received: (qmail 4690 invoked by uid 22791); 14 Mar 2007 12:18:21 -0000 X-Spam-Check-By: sourceware.org Received: from vms046pub.verizon.net (HELO vms046pub.verizon.net) (206.46.252.46) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 14 Mar 2007 12:18:14 +0000 Received: from ultsol.com ([72.74.243.178]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0JEW00EPX7I8F5Y2@vms046.mailsrvcs.net> for gdb@sourceware.org; Wed, 14 Mar 2007 07:18:13 -0500 (CDT) Date: Wed, 14 Mar 2007 12:18:00 -0000 From: "Fahd Abidi" Subject: RE: Building GDB Statically To: "Daniel Jacobowitz" , "Dave Korn" Cc: Message-id: <071DB0C788671B48940BC79F8B49306907260D@ultsol01.tewks.ultsol.local> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: quoted-printable Content-class: urn:content-classes:message X-Ninja-PIM: Scanned by Ninja X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2007-03/txt/msg00200.txt.bz2 I finally found how to do it. Under gdb6.6root/gdb/Makefile.in edit there is a commented line like so: #(CC_LD)=3Dgcc -static (CC_LD)=3D(CC) I Just had to comment in the first line and comment out the second. I also built it with out the shared libraries. the resulting Binary still does not work under RH9 though, complains that the kernel version is too old. BTW another possibility was if you used the optional CFLAG parameter from the make command itself: make CFLAG=3D-static I am instead Building GDB6.4 on RH9 and am going to use that as my cross host GDB binary, I have built it statically on RH9 and thus far have confirmed that it works on FC6. thanks for the help. Fahd =20 -----Original Message----- From: gdb-owner@sourceware.org [mailto:gdb-owner@sourceware.org] On Behalf Of Daniel Jacobowitz Sent: Tuesday, March 13, 2007 3:16 PM To: Dave Korn Cc: Fahd Abidi; gdb@sourceware.org Subject: Re: Building GDB Statically On Tue, Mar 13, 2007 at 06:07:55PM -0000, Dave Korn wrote: > Most GNU software allows you to specify "--disable-shared" as an=20 > option to the configure command to obtain a statically-linked build;=20 > this takes care of everything you need to do for both compiler flags,=20 > linker flags, libtool settings etc. Actually, --disable-shared normally only generates static libraries instead of shared libraries. Setting LDFLAGS or CFLAGS should work. However GDB may or may not when moved between systems; I do not recommend the use of static binaries. Compiling a dynamically linked binary on the oldest interesting system works best. --=20 Daniel Jacobowitz CodeSourcery