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/7c60f8204018
branches:  trunk
changeset: 818406:7c60f8204018
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 c6bc8f0f7a76 -r 7c60f8204018 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