Module Name: src Committed By: mrg Date: Sat Feb 3 19:27:15 UTC 2018
Modified Files: src/external/gpl3/gcc/dist/gcc/config: netbsd.h src/external/gpl3/gcc/dist/libgcc/config/i386: t-cpuinfo src/external/gpl3/gcc/dist/libobjc: encoding.c src/external/gpl3/gcc/dist/libstdc++-v3/src/c++98: compatibility.cc src/external/gpl3/gcc/lib: Makefile.hacks src/external/gpl3/gcc/lib/libgomp: Makefile src/external/gpl3/gcc/lib/libstdc++-v3: Makefile Log Message: 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. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/external/gpl3/gcc/dist/gcc/config/netbsd.h cvs rdiff -u -r1.1.1.1 -r1.2 \ src/external/gpl3/gcc/dist/libgcc/config/i386/t-cpuinfo cvs rdiff -u -r1.7 -r1.8 src/external/gpl3/gcc/dist/libobjc/encoding.c cvs rdiff -u -r1.1.1.3 -r1.2 \ src/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/compatibility.cc cvs rdiff -u -r1.5 -r1.6 src/external/gpl3/gcc/lib/Makefile.hacks cvs rdiff -u -r1.17 -r1.18 src/external/gpl3/gcc/lib/libgomp/Makefile cvs rdiff -u -r1.28 -r1.29 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/external/gpl3/gcc/dist/gcc/config/netbsd.h diff -u src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.21 src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.22 --- src/external/gpl3/gcc/dist/gcc/config/netbsd.h:1.21 Fri Feb 2 03:41:04 2018 +++ src/external/gpl3/gcc/dist/gcc/config/netbsd.h Sat Feb 3 19:27:15 2018 @@ -63,7 +63,7 @@ along with GCC; see the file COPYING3. * 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. */ Index: src/external/gpl3/gcc/dist/libgcc/config/i386/t-cpuinfo diff -u src/external/gpl3/gcc/dist/libgcc/config/i386/t-cpuinfo:1.1.1.1 src/external/gpl3/gcc/dist/libgcc/config/i386/t-cpuinfo:1.2 --- src/external/gpl3/gcc/dist/libgcc/config/i386/t-cpuinfo:1.1.1.1 Sat Mar 1 08:41:47 2014 +++ src/external/gpl3/gcc/dist/libgcc/config/i386/t-cpuinfo Sat Feb 3 19:27:15 2018 @@ -1 +1,3 @@ LIB2ADD += $(srcdir)/config/i386/cpuinfo.c +LIBGCC2_INCLUDES = -I$(srcdir)/../gcc/config/i386 + Index: src/external/gpl3/gcc/dist/libobjc/encoding.c diff -u src/external/gpl3/gcc/dist/libobjc/encoding.c:1.7 src/external/gpl3/gcc/dist/libobjc/encoding.c:1.8 --- src/external/gpl3/gcc/dist/libobjc/encoding.c:1.7 Fri Feb 2 03:41:10 2018 +++ src/external/gpl3/gcc/dist/libobjc/encoding.c Sat Feb 3 19:27:15 2018 @@ -1108,7 +1108,10 @@ objc_layout_structure_next_member (struc /* 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 @@ objc_layout_structure_next_member (struc 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 @@ objc_layout_structure_next_member (struc 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)); } Index: src/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/compatibility.cc diff -u src/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/compatibility.cc:1.1.1.3 src/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/compatibility.cc:1.2 --- src/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/compatibility.cc:1.1.1.3 Fri Feb 2 01:58:49 2018 +++ src/external/gpl3/gcc/dist/libstdc++-v3/src/c++98/compatibility.cc Sat Feb 3 19:27:15 2018 @@ -381,11 +381,11 @@ _GLIBCXX_END_NAMESPACE_VERSION 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 Index: src/external/gpl3/gcc/lib/Makefile.hacks diff -u src/external/gpl3/gcc/lib/Makefile.hacks:1.5 src/external/gpl3/gcc/lib/Makefile.hacks:1.6 --- src/external/gpl3/gcc/lib/Makefile.hacks:1.5 Thu Mar 17 08:02:38 2016 +++ src/external/gpl3/gcc/lib/Makefile.hacks Sat Feb 3 19:27:15 2018 @@ -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 Index: src/external/gpl3/gcc/lib/libgomp/Makefile diff -u src/external/gpl3/gcc/lib/libgomp/Makefile:1.17 src/external/gpl3/gcc/lib/libgomp/Makefile:1.18 --- src/external/gpl3/gcc/lib/libgomp/Makefile:1.17 Fri Feb 2 20:57:53 2018 +++ src/external/gpl3/gcc/lib/libgomp/Makefile Sat Feb 3 19:27:15 2018 @@ -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 @@ SRCS= \ 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/} Index: src/external/gpl3/gcc/lib/libstdc++-v3/Makefile diff -u src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.28 src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.29 --- src/external/gpl3/gcc/lib/libstdc++-v3/Makefile:1.28 Mon Nov 13 07:21:20 2017 +++ src/external/gpl3/gcc/lib/libstdc++-v3/Makefile Sat Feb 3 19:27:15 2018 @@ -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 @@ LIBDPLIBS+= m ${.CURDIR}/../../../../../ 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.concept-inst.cc += -D_GLIBCXX_C 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 @@ BUILDSYMLINKS+= \ ${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 @@ DPSRCS+= ${_dst} .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 -.endfor -.for _s in ${G_CPP98_SOURCES:Nlocalename.cc:Nlocale_init.cc:M*.cc} +. if empty(COPTS.${_s}:M-std=*) COPTS.${_s}+= -std=gnu++98 +. endif +.endfor +.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 @@ COPTS.${f}.cc+= -fimplicit-templates ${G ${.CURDIR}/arch/${LIBSTDCXX_MACHINE_ARCH} ${OBJS}: ${.CURDIR}/arch/${LIBSTDCXX_MACHINE_ARCH}/defs.mk + .else .include <bsd.prog.mk> # do nothing .endif