Skip to content

Commit

Permalink
remove all the code that supported HAVE_GCC=3. mostly from chuq.
Browse files Browse the repository at this point in the history
  • Loading branch information
mrg committed Jun 20, 2011
1 parent cf5274f commit 4b45f08
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 42 deletions.
10 changes: 4 additions & 6 deletions Makefile
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.283 2011/06/15 09:45:58 mrg Exp $
# $NetBSD: Makefile,v 1.284 2011/06/20 06:52:36 mrg Exp $

#
# This is the top-level makefile for building NetBSD. For an outline of
Expand Down Expand Up @@ -199,10 +199,10 @@ postinstall-fix-obsolete: .NOTMAIN .PHONY
# Targets (in order!) called by "make build".
#
.if defined(HAVE_GCC)
.if ${HAVE_GCC} == "3"
LIBGCC_EXT=3
.else
.if ${HAVE_GCC} == "4"
LIBGCC_EXT=4
.else
LIBGCC_EXT=45
.endif
.endif

Expand Down Expand Up @@ -444,9 +444,7 @@ do-libgcc: .PHONY .MAKE
.if defined(HAVE_GCC)
.if ${MKGCC} != "no"
.if ${USE_COMPILERCRTSTUFF} == "yes"
.if (${HAVE_GCC} == "3" || ${HAVE_GCC} == "4")
${MAKEDIRTARGET} . do-gnu-lib-crtstuff${LIBGCC_EXT}
.endif
.endif
${MAKEDIRTARGET} . do-gnu-lib-libgcc${LIBGCC_EXT}
.endif
Expand Down
4 changes: 2 additions & 2 deletions lib/csu/common_elf/Makefile.inc
@@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.32 2009/12/13 08:52:38 mrg Exp $
# $NetBSD: Makefile.inc,v 1.33 2011/06/20 06:52:36 mrg Exp $

.if !defined(ELFSIZE)
ELFSIZE=32
Expand All @@ -14,7 +14,7 @@ CPPFLAGS+= -DDWARF2_EH
CPPFLAGS+= -DJCR
CPPFLAGS+= -DDSO_HANDLE

.if defined(HAVE_GCC) && ${HAVE_GCC} > 3
.if defined(HAVE_GCC)
CFLAGS+= -fno-unit-at-a-time
.endif

Expand Down
4 changes: 2 additions & 2 deletions lib/i18n_module/UTF7/Makefile
@@ -1,8 +1,8 @@
# $NetBSD: Makefile,v 1.3 2008/08/29 00:02:22 gmcgarry Exp $
# $NetBSD: Makefile,v 1.4 2011/06/20 06:52:36 mrg Exp $

SRCPRE=citrus_
.include <bsd.lib.mk>

.if ${MACHINE_ARCH} == "vax" && defined(HAVE_GCC) && ${HAVE_GCC} > 3
.if ${MACHINE_ARCH} == "vax" && defined(HAVE_GCC)
COPTS.citrus_utf7.c+= -O0
.endif
4 changes: 2 additions & 2 deletions lib/libbz2/Makefile
@@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.14 2008/08/29 00:02:22 gmcgarry Exp $
# $NetBSD: Makefile,v 1.15 2011/06/20 06:52:37 mrg Exp $

USE_FORT?= yes # data driven bugs?

Expand All @@ -22,7 +22,7 @@ COPTS+= -O0

# XXX blocksort.c gets mis-compiled with 4.1
.if (${MACHINE_ARCH} == "sh3el" || ${MACHINE_ARCH} == "sh3eb") && \
(defined(HAVE_GCC) && ${HAVE_GCC} == 4)
defined(HAVE_GCC)
COPTS.blocksort.c+= -fno-loop-optimize
.endif

Expand Down
6 changes: 3 additions & 3 deletions share/mk/bsd.own.mk
@@ -1,4 +1,4 @@
# $NetBSD: bsd.own.mk,v 1.670 2011/06/15 09:45:59 mrg Exp $
# $NetBSD: bsd.own.mk,v 1.671 2011/06/20 06:52:37 mrg Exp $

# This needs to be before bsd.init.mk
.if defined(BSD_MK_COMPAT_FILE)
Expand Down Expand Up @@ -46,7 +46,7 @@ NEED_OWN_INSTALL_TARGET?= yes
#
TOOLCHAIN_MISSING?= no

# default to GCC4
# default to GCC4.1
.if !defined(HAVE_GCC) && !defined(HAVE_PCC)
HAVE_GCC= 4
.endif
Expand Down Expand Up @@ -574,7 +574,7 @@ NOPIC= # defined
MKISCSI= no
# XXX GCC 4 outputs mcount() calling sequences that try to load values
# from over 64KB away and this fails to assemble.
.if defined(HAVE_GCC) && (${HAVE_GCC} == 4)
.if defined(HAVE_GCC)
NOPROFILE= # defined
.endif
.endif
Expand Down
6 changes: 3 additions & 3 deletions share/mk/bsd.sys.mk
@@ -1,4 +1,4 @@
# $NetBSD: bsd.sys.mk,v 1.203 2011/05/30 13:56:34 joerg Exp $
# $NetBSD: bsd.sys.mk,v 1.204 2011/06/20 06:52:37 mrg Exp $
#
# Build definitions used for NetBSD source tree builds.

Expand All @@ -13,7 +13,7 @@ CPPFLAGS+= -Wp,-iremap,${DESTDIR}/:/
# Enable c99 mode by default.
# This has the side effect of complaining for missing prototypes
# implicit type declarations and missing return statements.
.if defined(HAVE_GCC) && ${HAVE_GCC} >= 3
.if defined(HAVE_GCC)
CFLAGS+= -std=gnu99
.endif

Expand Down Expand Up @@ -56,7 +56,7 @@ CXXFLAGS+= -Wctor-dtor-privacy -Wnon-virtual-dtor -Wreorder \
-Wno-deprecated -Woverloaded-virtual -Wsign-promo -Wsynth
CXXFLAGS+= ${${ACTIVE_CXX} == "gcc":? -Wno-non-template-friend -Wno-pmf-conversions :}
.endif
.if ${WARNS} > 3 && defined(HAVE_GCC) && ${HAVE_GCC} >= 3
.if ${WARNS} > 3 && defined(HAVE_GCC)
CFLAGS+= -Wsign-compare
CFLAGS+= ${${ACTIVE_CC} == "clang":? -Wpointer-sign :}
.endif
Expand Down
4 changes: 1 addition & 3 deletions sys/arch/hp700/stand/Makefile.inc
@@ -1,10 +1,8 @@
# $NetBSD: Makefile.inc,v 1.7 2006/06/27 06:37:26 he Exp $
# $NetBSD: Makefile.inc,v 1.8 2011/06/20 06:52:37 mrg Exp $

BINDIR= /usr/mdec

.include <bsd.own.mk>

.if ${HAVE_GCC} > 3
COPTS+= -Wno-pointer-sign
.endif
COPTS+= -fno-strict-aliasing
6 changes: 1 addition & 5 deletions sys/arch/i386/stand/Makefile.booters
@@ -1,4 +1,4 @@
# $NetBSD: Makefile.booters,v 1.84 2011/06/16 16:39:53 joerg Exp $
# $NetBSD: Makefile.booters,v 1.85 2011/06/20 06:52:37 mrg Exp $

.include <bsd.own.mk>

Expand All @@ -16,13 +16,9 @@ LIBC= # nothing
.if ${MACHINE_ARCH} == "x86_64"
CPUFLAGS= -m32
.else
.if ${HAVE_GCC} == 3
CPUFLAGS= -mcpu=i386
.else
CPUFLAGS= -march=i386 -mtune=i386
.endif
.endif
.endif
COPTS= ${OPT_SIZE.${ACTIVE_CC}}

I386_STAND_DIR?= $S/arch/i386/stand
Expand Down
6 changes: 1 addition & 5 deletions sys/arch/i386/stand/boot/Makefile.boot
@@ -1,4 +1,4 @@
# $NetBSD: Makefile.boot,v 1.52 2011/06/02 18:48:55 dsl Exp $
# $NetBSD: Makefile.boot,v 1.53 2011/06/20 06:52:37 mrg Exp $

S= ${.CURDIR}/../../../../..

Expand Down Expand Up @@ -47,13 +47,9 @@ CPUFLAGS= -m32
LIBKERN_ARCH=i386
KERNMISCMAKEFLAGS="LIBKERN_ARCH=i386"
.else
.if ${HAVE_GCC} == 3
CPUFLAGS= -mcpu=i386
.else
CPUFLAGS= -march=i386 -mtune=i386
.endif
.endif
.endif

COPTS+= -ffreestanding
CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes
Expand Down
6 changes: 1 addition & 5 deletions sys/arch/i386/stand/bootxx/Makefile.bootxx
@@ -1,4 +1,4 @@
# $NetBSD: Makefile.bootxx,v 1.41 2011/06/16 16:39:53 joerg Exp $
# $NetBSD: Makefile.bootxx,v 1.42 2011/06/20 06:52:38 mrg Exp $

S= ${.CURDIR}/../../../../..

Expand Down Expand Up @@ -68,13 +68,9 @@ LIBKERN_ARCH=i386
KERNMISCMAKEFLAGS="LIBKERN_ARCH=i386"
.else
CPPFLAGS+= -DEPIA_HACK
.if ${HAVE_GCC} == 3
CPUFLAGS= -mcpu=i386
.else
CPUFLAGS= -march=i386 -mtune=i386
.endif
.endif
.endif

CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes
CPPFLAGS+= -nostdinc -D_STANDALONE
Expand Down
11 changes: 5 additions & 6 deletions sys/conf/Makefile.kern.inc
@@ -1,4 +1,4 @@
# $NetBSD: Makefile.kern.inc,v 1.139 2011/06/17 21:19:42 matt Exp $
# $NetBSD: Makefile.kern.inc,v 1.140 2011/06/20 06:52:38 mrg Exp $
#
# This file contains common `MI' targets and definitions and it is included
# at the bottom of each `MD' ${MACHINE}/conf/Makefile.${MACHINE}.
Expand Down Expand Up @@ -68,7 +68,7 @@ CWARNFLAGS+= -Wmissing-prototypes -Wstrict-prototypes
CWARNFLAGS+= -Wswitch -Wshadow
CWARNFLAGS+= -Wcast-qual -Wwrite-strings
CWARNFLAGS+= -Wno-unreachable-code
. if (defined(HAVE_GCC) && ${HAVE_GCC} > 3) || defined(HAVE_PCC)
. if defined(HAVE_GCC) || defined(HAVE_PCC)
CWARNFLAGS+= -Wno-pointer-sign -Wno-attributes
. if ${MACHINE} == "i386" || ${MACHINE_ARCH} == "x86_64" || \
${MACHINE_ARCH} == "sparc64" || ${MACHINE} == "prep"
Expand All @@ -88,7 +88,7 @@ CFLAGS+= ${DEBUG} ${COPTS}
AFLAGS+= -D_LOCORE -Wa,--fatal-warnings

# XXX
.if defined(HAVE_GCC) && ${HAVE_GCC} > 3
.if defined(HAVE_GCC)
CFLAGS+= -fno-strict-aliasing
.endif

Expand All @@ -99,8 +99,7 @@ COPTS.kern_ssp.c+= -fno-stack-protector -D__SSP__
# If we want the bpendtsleep: label in kern_synch.c, we need to use
# -fno-reorder-blocks. Don't make this a config(1) defflag without
# making sure this fragment remains valid.
.if defined(HAVE_GCC) && ${HAVE_GCC} > 3 && \
!empty(${CFLAGS:M-DKERN_SYNCH_BPENDTSLEEP_LABEL})
.if defined(HAVE_GCC) && !empty(${CFLAGS:M-DKERN_SYNCH_BPENDTSLEEP_LABEL})
COPTS.kern_synch.c+= -fno-reorder-blocks
.endif

Expand Down Expand Up @@ -511,7 +510,7 @@ VARSTACK=kern/uipc_socket.c miscfs/genfs/genfs_vnops.c \
uvm/uvm_pager.c dev/ic/aic7xxx.c dev/ic/aic79xx.c arch/xen/i386/gdt.c \
dev/ofw/ofw_subr.c

. if (defined(HAVE_GCC) && ${HAVE_GCC} > 3) || defined(HAVE_PCC)
. if defined(HAVE_GCC) || defined(HAVE_PCC)
.for __varstack in ${VARSTACK}
COPTS.${__varstack:T} += -Wno-stack-protector
.endfor
Expand Down

0 comments on commit 4b45f08

Please sign in to comment.