Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tools/gdb Define __STDC_{LIMIT, CONSTANT, FORMAT}_MACROS in CX...



details:   https://anonhg.NetBSD.org/src/rev/2d0b5884720d
branches:  trunk
changeset: 348264:2d0b5884720d
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Oct 12 18:43:40 2016 +0000

description:
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.

diffstat:

 tools/gdb/Makefile |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r f3bf2cfd5cac -r 2d0b5884720d tools/gdb/Makefile
--- a/tools/gdb/Makefile        Wed Oct 12 16:47:08 2016 +0000
+++ b/tools/gdb/Makefile        Wed Oct 12 18:43:40 2016 +0000
@@ -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 @@
 .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 @@
                        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 \



Home | Main Index | Thread Index | Old Index