From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12952 invoked by alias); 1 Jul 2002 16:17:44 -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 12869 invoked from network); 1 Jul 2002 16:17:39 -0000 Received: from unknown (HELO kerberos.suse.cz) (195.47.106.10) by sources.redhat.com with SMTP; 1 Jul 2002 16:17:39 -0000 Received: from chimera.suse.cz (chimera.suse.cz [10.20.0.2]) by kerberos.suse.cz (SuSE SMTP server) with ESMTP id BF80059D351 for ; Mon, 1 Jul 2002 18:17:38 +0200 (CEST) Received: from suse.cz (naga.suse.cz [10.20.1.16]) by chimera.suse.cz (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id g61GHcg19466 for ; Mon, 1 Jul 2002 18:17:38 +0200 X-Authentication-Warning: chimera.suse.cz: Host naga.suse.cz [10.20.1.16] claimed to be suse.cz Message-ID: <3D2080A2.6080702@suse.cz> Date: Mon, 01 Jul 2002 09:17:00 -0000 From: Michal Ludvig Organization: SuSE CR User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529 X-Accept-Language: cs, cz, en MIME-Version: 1.0 To: gdb Subject: cross-target gdb compilation problems Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2002-07/txt/msg00007.txt.bz2 Hi all, I'm trying to fix cross-target gdb compilation for x86-64 target (testing on i386 host). The problem is, that it always fails with: libgdb.a(solib.o): In function `clear_solib': /ttt/64/gdb/gdb/solib.c:742: undefined reference to `disable_breakpoints_in_shlibs' libgdb.a(solib-svr4.o): In function `enable_break': /ttt/64/gdb/gdb/solib-svr4.c:856: undefined reference to `remove_solib_event_breakpoints' /ttt/64/gdb/gdb/solib-svr4.c:983: undefined reference to `create_solib_event_breakpoint' collect2: ld returned 1 exit status make: *** [gdb] Error 1 while linking gdb binary. I realised, that many other targets define #include "solib.h" in their config/*/tm-*.h files. However x86-64 is a pure multiarch target and thus using TM file is not allowed. When I add '#include "solib.h"' directly to breakpoints.c it compiles and links just fine. Also it seems like most targets use it anyway. If we would wrap all #defines in solib.h between #ifndef...#endif it would remain backward compatible for targets that define their own macros. Or am I wrong? Like this: [solib.h] + #ifndef SOLIB_ADD #define SOLIB_ADD(filename, from_tty, targ, readsyms) \ solib_add (filename, from_tty, targ, readsyms) + #endif Or is there another way to solve my compilation problems? Michal Ludvig -- * SuSE CR, s.r.o * mludvig@suse.cz * +420 2 9654 5373 * http://www.suse.cz