Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/gcc updates for GCC 6.4.0:
details: https://anonhg.NetBSD.org/src/rev/3341e2d56709
branches: trunk
changeset: 359179:3341e2d56709
user: mrg <mrg%NetBSD.org@localhost>
date: Sat Feb 03 19:27:15 2018 +0000
description:
updates for GCC 6.4.0:
- we install version specific headers into gcc-6.
- add missing include path for i386/cpuinfo.c.
- fix compile time warnings in libobjc/encoding.c
- adjust c++98/compatibility.cc to use a visible header
- Makefile.hacks gains a hack for x86 and insn-constants.h. (should
try to figure out how to build this earlier.)
- libgomp missing priority_queue.c (switch to mknative pulling it out?).
- build a libstdc++ version file and use it.
- fix the handling of -std= to default the same as normal builds.
diffstat:
external/gpl3/gcc/dist/gcc/config/netbsd.h | 2 +-
external/gpl3/gcc/dist/libgcc/config/i386/t-cpuinfo | 2 +
external/gpl3/gcc/dist/libobjc/encoding.c | 9 ++-
external/gpl3/gcc/dist/libstdc++-v3/src/c++98/compatibility.cc | 4 +-
external/gpl3/gcc/lib/Makefile.hacks | 9 +-
external/gpl3/gcc/lib/libgomp/Makefile | 5 +-
external/gpl3/gcc/lib/libstdc++-v3/Makefile | 40 ++++++++-
7 files changed, 57 insertions(+), 14 deletions(-)
diffs (202 lines):
diff -r 66407393a55f -r 3341e2d56709 external/gpl3/gcc/dist/gcc/config/netbsd.h
--- a/external/gpl3/gcc/dist/gcc/config/netbsd.h Sat Feb 03 19:06:25 2018 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/netbsd.h Sat Feb 03 19:27:15 2018 +0000
@@ -63,7 +63,7 @@
* XXX figure out a better way to do this
*/
#undef GCC_INCLUDE_DIR
-#define GCC_INCLUDE_DIR "/usr/include/gcc-5"
+#define GCC_INCLUDE_DIR "/usr/include/gcc-6"
/* Under NetBSD, the normal location of the various *crt*.o files is the
/usr/lib directory. */
diff -r 66407393a55f -r 3341e2d56709 external/gpl3/gcc/dist/libgcc/config/i386/t-cpuinfo
--- a/external/gpl3/gcc/dist/libgcc/config/i386/t-cpuinfo Sat Feb 03 19:06:25 2018 +0000
+++ b/external/gpl3/gcc/dist/libgcc/config/i386/t-cpuinfo Sat Feb 03 19:27:15 2018 +0000
@@ -1,1 +1,3 @@
LIB2ADD += $(srcdir)/config/i386/cpuinfo.c
+LIBGCC2_INCLUDES = -I$(srcdir)/../gcc/config/i386
+
diff -r 66407393a55f -r 3341e2d56709 external/gpl3/gcc/dist/libobjc/encoding.c
--- a/external/gpl3/gcc/dist/libobjc/encoding.c Sat Feb 03 19:06:25 2018 +0000
+++ b/external/gpl3/gcc/dist/libobjc/encoding.c Sat Feb 03 19:27:15 2018 +0000
@@ -1108,7 +1108,10 @@
/* The following are used only if the field is a bitfield */
register const char *bfld_type = 0;
- register int bfld_type_align = 0, bfld_field_size = 0;
+#ifdef HAVE_BITFIELD_TYPE_MATTERS
+ register int bfld_type_align = 0;
+#endif
+ register int bfld_field_size = 0;
/* The current type without the type qualifiers */
const char *type;
@@ -1131,7 +1134,9 @@
bfld_type++)
/* do nothing */;
+#ifdef HAVE_BITFIELD_TYPE_MATTERS
bfld_type_align = objc_alignof_type (bfld_type) * __CHAR_BIT__;
+#endif
bfld_field_size = atoi (objc_skip_typespec (bfld_type));
layout->record_size += bfld_field_size;
}
@@ -1156,7 +1161,9 @@
bfld_type++)
/* do nothing */;
+#ifdef HAVE_BITFIELD_TYPE_MATTERS
bfld_type_align = objc_alignof_type (bfld_type) * __CHAR_BIT__;
+#endif
bfld_field_size = atoi (objc_skip_typespec (bfld_type));
}
diff -r 66407393a55f -r 3341e2d56709 external/gpl3/gcc/dist/libstdc++-v3/src/c++98/compatibility.cc
--- a/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/compatibility.cc Sat Feb 03 19:06:25 2018 +0000
+++ b/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/compatibility.cc Sat Feb 03 19:27:15 2018 +0000
@@ -381,11 +381,11 @@
asm (".symver " #cur "," #old "@@" #version);
#define _GLIBCXX_APPLY_SYMVER _GLIBCXX_3_4_SYMVER
-#include <bits/compatibility.h>
+#include <abi/compatibility.h>
#undef _GLIBCXX_APPLY_SYMVER
#define _GLIBCXX_APPLY_SYMVER _GLIBCXX_3_4_5_SYMVER
-#include <bits/compatibility.h>
+#include <abi/compatibility.h>
#undef _GLIBCXX_APPLY_SYMVER
diff -r 66407393a55f -r 3341e2d56709 external/gpl3/gcc/lib/Makefile.hacks
--- a/external/gpl3/gcc/lib/Makefile.hacks Sat Feb 03 19:06:25 2018 +0000
+++ b/external/gpl3/gcc/lib/Makefile.hacks Sat Feb 03 19:27:15 2018 +0000
@@ -1,11 +1,16 @@
-# $NetBSD: Makefile.hacks,v 1.5 2016/03/17 08:02:38 mrg Exp $
+# $NetBSD: Makefile.hacks,v 1.6 2018/02/03 19:27:15 mrg Exp $
# some random crap we need in a few places
-.if ${MACHINE_CPU} == "mips"
+.if ${MACHINE_CPU} == "mips" || ${MACHINE} == "amd64" || ${MACHINE} == "i386"
insn-constants.h:
${_MKTARGET_CREATE}
+.if ${MACHINE_CPU} == "mips"
echo "enum processor { on, off };" > ${.TARGET}
+.endif
+.if ${MACHINE} == "amd64" || ${MACHINE} == "i386"
+ echo "#define FIRST_PSEUDO_REG 81" > ${.TARGET}
+.endif
DPSRCS+= insn-constants.h
CLEANFILES+= insn-constants.h
.else
diff -r 66407393a55f -r 3341e2d56709 external/gpl3/gcc/lib/libgomp/Makefile
--- a/external/gpl3/gcc/lib/libgomp/Makefile Sat Feb 03 19:06:25 2018 +0000
+++ b/external/gpl3/gcc/lib/libgomp/Makefile Sat Feb 03 19:27:15 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.17 2018/02/02 20:57:53 mrg Exp $
+# $NetBSD: Makefile,v 1.18 2018/02/03 19:27:15 mrg Exp $
# build GCC's libgomp, so that -fopenmp works.
@@ -47,7 +47,8 @@
oacc-mem.c \
oacc-async.c \
oacc-plugin.c \
- oacc-cuda.c
+ oacc-cuda.c \
+ priority_queue.c
GOMP_MACHINE_ARCH?= ${MACHINE_ARCH:S/earmv5/earm/}
diff -r 66407393a55f -r 3341e2d56709 external/gpl3/gcc/lib/libstdc++-v3/Makefile
--- a/external/gpl3/gcc/lib/libstdc++-v3/Makefile Sat Feb 03 19:06:25 2018 +0000
+++ b/external/gpl3/gcc/lib/libstdc++-v3/Makefile Sat Feb 03 19:27:15 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.28 2017/11/13 07:21:20 mrg Exp $
+# $NetBSD: Makefile,v 1.29 2018/02/03 19:27:15 mrg Exp $
REQUIRETOOLS= yes
NOLINT= # defined
@@ -18,6 +18,20 @@
COPTS.random.cc+= ${${ACTIVE_CC} == "clang":? -mrdrnd :}
.endif
+.if ${MKPIC} != "no"
+libstdc++-symbols.ver:
+ cat ${DIST}/libstdc++-v3/config/abi/pre/gnu.ver ${G_port_specific_symbol_files} | \
+ ${TOOL_GREP} -E -v '^[ ]*#(#| |$)' | \
+ ${CXX} -I${DESTDIR}/usr/include/g++ -E -P -include ${.CURDIR}/arch/${LIBSTDCXX_MACHINE_ARCH}/c++config.h - > \
+ ${.TARGET}.tmp && mv ${.TARGET}.tmp ${.TARGET} && rm -f ${.TARGET}.tmp
+
+libstdc++_pic.a:: libstdc++-symbols.ver
+
+LDFLAGS+= -Wl,-O1 \
+ -Wl,--gc-sections \
+ -Wl,--version-script=libstdc++-symbols.ver
+.endif
+
CXXFLAGS.clang+= -stdlib=libstdc++ -std=c++11 -D_GLIBCXX_ABI_TAG_CXX11=
CXXFLAGS+= ${CXXFLAGS.${ACTIVE_CC}}
CWARNFLAGS.clang+= -Wno-logical-op-parentheses \
@@ -77,6 +91,7 @@
CPPFLAGS.parallel_list.cc += -D_GLIBCXX_PARALLEL
CPPFLAGS.parallel_settings.cc += -D_GLIBCXX_PARALLEL
CPPFLAGS.compatibility-parallel_list.cc += -D_GLIBCXX_PARALLEL
+CPPFLAGS.compatibility.cc+= -I${DIST}/libstdc++-v3/config
cp-demangle.d cp-demangle.o: cp-demangle.h
@@ -108,7 +123,7 @@
${GLIBCXX_SRCDIR}/${G_CMONEY_CC} monetary_members_cow.cc \
${GLIBCXX_SRCDIR}/${G_CNUMERIC_CC} numeric_members_cow.cc
-# XXX both c++98 and c++11 have codecvt.cc files.
+# both c++98 and c++11 have codecvt.cc files.
BUILDSYMLINKS+= \
${GLIBCXX_SRCDIR}/src/c++98/codecvt.cc c98-codecvt.cc
BUILDSYMLINKS+= \
@@ -128,18 +143,30 @@
.endif
.endif
-# XXX Make this either/or, not one, and maybe another
+# XXX Make this either/or, not one, and maybe another
+CXX11_ALWAYS= localename.cc \
+ locale_init.cc \
+ compatibility-c++0x.cc \
+ compatibility-atomic-c++0x.cc \
+ compatibility-thread-c++0x.cc \
+ compatibility-chrono.cc \
+ compatibility-condvar.cc
.for _s in ${SRCS:M*.cc}
-COPTS.${_s}+= -std=gnu++11
+. if empty(COPTS.${_s}:M-std=*)
+COPTS.${_s}+= -std=gnu++98
+. endif
.endfor
-.for _s in ${G_CPP98_SOURCES:Nlocalename.cc:Nlocale_init.cc:M*.cc}
-COPTS.${_s}+= -std=gnu++98
+.for _s in ${G_CPP11_SOURCES:M*.cc} ${CXX11_ALWAYS}
+# XXX error: 'template<class> class std::auto_ptr' is deprecated
+COPTS.${_s}+= -std=gnu++11 -Wno-error
.endfor
COPTS.del_ops.cc += -Wno-c++14-compat
COPTS.del_opvs.cc += -Wno-c++14-compat
COPTS.cp-demangle.c += -Wno-unused-function
+COPTS.ext-inst.cc+= -Wno-error
+
.for f in collate_members_cow \
messages_members_cow \
monetary_members_cow \
@@ -160,6 +187,7 @@
${.CURDIR}/arch/${LIBSTDCXX_MACHINE_ARCH}
${OBJS}: ${.CURDIR}/arch/${LIBSTDCXX_MACHINE_ARCH}/defs.mk
+
.else
.include <bsd.prog.mk> # do nothing
.endif
Home |
Main Index |
Thread Index |
Old Index