From patchwork Mon Mar 16 11:54:58 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 5629 Received: (qmail 80804 invoked by alias); 16 Mar 2015 11:55:03 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 80791 invoked by uid 89); 16 Mar 2015 11:55:02 -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, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 16 Mar 2015 11:55:01 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 8C16A18AEAD; Mon, 16 Mar 2015 11:55:00 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t2GBsxed006367; Mon, 16 Mar 2015 07:54:59 -0400 Message-ID: <5506C492.8090506@redhat.com> Date: Mon, 16 Mar 2015 11:54:58 +0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: asmwarrior , GDB Patches Subject: Re: [all pushed] Re: [PATCH 00/36] Support building GDB as a C++ program References: <1423524046-20605-1-git-send-email-palves@redhat.com> <54F0B52F.1050909@redhat.com> <54FB20E2.2040403@redhat.com> <54FB3C58.6050702@redhat.com> <550660C5.2060009@gmail.com> <5506661C.1040103@gmail.com> <55066A29.8090200@gmail.com> <55068495.5040205@gmail.com> <550693AB.60007@gmail.com> In-Reply-To: <550693AB.60007@gmail.com> On 03/16/2015 08:26 AM, asmwarrior wrote: > OK, I now successfully build gdb.exe and gdbserver.exe! > To handle the INT32_MAX and INT32_MIN macro definition issue, I just have: > > #ifndef INT32_MIN > #define INT32_MIN INT_MIN > #endif > > #ifndef INT32_MAX > #define INT32_MAX INT_MAX > #endif > > Before > > #if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX) > # error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to ." > #endif > > In either: > mybuildcpp\gdb\gdbserver\build-gnulib-gdbserver\import\inttypes.h > and > mybuildcpp\gdb\build-gnulib\import\inttypes.h Putting the hack in common-defs.h instead worked for me. It has the advantage of being in the sources, so won't get lost by a clean rebuild, which regenerates that file. However, we should instead do what the error says, and report the issue to bug-gnulib@gnu.org, fix the issue there, and then pull in a newer gnulib. Maybe the issue is already fixed there even. That last time we tried pulling in a newer gnulib we stumbled on a windows.h conflict that will be to resolved first though. :-/ Thanks, Pedro Alves From 9f4ccd018230538d043eaa08858a6df2eae3cabd Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Mon, 16 Mar 2015 11:09:43 +0000 Subject: [PATCH] hack for missing INT32_MIN/INT32_MAX --- gdb/common/common-defs.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gdb/common/common-defs.h b/gdb/common/common-defs.h index 62d9de5..72a65dd 100644 --- a/gdb/common/common-defs.h +++ b/gdb/common/common-defs.h @@ -27,6 +27,14 @@ #include "build-gnulib/config.h" #endif +#ifndef INT32_MIN +#define INT32_MIN INT_MIN +#endif + +#ifndef INT32_MAX +#define INT32_MAX INT_MAX +#endif + #include #include #include