Source-Changes-HG archive

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

[src/trunk]: src/external/gpl3/gcc/usr.bin partial work-in-progress to build ...



details:   https://anonhg.NetBSD.org/src/rev/0c4a268013b3
branches:  trunk
changeset: 359201:0c4a268013b3
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Feb 04 09:22:03 2018 +0000

description:
partial work-in-progress to build GCC 6.4 natively:
- use -std=gnu++98 by default.
- add build support for new GCC generators, etc.
- regen i386 mknative files.

diffstat:

 external/gpl3/gcc/usr.bin/Makefile.inc               |    4 +-
 external/gpl3/gcc/usr.bin/backend/Makefile           |   48 +++++++-
 external/gpl3/gcc/usr.bin/gcc/arch/i386/auto-host.h  |  100 +++++++++---------
 external/gpl3/gcc/usr.bin/gcc/arch/i386/configargs.h |    4 +-
 4 files changed, 95 insertions(+), 61 deletions(-)

diffs (truncated from 567 to 300 lines):

diff -r 074580cbd676 -r 0c4a268013b3 external/gpl3/gcc/usr.bin/Makefile.inc
--- a/external/gpl3/gcc/usr.bin/Makefile.inc    Sun Feb 04 09:18:44 2018 +0000
+++ b/external/gpl3/gcc/usr.bin/Makefile.inc    Sun Feb 04 09:22:03 2018 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile.inc,v 1.29 2017/08/22 09:17:50 mrg Exp $
+#      $NetBSD: Makefile.inc,v 1.30 2018/02/04 09:22:03 mrg Exp $
 
 .ifndef _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_INC_
 _EXTERNAL_GPL3_GCC_USR_BIN_MAKEFILE_INC_=1
@@ -39,6 +39,8 @@
 NBCOMPATLIB=   -L${TOOLDIR}/lib -lnbcompat
 .endif
 
+CXXFLAGS+=     -std=gnu++98
+
 GNUHOSTDIST=   ${DIST}
 BUILD_PREFIX=  ${C_BUILD_PREFIX}
 
diff -r 074580cbd676 -r 0c4a268013b3 external/gpl3/gcc/usr.bin/backend/Makefile
--- a/external/gpl3/gcc/usr.bin/backend/Makefile        Sun Feb 04 09:18:44 2018 +0000
+++ b/external/gpl3/gcc/usr.bin/backend/Makefile        Sun Feb 04 09:22:03 2018 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.39 2017/10/08 11:08:55 joerg Exp $
+#      $NetBSD: Makefile,v 1.40 2018/02/04 09:22:03 mrg Exp $
 
 LIBISPRIVATE=  yes
 
@@ -21,6 +21,8 @@
 CPPFLAGS.cppdefault.c+=        -DPREFIX=\"/usr\" \
                        -DNATIVE_SYSTEM_HEADER_DIR=\"${G_NATIVE_SYSTEM_HEADER_DIR}\"
 
+HOST_CXXFLAGS+=        -std=gnu++98
+
 HOSTPROG_CXX=  1
 
 .include <bsd.own.mk>
@@ -172,10 +174,10 @@
 
 CLEANFILES+=   genmodes insn-modes.c insn-modes.h-test min-insn-modes.c
 
-gimple-match.c: genmatch
+gimple-match.c: genmatch cfn-operators.pd
        ./genmatch --gimple ${GNUHOSTDIST}/gcc/match.pd > gimple-match.c.tmp
        mv gimple-match.c.tmp gimple-match.c
-generic-match.c: genmatch
+generic-match.c: genmatch cfn-operators.pd
        ./genmatch --generic ${GNUHOSTDIST}/gcc/match.pd > generic-match.c.tmp
        mv generic-match.c.tmp generic-match.c
 genmatch.lo: ${HH_NORTL} ${G_GGC_H}
@@ -208,13 +210,15 @@
 # depends upon) it.
 CLEANFILES+=   auto-build.h
 HOST_CFLAGS+= -I${.OBJDIR}
+HOST_CXXFLAGS+= -I${.OBJDIR}
 auto-build.h: gmp.h Makefile
        ${_MKTARGET_CREATE}
        rm -rf .ab && \
        mkdir .ab && \
        (cd .ab && \
                AWK=${TOOL_AWK:Q} \
-               CC=${ORIGHOST_CC:Q} CFLAGS=${HOST_CFLAGS:Q} CXX=${HOST_CXX:Q} \
+               CC=${ORIGHOST_CC:Q} CFLAGS=${HOST_CFLAGS:Q} \
+               CXX=${HOST_CXX:Q} CXXFLAGS=${HOST_CXXFLAGS:Q} \
                MAKE=${TOOL_GMAKE:Q} \
                CONFIG_SHELL=${HOST_SH:Q} \
                gcc_cv_ld=${LD:Q} \
@@ -224,7 +228,8 @@
                        --host=`${HOST_SH} ${GNUHOSTDIST}/config.guess` \
                        --target=${MACHINE_GNU_PLATFORM} && \
                mv auto-host.h ../auto-build.h) && \
-       rm -rf .ab
+       true
+       #rm -rf .ab
 
 pass-instances.def: passes.def gen-pass-instances.awk
        ${_MKTARGET_CREATE}
@@ -326,7 +331,8 @@
 # First we generate the rules for the generators.
 #
 .for f in attr attr-common attrtab automata codes conditions config emit \
-         extract flags opinit output peep preds recog mddump condmd
+         extract flags opinit output peep preds recog mddump condmd \
+         target-def cfn-macros
 gen${f}.lo: ${HH} gen${f}.c
 gen${f}: gen${f}.lo ${GENPROG_RTL_DEPENDS} 
        ${_MKTARGET_LINK}
@@ -362,7 +368,8 @@
 
 # RTL based files
 .for f in attr.h attr-common.h codes.h config.h flags.h \
-         automata.c emit.c extract.c output.c peep.c recog.c
+         automata.c emit.c extract.c output.c peep.c recog.c \
+         target-def.h
 insn-${f}: gen${f:R} ${G_md_file} insn-conditions.md
        ${_MKTARGET_CREATE}
        ./gen${f:R} ${G_md_file} insn-conditions.md >${.TARGET}
@@ -412,6 +419,31 @@
        ./gencondmd >${.TARGET}
 CLEANFILES+=   insn-conditions.md 
 
+# build params.list for params.h.
+params.h: params.list
+DPSRCS+= params.h
+params-list.h: params.def
+params.list: params-list.h
+       ${CPP} ${.ALLSRC} | sed 's/^#.*//;/^$$/d' > params.list.tmp && \
+       mv params.list.tmp params.list
+CLEANFILES+=   params.list.tmp params.list
+
+# build case-cfn-macros.h and cfn-operators.pd
+case-cfn-macros.h: gencfn-macros
+       ./gencfn-macros -c > case-cfn-macros.h.tmp && \
+       mv case-cfn-macros.h.tmp case-cfn-macros.h
+cfn-operators.pd: gencfn-macros
+       ./gencfn-macros -o > cfn-operators.pd.tmp && \
+       mv cfn-operators.pd.tmp cfn-operators.pd
+CLEANFILES+=   case-cfn-macros.h.tmp case-cfn-macros.h \
+               cfn-operators.pd.tmp cfn-operators.pd
+
+CASECFNDEPS=   aarch64-builtins.c arm-builtins.c i386.c rs6000.c builtins.c \
+               fold-const.c tree-ssa-math-opts.c tree-ssa-reassoc.c \
+               tree-vect-patterns.c tree-vrp.c generic-match-head.c \
+               gimple-match-head.c ChangeLog-2015 fold-const-call.c \
+               gimple-ssa-backprop.c
+${CASECFNDEPS}: case-cfn-macros.h
 
 #
 # Required hard-coded dependancies.
@@ -420,7 +452,7 @@
 gencondmd.lo: tm_p.h tm-constrs.h
 read-rtl.lo gencodes.lo genattrtab.lo genautomata.lo: insn-constants.h
 genattr-common.lo gensupport.lo genconditions.lo: insn-constants.h
-genattr.lo genflags.lo genemit.lo genconfig.lo gencheck.lo: insn-constants.h
+genattr.lo genflags.lo genemit.lo genconfig.lo gencheck.lo: insn-constants.h gtype-desc.h
 genopinit.lo genrecog.lo genpreds.lo genoutput.lo genpeep.lo: insn-constants.h
 build-ggc-none.lo: gtype-desc.h
 ggc-none.o: gtype-desc.h
diff -r 074580cbd676 -r 0c4a268013b3 external/gpl3/gcc/usr.bin/gcc/arch/i386/auto-host.h
--- a/external/gpl3/gcc/usr.bin/gcc/arch/i386/auto-host.h       Sun Feb 04 09:18:44 2018 +0000
+++ b/external/gpl3/gcc/usr.bin/gcc/arch/i386/auto-host.h       Sun Feb 04 09:22:03 2018 +0000
@@ -1,5 +1,5 @@
 /* This file is automatically generated.  DO NOT EDIT! */
-/* Generated from: NetBSD: mknative-gcc,v 1.90 2017/10/04 21:42:20 christos Exp  */
+/* Generated from: NetBSD: mknative-gcc,v 1.91 2018/02/03 19:06:25 mrg Exp  */
 /* Generated from: NetBSD: mknative.common,v 1.15 2017/11/29 03:32:28 christos Exp  */
 
 /* auto-host.h.  Generated from config.in by configure.  */
@@ -704,7 +704,7 @@
 
 /* Define if <time.h> defines clock_t. */
 #ifndef USED_FOR_TARGET
-/* #undef HAVE_CLOCK_T */
+#define HAVE_CLOCK_T 1
 #endif
 
 
@@ -717,33 +717,33 @@
 /* Define to 1 if we found a declaration for 'abort', otherwise define to 0.
    */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_ABORT 0
+#define HAVE_DECL_ABORT 1
 #endif
 
 
 /* Define to 1 if we found a declaration for 'asprintf', otherwise define to
    0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_ASPRINTF 0
+#define HAVE_DECL_ASPRINTF 1
 #endif
 
 
 /* Define to 1 if we found a declaration for 'atof', otherwise define to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_ATOF 0
+#define HAVE_DECL_ATOF 1
 #endif
 
 
 /* Define to 1 if we found a declaration for 'atol', otherwise define to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_ATOL 0
+#define HAVE_DECL_ATOL 1
 #endif
 
 
 /* Define to 1 if we found a declaration for 'atoll', otherwise define to 0.
    */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_ATOLL 0
+#define HAVE_DECL_ATOLL 1
 #endif
 
 
@@ -757,7 +757,7 @@
 /* Define to 1 if we found a declaration for 'calloc', otherwise define to 0.
    */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_CALLOC 0
+#define HAVE_DECL_CALLOC 1
 #endif
 
 
@@ -771,14 +771,14 @@
 /* Define to 1 if we found a declaration for 'clock', otherwise define to 0.
    */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_CLOCK 0
+#define HAVE_DECL_CLOCK 1
 #endif
 
 
 /* Define to 1 if we found a declaration for 'errno', otherwise define to 0.
    */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_ERRNO 0
+#define HAVE_DECL_ERRNO 1
 #endif
 
 
@@ -805,7 +805,7 @@
 
 /* Define to 1 if we found a declaration for 'ffs', otherwise define to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_FFS 0
+#define HAVE_DECL_FFS 1
 #endif
 
 
@@ -860,7 +860,7 @@
 
 /* Define to 1 if we found a declaration for 'free', otherwise define to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_FREE 0
+#define HAVE_DECL_FREE 1
 #endif
 
 
@@ -874,63 +874,63 @@
 /* Define to 1 if we found a declaration for 'getchar_unlocked', otherwise
    define to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_GETCHAR_UNLOCKED 0
+#define HAVE_DECL_GETCHAR_UNLOCKED 1
 #endif
 
 
 /* Define to 1 if we found a declaration for 'getcwd', otherwise define to 0.
    */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_GETCWD 0
+#define HAVE_DECL_GETCWD 1
 #endif
 
 
 /* Define to 1 if we found a declaration for 'getc_unlocked', otherwise define
    to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_GETC_UNLOCKED 0
+#define HAVE_DECL_GETC_UNLOCKED 1
 #endif
 
 
 /* Define to 1 if we found a declaration for 'getenv', otherwise define to 0.
    */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_GETENV 0
+#define HAVE_DECL_GETENV 1
 #endif
 
 
 /* Define to 1 if we found a declaration for 'getopt', otherwise define to 0.
    */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_GETOPT 0
+#define HAVE_DECL_GETOPT 1
 #endif
 
 
 /* Define to 1 if we found a declaration for 'getpagesize', otherwise define
    to 0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_GETPAGESIZE 0
+#define HAVE_DECL_GETPAGESIZE 1
 #endif
 
 
 /* Define to 1 if we found a declaration for 'getrlimit', otherwise define to
    0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_GETRLIMIT 0
+#define HAVE_DECL_GETRLIMIT 1
 #endif
 
 
 /* Define to 1 if we found a declaration for 'getrusage', otherwise define to
    0. */
 #ifndef USED_FOR_TARGET
-#define HAVE_DECL_GETRUSAGE 0



Home | Main Index | Thread Index | Old Index