From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8876 invoked by alias); 28 Jul 2010 13:42:21 -0000 Received: (qmail 8866 invoked by uid 22791); 28 Jul 2010 13:42:20 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 28 Jul 2010 13:42:16 +0000 Received: from wpaz1.hot.corp.google.com (wpaz1.hot.corp.google.com [172.24.198.65]) by smtp-out.google.com with ESMTP id o6SDgExQ003427 for ; Wed, 28 Jul 2010 06:42:14 -0700 Received: from ewy9 (ewy9.prod.google.com [10.241.103.9]) by wpaz1.hot.corp.google.com with ESMTP id o6SDgBNM017646 for ; Wed, 28 Jul 2010 06:42:12 -0700 Received: by ewy9 with SMTP id 9so1923793ewy.8 for ; Wed, 28 Jul 2010 06:42:11 -0700 (PDT) Received: by 10.14.6.142 with SMTP id 14mr2361651een.38.1280324530439; Wed, 28 Jul 2010 06:42:10 -0700 (PDT) Received: from coign.google.com (dhcp-172-28-249-136.lul.corp.google.com [172.28.249.136]) by mx.google.com with ESMTPS id v11sm3463487weq.40.2010.07.28.06.42.08 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 28 Jul 2010 06:42:09 -0700 (PDT) From: Ian Lance Taylor To: "Andy Gibbs" Cc: Subject: Re: Statically compiling gcc References: Date: Wed, 28 Jul 2010 14:06:00 -0000 In-Reply-To: (Andy Gibbs's message of "Wed, 28 Jul 2010 15:10:59 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-System-Of-Record: true 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: 2010-07/txt/msg00251.txt.bz2 "Andy Gibbs" writes: > Is it possible to compile gcc itself statically, i.e. without any > library dependencies? I have compiled gcc on my local machine, but it > is linked against eglibc 2.11, but the build server we use has eglibc > 2.3.6 instead so when copying gcc across, it doesn't run. At this > time, we don't want to upgrade libc on an otherwise working server. > > I know it is possible to do Canadian cross-compiles, but I haven't > managed to get this to work. Therefore I was wondering if I can > simply statically compile gcc instead? Searching google and the gcc > documentation just brings up a lot of stuff about using gcc to > staticially compile other applications, not statically compiling gcc > itself! It would probably work if you build gcc with make BOOT_LDFLAGS=-static I haven't tried it, though. Ian