Home | History | Annotate | Line # | Download | only in conf
copts.mk revision 1.9
      1  1.9   lukem #	$NetBSD: copts.mk,v 1.9 2023/06/03 09:09:13 lukem Exp $
      2  1.1     mrg 
      3  1.1     mrg # MI per-file compiler options required.
      4  1.1     mrg 
      5  1.6     mrg # Use -Wno-error=foo when the ultimate goal is to fix this warning
      6  1.6     mrg # with code change, and use -Wno-foo when the warning is bad.
      7  1.6     mrg 
      8  1.1     mrg .ifndef _SYS_CONF_COPTS_MK_
      9  1.1     mrg _SYS_CONF_COPTS_MK_=1
     10  1.1     mrg 
     11  1.4     mrg .if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc"
     12  1.3     mrg COPTS.zlib.c+=		-Wno-error=implicit-fallthrough
     13  1.3     mrg COPTS.pf.c+=		-Wno-error=implicit-fallthrough
     14  1.3     mrg COPTS.radeon_cs.c+=	-Wno-error=implicit-fallthrough
     15  1.3     mrg COPTS.via_dmablit.c+=	-Wno-error=implicit-fallthrough
     16  1.2     mrg .endif
     17  1.1     mrg 
     18  1.5     mrg .if defined(HAVE_GCC) && ${HAVE_GCC} >= 8 && ${ACTIVE_CC} == "gcc" && \
     19  1.5     mrg     (${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel")
     20  1.5     mrg COPTS.linux_machdep.c+=	-Wno-error=unused-but-set-variable
     21  1.5     mrg .endif
     22  1.5     mrg 
     23  1.6     mrg .if defined(HAVE_GCC) && ${HAVE_GCC} >= 10 && ${ACTIVE_CC} == "gcc"
     24  1.6     mrg COPTS.ath.c+=		-Wno-error=enum-conversion
     25  1.8   lukem COPTS.dpt.c+=		${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
     26  1.8   lukem COPTS.ffs_appleufs.c+=	${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
     27  1.7  rillig # These are wrong. The code explicitly avoids this case.
     28  1.9   lukem COPTS.in_pcb.c+=	${CC_WNO_RETURN_LOCAL_ADDR}
     29  1.9   lukem COPTS.in6_pcb.c+=	${CC_WNO_RETURN_LOCAL_ADDR}
     30  1.6     mrg # Also seems wrong.
     31  1.9   lukem COPTS.magma.c+=		${CC_WNO_MAYBE_UNINITIALIZED}
     32  1.6     mrg .endif
     33  1.6     mrg 
     34  1.1     mrg .endif
     35