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