From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3259 invoked by alias); 23 Nov 2009 18:54:28 -0000 Received: (qmail 3251 invoked by uid 22791); 23 Nov 2009 18:54:27 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 23 Nov 2009 18:53:23 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 01040152 for ; Mon, 23 Nov 2009 19:53:20 +0100 (CET) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id wUiuXUe-C7RS for ; Mon, 23 Nov 2009 19:53:20 +0100 (CET) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id AFEDD151 for ; Mon, 23 Nov 2009 19:53:20 +0100 (CET) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.3+Sun/8.14.3/Submit) id nANIrKKE002891; Mon, 23 Nov 2009 19:53:20 +0100 (MET) From: Rainer Orth To: gdb-patches@sourceware.org Subject: Fix gdb 7.0 compilation on IRIX 5.3 Date: Mon, 23 Nov 2009 18:54:00 -0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-11/txt/msg00501.txt.bz2 I just tried to compile gdb 7.0 on IRIX 5.3, but failed initially: /vol/src/gnu/gdb/gdb-7.0/gdb/dwarf2read.c: In function 'dwarf2_read_section': /vol/src/gnu/gdb/gdb-7.0/gdb/dwarf2read.c:1402: error: 'MAP_FAILED' undeclared (first use in this function) /vol/src/gnu/gdb/gdb-7.0/gdb/dwarf2read.c:1402: error: (Each undeclared identifier is reported only once /vol/src/gnu/gdb/gdb-7.0/gdb/dwarf2read.c:1402: error: for each function it appears in.) make[2]: *** [dwarf2read.o] Error 1 The following trivial patch fixes this and allowed the build to finish. Unfortunately, the resulting gdb segfaults when run against itself or some recent xgcc binary. I'll investigate and report separately. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University 2009-11-23 Rainer Orth * dwarf2read.c [HAVE_MMAP] (MAP_FAILED): Define if missing. =================================================================== RCS file: gdb/RCS/dwarf2read.c,v retrieving revision 1.1 diff -up -r1.1 gdb/dwarf2read.c --- gdb/dwarf2read.c 2009/09/15 16:09:32 1.1 +++ gdb/dwarf2read.c 2009/11/23 18:13:08 @@ -58,6 +58,9 @@ #endif #ifdef HAVE_MMAP #include +#ifndef MAP_FAILED +#define MAP_FAILED -1 +#endif #endif #if 0