gcc80: Mark few sources as special for narrowing.
authorzrj <rimvydas.jasinskas@gmail.com>
Wed, 2 May 2018 13:50:54 +0000 (16:50 +0300)
committerzrj <zrj@dragonflybsd.org>
Mon, 14 May 2018 17:21:12 +0000 (20:21 +0300)
While there, add -Wpragmas suppression for gcc47.

gnu/usr.bin/cc80/libbackend/Makefile
gnu/usr.bin/cc80/support-libs/libcommon-target/Makefile
gnu/usr.bin/cc80/support-libs/libcommon/Makefile

index 8d279ef..973c5d6 100644 (file)
@@ -423,6 +423,16 @@ OBJS=      ${BACKEND_OBJS}
 SRCS=  gimple-loop-interchange.cc unique-ptr-tests.cc \
        wide-int.cc wide-int-print.cc
 
+# for gimple-ssa-sprintf.c
+.if ${CCVER:Mgcc47}
+CXXFLAGS+=     -Wno-pragmas
+.endif
+
+# for tree-ssa-structalias.c, tree-vect-stmts.c
+.if ${CCVER:Mgcc80}
+CXXFLAGS+=     -Wno-narrowing
+.endif
+
 # hack to force c++ compiler to compile *.c files to create library
 .for cfile in ${BACKEND_OBJS}
 ${cfile}: ${cfile:.o=.c}
index 6559127..f36cec8 100644 (file)
@@ -16,6 +16,11 @@ common_out_object_file=      i386-common.o
 OBJS=          ${OBJS-libcommon-target}
 CFLAGS+=       -DPREFIX=\"${TOOLS_PREFIX}/usr\"
 
+# for opts-common.c
+.if ${CCVER:Mgcc80}
+CXXFLAGS+=     -Wno-narrowing
+.endif
+
 .for ofile in ${OBJS-libcommon-target}
 ${ofile}: ${ofile:.o=.c}
        ${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}
index 4b29394..1986a9e 100644 (file)
@@ -13,6 +13,11 @@ SRCS+=               memory-block.cc
 OBJS+=         ${OBJS-libcommon}
 CFLAGS+=       -I${GCCDIR}/libbacktrace
 
+# for pretty-print.c
+.if ${CCVER:Mgcc80}
+CXXFLAGS+=     -Wno-narrowing
+.endif
+
 .for ofile in ${OBJS-libcommon}
 ${ofile}: ${ofile:.o=.c}
        ${CXX} ${STATIC_CXXFLAGS} ${CXXFLAGS} -c ${.IMPSRC} -o ${.TARGET}