From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 98067 invoked by alias); 4 Jun 2018 13:12:41 -0000 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 Received: (qmail 95786 invoked by uid 89); 4 Jun 2018 13:12:40 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_2,GIT_PATCH_3,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*i:sk:B781F46, H*f:sk:B781F46 X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-ot0-f194.google.com Received: from mail-ot0-f194.google.com (HELO mail-ot0-f194.google.com) (74.125.82.194) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Jun 2018 13:12:39 +0000 Received: by mail-ot0-f194.google.com with SMTP id 92-v6so2650688otw.9; Mon, 04 Jun 2018 06:12:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=GITQ/gXnT/StvnmQrMupxhhD06ez0OPA6QfY19a8zw0=; b=GVsjUq9q4g+OiuLvLtP1Copi3EsY6CyhOiw7td6qoY+saguChsVB8PSFGIymVkAaUl mZzY0NimaaFhsNKRP/606JgYpex4rFQOhiWyi9cMDEiIWNGY9baCzsb+ScILHPlTOpll t5Oa8M6v80bMMquclgqzAoKUD1XSMXpR2KyqSFc0PeofeSQLdzDRiak4cu8ev8SBbQa8 TKBDddVkPGOSv+T0mgt2oTS60XaM9HdA+XZKpgiOlWsW8Fl1fz7DjJEBaNmM67pSsCqU L+scluaGJ8PfC1lwJKeSlH+ZGZr2dmgfsJa/2tCQY2HzTNZ+wzmxdJdKGsup5ItvTtct 8HZw== X-Gm-Message-State: APt69E1QR0iNFLt1TyWwE52ymZ9FhWXZcG3fLlHn8r5wSfAJMHGYec0s gH3HtTqBD9ew3QPvgSpLywve9kyf13kCz3Z8zLvSCA== X-Google-Smtp-Source: ADUXVKLpvJtchDhffoQmbjQ2AYDXy8ToaBK6nWgSdurSKayxIHcRzvYSZpT0sTVkglQosE55LQIEZ4WolE7mV3l8hXc= X-Received: by 2002:a9d:73d2:: with SMTP id m18-v6mr1179752otk.332.1528117957546; Mon, 04 Jun 2018 06:12:37 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4a:7019:0:0:0:0:0 with HTTP; Mon, 4 Jun 2018 06:12:36 -0700 (PDT) In-Reply-To: References: <20180521121557.16535-1-hjl.tools@gmail.com> From: "H.J. Lu" Date: Mon, 04 Jun 2018 13:12:00 -0000 Message-ID: Subject: Re: [PATCH 1/3] Move gdb/common/diagnostics.h to include/diagnostics.h To: John Marshall Cc: "binutils@sourceware.org" , "gdb-patches@sourceware.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2018-06/txt/msg00056.txt.bz2 On Mon, Jun 4, 2018 at 3:51 AM, John Marshall wrote: > On 21 May 2018, at 13:15, H dot J dot Lu = wrote: >> Move gdb/common/diagnostics.h to include/diagnostics.h so that it can >> be used in binutils. > > This patch broke building gdb on MacOS with clang (i.e., after ./configur= e with no options): > > CXX gdb.o > In file included from ../../../binutils-gdb/gdb/gdb.c:19: > In file included from ../../../binutils-gdb/gdb/defs.h:531: > In file included from ../../../binutils-gdb/gdb/gdbarch.h:39: > In file included from ../../../binutils-gdb/gdb/frame.h:72: > In file included from ../../../binutils-gdb/gdb/language.h:26: > ../../../binutils-gdb/gdb/symtab.h:1361:1: error: _Pragma takes a parenth= esized string literal > DEF_VEC_P (symtab_ptr); > >> --- a/gdb/common/diagnostics.h >> +++ b/include/diagnostics.h >> [snip] >> @@ -15,10 +13,8 @@ >> You should have received a copy of the GNU General Public License >> along with this program. If not, see .= */ >> >> -#ifndef COMMON_DIAGNOSTICS_H >> -#define COMMON_DIAGNOSTICS_H >> - >> -#include "common/preprocessor.h" > > Putting this #include back fixes the build. Apparently in this configurat= ion, include/diagnostics.h doesn't otherwise have a definition of STRINGIFY= whereas on Linux or other platforms it does, via some coincidence of diffe= rent host-related includes or something. Please add #include "common/preprocessor.h" to gdb.c. --=20 H.J.