summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2016-10-12 18:43:40 +0000
committerchristos <christos@NetBSD.org>2016-10-12 18:43:40 +0000
commitf79b27ad41fc76cb16b1cf60c3f78c611684fd47 (patch)
treef9a305deb2e89ed3301cab4abcca15e1d3cae372
parentc03b94e974a4d3435f0f93913c3afb3753fe6bc5 (diff)
Define __STDC_{LIMIT,CONSTANT,FORMAT}_MACROS in CXXFLAGS.
The problem is that the gnulib interception of <stdint.h> and <inttypes.h> does not really work because we implement those internally with <sys/inttypes.h> and <sys/stdint.h> and those internal headers are used by other internal headers *before* they get a chance to be intercepted (where the __STDC_ macros are defined). Another way to fix this is to move the inclusion of the other headers in <stdint.h> and <inttypes.h> outside multiple inclusion protection.
-rw-r--r--tools/gdb/Makefile8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/gdb/Makefile b/tools/gdb/Makefile
index 04be59798de..9d7bda8b8dd 100644
--- a/tools/gdb/Makefile
+++ b/tools/gdb/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.27 2016/01/26 17:48:31 christos Exp $
+# $NetBSD: Makefile,v 1.28 2016/10/12 18:43:40 christos Exp $
.include <bsd.own.mk>
@@ -18,6 +18,9 @@ INSTALL_TARGET= install-gdb
.include "${.CURDIR}/../Makefile.gmakehost"
CCADDFLAGS= --sysroot=${DESTDIR} -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/ -I${.OBJDIR}/.native/gcc/include
+CXXADDFLAGS+= -D__STDC_FORMAT_MACROS
+CXXADDFLAGS+= -D__STDC_LIMIT_MACROS
+CXXADDFLAGS+= -D__STDC_CONSTANT_MACROS
NEWCONFIGDIR?= ${.CURDIR}/../..
MKNATIVE?= ${.CURDIR}/mknative-gdb
@@ -65,7 +68,8 @@ native-gdb: .native/.configure_done
CC=${CC:Q}' '${CCADDFLAGS:Q} \
CXX=${CXX:Q}' '${CCADDFLAGS:Q} \
CPP=${CPP:Q}' '-isystem' '${DESTDIR}/usr/include \
- CFLAGS= CPPFLAGS= CXXFLAGS= LDFLAGS=${LDADDFLAGS:Q} \
+ CFLAGS= CPPFLAGS= CXXFLAGS=${CXXADDFLAGS:Q} \
+ LDFLAGS=${LDADDFLAGS:Q} \
MSGFMT=${TOOLDIR}/bin/${_TOOL_PREFIX}msgfmt \
XGETTEXT=${TOOLDIR}/bin/${_TOOL_PREFIX}xgettext \
LIBS=-lintl \