From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22232 invoked by alias); 21 Jan 2015 16:47:05 -0000 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 Received: (qmail 22185 invoked by uid 89); 21 Jan 2015 16:47:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: elasmtp-kukur.atl.sa.earthlink.net Received: from elasmtp-kukur.atl.sa.earthlink.net (HELO elasmtp-kukur.atl.sa.earthlink.net) (209.86.89.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 21 Jan 2015 16:46:54 +0000 Received: from [68.104.56.205] (helo=macbook2.local) by elasmtp-kukur.atl.sa.earthlink.net with esmtpa (Exim 4.67) (envelope-from ) id 1YDyQf-0003M9-66 for gdb@sourceware.org; Wed, 21 Jan 2015 11:46:53 -0500 Message-ID: <54BFD7FB.2080608@earthlink.net> Date: Wed, 21 Jan 2015 16:47:00 -0000 From: Stan Shebs User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: gdb@sourceware.org Subject: Re: How to compile a static gdb-server? References: In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-ELNK-Trace: ae6f8838ff913eba0cc1426638a40ef67e972de0d01da94043f4fbddfa362be298604a1eacedb082350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-IsSubscribed: yes X-SW-Source: 2015-01/txt/msg00041.txt.bz2 On 1/20/15 9:39 PM, fei ding wrote: > Hey guys: > > I need to compile a static gdb-server, which LDFLAGS=-static in > makefile, but it fails like this: > > gcc -shared -fPIC -Wl,--no-undefined -g -O2 -I. -I. -I./../common > -I./../regformats -I./.. -I./../../include -I./../gnulib/import > -Ibuild-gnulib-gdbserver/import -Wall -Wdeclaration-after-statement > -Wpointer-arith -Wformat-nonliteral -Wno-char-subscripts -Wempty-body > -DGDBSERVER \ > -static -Wl,--dynamic-list=./proc-service.list -o > libinproctrace.so [...] I'd suggest adding --disable-inprocess-agent to the configure line; the in-process agent library is wired up to be dynamically loaded, and is only needed if you're doing fast tracepoints (ftrace command). Stan