Home | History | Annotate | Line # | Download | only in conf
      1  1.12     rin #	$NetBSD: copts.mk,v 1.12 2024/07/04 01:11:34 rin 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.10   lukem COPTS.pf.c+=		${CC_WNO_IMPLICIT_FALLTHROUGH}
     12  1.10   lukem COPTS.radeon_cs.c+=	${CC_WNO_IMPLICIT_FALLTHROUGH}
     13  1.10   lukem COPTS.via_dmablit.c+=	${CC_WNO_IMPLICIT_FALLTHROUGH}
     14   1.1     mrg 
     15   1.5     mrg .if defined(HAVE_GCC) && ${HAVE_GCC} >= 8 && ${ACTIVE_CC} == "gcc" && \
     16   1.5     mrg     (${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel")
     17   1.5     mrg COPTS.linux_machdep.c+=	-Wno-error=unused-but-set-variable
     18   1.5     mrg .endif
     19   1.5     mrg 
     20   1.6     mrg .if defined(HAVE_GCC) && ${HAVE_GCC} >= 10 && ${ACTIVE_CC} == "gcc"
     21   1.6     mrg COPTS.ath.c+=		-Wno-error=enum-conversion
     22   1.8   lukem COPTS.dpt.c+=		${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
     23   1.8   lukem COPTS.ffs_appleufs.c+=	${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
     24   1.7  rillig # These are wrong. The code explicitly avoids this case.
     25   1.9   lukem COPTS.in_pcb.c+=	${CC_WNO_RETURN_LOCAL_ADDR}
     26   1.9   lukem COPTS.in6_pcb.c+=	${CC_WNO_RETURN_LOCAL_ADDR}
     27   1.6     mrg # Also seems wrong.
     28   1.9   lukem COPTS.magma.c+=		${CC_WNO_MAYBE_UNINITIALIZED}
     29   1.6     mrg .endif
     30   1.6     mrg 
     31  1.11     mrg # Some of these indicate a potential GCC bug:
     32  1.11     mrg #   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110878
     33  1.11     mrg .if defined(HAVE_GCC) && ${HAVE_GCC} >= 12 && ${ACTIVE_CC} == "gcc" && \
     34  1.11     mrg     (${MACHINE_ARCH} == "aarch64" || ${MACHINE_ARCH} == "aarch64eb")
     35  1.11     mrg COPTS.aes_armv8.c+=	${CC_WNO_STRINGOP_OVERREAD} ${CC_WNO_STRINGOP_OVERFLOW}
     36  1.11     mrg COPTS.aes_neon.c+=	${CC_WNO_STRINGOP_OVERREAD} ${CC_WNO_STRINGOP_OVERFLOW} -flax-vector-conversions
     37  1.11     mrg COPTS.aes_neon_subr.c+=	${CC_WNO_ARRAY_BOUNDS} -flax-vector-conversions
     38  1.11     mrg COPTS.chacha_neon.c+=	-flax-vector-conversions
     39  1.11     mrg .endif
     40  1.11     mrg 
     41  1.11     mrg .if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386"
     42  1.11     mrg COPTS.aes_ni.c+=	${CC_WNO_STRINGOP_OVERREAD} ${CC_WNO_STRINGOP_OVERFLOW}
     43  1.11     mrg COPTS.aes_sse2_subr.c+=	${CC_WNO_ARRAY_BOUNDS}
     44  1.11     mrg COPTS.aes_ssse3_subr.c+=${CC_WNO_ARRAY_BOUNDS}
     45  1.11     mrg COPTS.aes_via.c+=	${CC_WNO_ARRAY_BOUNDS}
     46  1.11     mrg .endif
     47  1.11     mrg 
     48   1.1     mrg .endif
     49