convert HAVE_GCC == 7 to HAVE_GCC >= 7.

This commit is contained in:
mrg 2019-09-30 00:06:02 +00:00
parent 21303c93e9
commit 90bf43e918
7 changed files with 29 additions and 31 deletions

View File

@ -1,16 +1,9 @@
# $NetBSD: Makefile,v 1.23 2019/02/05 07:45:35 mrg Exp $
# $NetBSD: Makefile,v 1.24 2019/09/30 00:06:02 mrg Exp $
USE_SHLIBDIR=yes
.include <bsd.own.mk>
USE_FORT?= yes # network protocol library
CWARNFLAGS.clang+= -Wno-format-extra-args \
-Wno-unneeded-internal-declaration
.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
COPTS.gencode.c+= -Wno-error=implicit-fallthrough
.endif
CPPFLAGS+= -DPCAP_DONT_INCLUDE_PCAP_BPF_H -DHAVE_CONFIG_H -I${.OBJDIR}
.SUFFIXES: .3 .3pcap
@ -173,10 +166,15 @@ tokdefs.h: grammar.h
cp $? $@
CLEANFILES+= tokdefs.h scanner.h
COPTS.bpf_image.c = -Wno-format-nonliteral
.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
COPTS.pcap.c+= -Wno-error=format-truncation
COPTS.bpf_image.c+= -Wno-format-nonliteral
.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc"
COPTS.pcap.c+= -Wno-error=format-truncation
COPTS.gencode.c+= -Wno-error=implicit-fallthrough
.endif
CWARNFLAGS.clang+= -Wno-format-extra-args \
-Wno-unneeded-internal-declaration
.include <bsd.lib.mk>

View File

@ -1,11 +1,11 @@
# $NetBSD: copts.mk,v 1.3 2019/02/10 05:01:59 mrg Exp $
# $NetBSD: copts.mk,v 1.4 2019/09/30 00:06:02 mrg Exp $
# MI per-file compiler options required.
.ifndef _SYS_CONF_COPTS_MK_
_SYS_CONF_COPTS_MK_=1
.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
.if defined(HAVE_GCC) && ${HAVE_GCC} >= 7 && ${ACTIVE_CC} == "gcc"
COPTS.zlib.c+= -Wno-error=implicit-fallthrough
COPTS.pf.c+= -Wno-error=implicit-fallthrough
COPTS.radeon_cs.c+= -Wno-error=implicit-fallthrough

View File

@ -1,4 +1,4 @@
# $NetBSD: files.i915drmkms,v 1.37 2019/02/04 08:18:07 mrg Exp $
# $NetBSD: files.i915drmkms,v 1.38 2019/09/30 00:06:02 mrg Exp $
version 20180827
@ -24,9 +24,9 @@ makeoptions i915drmkms "CWARNFLAGS.i915_drv.c"+="${${ACTIVE_CC} == clang:? -Wn
makeoptions i915drmkms "CWARNFLAGS.intel_sprite.c"+="${${ACTIVE_CC} == gcc:? -Wno-maybe-uninitialized :}"
makeoptions i915drmkms "CWARNFLAGS.intel_ddi.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} == 7:? -Wno-error=implicit-fallthrough :}"
makeoptions i915drmkms "CWARNFLAGS.intel_display.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} == 7:? -Wno-error=implicit-fallthrough :}"
makeoptions i915drmkms "CWARNFLAGS.intel_sdvo.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} == 7:? -Wno-error=implicit-fallthrough :}"
makeoptions i915drmkms "CWARNFLAGS.intel_ddi.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} >= 7:? -Wno-error=implicit-fallthrough :}"
makeoptions i915drmkms "CWARNFLAGS.intel_display.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} >= 7:? -Wno-error=implicit-fallthrough :}"
makeoptions i915drmkms "CWARNFLAGS.intel_sdvo.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} >= 7:? -Wno-error=implicit-fallthrough :}"
file external/bsd/drm2/i915drm/i915_module.c i915drmkms
file external/bsd/drm2/i915drm/i915_pci.c i915drmkms

View File

@ -1,4 +1,4 @@
# $NetBSD: files.nouveau,v 1.27 2019/06/24 13:36:07 wiz Exp $
# $NetBSD: files.nouveau,v 1.28 2019/09/30 00:06:02 mrg Exp $
version 20180827
@ -28,9 +28,9 @@ makeoptions nouveau CPPFLAGS+="-DCONFIG_NOUVEAU_DEBUG_DEFAULT=3"
makeoptions nouveau "CWARNFLAGS.nouveau"+="-Wno-missing-field-initializers"
makeoptions nouveau "CWARNFLAGS.nouveau"+="-Wno-shadow"
makeoptions nouveau "CWARNFLAGS.nouveau"+="${${ACTIVE_CC} == clang:? -Wno-error=gnu-variable-sized-type-not-at-end :}"
makeoptions nouveau "CWARNFLAGS.nouveau"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} == 7:? -Wno-error=implicit-fallthrough :}"
makeoptions nouveau "CWARNFLAGS.nouveau_nvkm_subdev_bios_timing.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} == 7:? -Wno-error=int-in-bool-context :}"
makeoptions nouveau "CWARNFLAGS.nouveau_nvkm_subdev_clk_gt215.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} == 7:? -Wno-error=int-in-bool-context :}"
makeoptions nouveau "CWARNFLAGS.nouveau"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} >= 7:? -Wno-error=implicit-fallthrough :}"
makeoptions nouveau "CWARNFLAGS.nouveau_nvkm_subdev_bios_timing.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} >= 7:? -Wno-error=int-in-bool-context :}"
makeoptions nouveau "CWARNFLAGS.nouveau_nvkm_subdev_clk_gt215.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} >= 7:? -Wno-error=int-in-bool-context :}"
file external/bsd/drm2/nouveau/nouveau_module.c nouveau

View File

@ -1,4 +1,4 @@
# $NetBSD: files.radeon,v 1.26 2019/06/01 05:55:45 nakayama Exp $
# $NetBSD: files.radeon,v 1.27 2019/09/30 00:06:02 mrg Exp $
version 20180827
@ -25,10 +25,10 @@ makeoptions radeon "CWARNFLAGS.radeon"+="-Wno-unused-const-variable"
makeoptions radeon "CWARNFLAGS.radeon"+="${${ACTIVE_CC} == gcc:? -Wno-maybe-uninitialized :}"
#makeoptions i915drmkms "CWARNFLAGS.radeon_cs.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} == 7:? -Wno-error=implicit-fallthrough :}"
makeoptions i915drmkms "CWARNFLAGS.radeon_evergreen_cs.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} == 7:? -Wno-error=implicit-fallthrough :}"
makeoptions i915drmkms "CWARNFLAGS.radeon_r300.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} == 7:? -Wno-error=implicit-fallthrough :}"
makeoptions i915drmkms "CWARNFLAGS.radeon_r420.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} == 7:? -Wno-error=implicit-fallthrough :}"
#makeoptions i915drmkms "CWARNFLAGS.radeon_cs.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} >= 7:? -Wno-error=implicit-fallthrough :}"
makeoptions i915drmkms "CWARNFLAGS.radeon_evergreen_cs.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} >= 7:? -Wno-error=implicit-fallthrough :}"
makeoptions i915drmkms "CWARNFLAGS.radeon_r300.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} >= 7:? -Wno-error=implicit-fallthrough :}"
makeoptions i915drmkms "CWARNFLAGS.radeon_r420.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} >= 7:? -Wno-error=implicit-fallthrough :}"
file external/bsd/drm2/radeon/radeon_module.c radeon
file external/bsd/drm2/radeon/radeon_pci.c radeon

View File

@ -1,10 +1,10 @@
# $NetBSD: files.ttm,v 1.2 2019/02/04 08:18:08 mrg Exp $
# $NetBSD: files.ttm,v 1.3 2019/09/30 00:06:02 mrg Exp $
# TTM, the texture and tiling manager.
define drmkms_ttm: drmkms
makeoptions drmkms "CWARNFLAGS.ttm_bo.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} == 7:? -Wno-error=implicit-fallthrough :}"
makeoptions drmkms "CWARNFLAGS.ttm_bo.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} >= 7:? -Wno-error=implicit-fallthrough :}"
file external/bsd/drm2/ttm/ttm_agp_backend.c drmkms_ttm
file external/bsd/drm2/dist/drm/ttm/ttm_memory.c drmkms_ttm

View File

@ -1,4 +1,4 @@
# $NetBSD: files.ath_hal,v 1.7 2019/02/04 08:36:43 mrg Exp $
# $NetBSD: files.ath_hal,v 1.8 2019/09/30 00:06:02 mrg Exp $
defflag opt_athhal.h ATHHAL_ASSERT ATHHAL_DEBUG ATHHAL_DEBUG_ALQ
defflag opt_athhal.h ATHHAL_WRITE_EEPROM ATHHAL_WRITE_REGDOMAIN
@ -93,7 +93,7 @@ file external/isc/atheros_hal/dist/ar5212/ar5212_reset.c ath & athhal_ar5212_sub
file external/isc/atheros_hal/dist/ar5212/ar5212_rfgain.c ath & athhal_ar5212_subr
file external/isc/atheros_hal/dist/ar5212/ar5212_xmit.c ath & athhal_ar5212_subr
makeoptions ath "CWARNFLAGS.ar5212_xmit.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} == 7:? -Wno-error=implicit-fallthrough :}"
makeoptions ath "CWARNFLAGS.ar5212_xmit.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} >= 7:? -Wno-error=implicit-fallthrough :}"
# Atheros AR5312 family
#
@ -142,7 +142,7 @@ file external/isc/atheros_hal/dist/ar5416/ar9285.c ath & athhal_ar5416
file external/isc/atheros_hal/dist/ar5416/ar9285_attach.c ath & athhal_ar5416
file external/isc/atheros_hal/dist/ar5416/ar9285_reset.c ath & athhal_ar5416
makeoptions ath "CWARNFLAGS.ar5416_xmit.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} == 7:? -Wno-error=implicit-fallthrough :}"
makeoptions ath "CWARNFLAGS.ar5416_xmit.c"+="${${ACTIVE_CC} == gcc && ${HAVE_GCC:U0} >= 7:? -Wno-error=implicit-fallthrough :}"
#
#