This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/3] Move gdb/common/diagnostics.h to include/diagnostics.h


On 21 May 2018, at 13:15, H dot J dot Lu <hjl dot tools at gmail dot com> 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 ./configure 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 parenthesized 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 <http://www.gnu.org/licenses/>.  */
> 
> -#ifndef COMMON_DIAGNOSTICS_H
> -#define COMMON_DIAGNOSTICS_H
> -
> -#include "common/preprocessor.h"

Putting this #include back fixes the build. Apparently in this configuration, include/diagnostics.h doesn't otherwise have a definition of STRINGIFY whereas on Linux or other platforms it does, via some coincidence of different host-related includes or something.

Cheers,

    John

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]