From d90d800531950cd3da522dc0c51e510476a9cada Mon Sep 17 00:00:00 2001 From: Sascha Wildner Date: Sat, 12 Aug 2006 05:42:26 +0000 Subject: [PATCH] * Remove bsd.cpu.gcc2.mk and bsd.cpu.gcc3.mk since those GCC versions have been removed from the system. * Remove handling of $CCVER values "gcc2" and "gcc3". The gcc2 override in src/Makefile is not changed. * In bsd.README, add some descriptions and missing files. * In boot2, remove the __USING_MRTD__ handling because it is no longer needed. Based-on-patch-by: Trevor Kendall --- etc/Makefile | 3 +- share/mk/Makefile | 5 +- share/mk/bsd.README | 12 +-- share/mk/bsd.cpu.gcc2.mk | 118 ---------------------------- share/mk/bsd.cpu.gcc3.mk | 146 ----------------------------------- share/mk/bsd.cpu.mk | 8 +- share/mk/bsd.sys.mk | 10 +-- sys/boot/i386/boot2/Makefile | 28 ++----- sys/boot/i386/boot2/sio.S | 9 +-- sys/boot/pc32/boot2/Makefile | 28 ++----- sys/boot/pc32/boot2/sio.S | 9 +-- 11 files changed, 31 insertions(+), 345 deletions(-) delete mode 100644 share/mk/bsd.cpu.gcc2.mk delete mode 100644 share/mk/bsd.cpu.gcc3.mk diff --git a/etc/Makefile b/etc/Makefile index c489e0aaae..dc4a28e2f5 100644 --- a/etc/Makefile +++ b/etc/Makefile @@ -1,6 +1,6 @@ # from: @(#)Makefile 5.11 (Berkeley) 5/21/91 # $FreeBSD: src/etc/Makefile,v 1.219.2.38 2003/03/04 09:49:00 ru Exp $ -# $DragonFly: src/etc/Makefile,v 1.123 2006/08/12 05:30:17 swildner Exp $ +# $DragonFly: src/etc/Makefile,v 1.124 2006/08/12 05:42:26 swildner Exp $ .if !defined(NO_SENDMAIL) SUBDIR= sendmail @@ -432,6 +432,7 @@ upgrade_etc: preupgrade rm -rf ${DESTDIR}/usr/share/doc/ncurses csh -c "rm -f ${DESTDIR}/usr/share/man/{man,cat}4/brconfig.8.gz" rm -f ${DESTDIR}/sbin/brconfig + rm -f ${DESTDIR}/usr/share/mk/bsd.cpu.gcc[23].mk ldconfig -R .if !defined(BINARY_UPGRADE) # binary upgrade just copies these nodes .if !defined(NO_MAKEDEV) diff --git a/share/mk/Makefile b/share/mk/Makefile index 53980e9302..1f0a9ef190 100644 --- a/share/mk/Makefile +++ b/share/mk/Makefile @@ -1,10 +1,9 @@ # $FreeBSD: src/share/mk/Makefile,v 1.27.2.8 2002/07/22 14:21:51 ru Exp $ -# $DragonFly: src/share/mk/Makefile,v 1.14 2006/06/28 21:37:37 swildner Exp $ +# $DragonFly: src/share/mk/Makefile,v 1.15 2006/08/12 05:42:26 swildner Exp $ # @(#)Makefile 8.1 (Berkeley) 6/8/93 FILES= bsd.README -FILES+= bsd.cpu.mk bsd.cpu.gcc2.mk bsd.cpu.gcc3.mk bsd.cpu.gcc34.mk -FILES+= bsd.cpu.gcc40.mk +FILES+= bsd.cpu.mk bsd.cpu.gcc34.mk bsd.cpu.gcc40.mk FILES+= bsd.dep.mk bsd.doc.mk bsd.files.mk bsd.patch.mk FILES+= bsd.incs.mk bsd.info.mk bsd.init.mk FILES+= bsd.kmod.mk bsd.hostlib.mk diff --git a/share/mk/bsd.README b/share/mk/bsd.README index 36590eec2f..afd99237b6 100644 --- a/share/mk/bsd.README +++ b/share/mk/bsd.README @@ -1,6 +1,6 @@ # @(#)bsd.README 8.2 (Berkeley) 4/2/94 # $FreeBSD: src/share/mk/bsd.README,v 1.15.2.6 2002/07/19 08:34:07 ru Exp $ -# $DragonFly: src/share/mk/bsd.README,v 1.4 2006/06/28 21:37:37 swildner Exp $ +# $DragonFly: src/share/mk/bsd.README,v 1.5 2006/08/12 05:42:26 swildner Exp $ XXX This document is seriously out of date, it is currenly being revised. @@ -8,13 +8,13 @@ This is the README file for the new make "include" files for the BSD source tree. The files are installed in /usr/share/mk, and are, by convention, named with the suffix ".mk". -bsd.cpu.gcc2.mk - -bsd.cpu.gcc3.mk - -bsd.cpu.gcc34.mk - -bsd.cpu.mk - +bsd.cpu.gcc34.mk - handle GCC 3.4 specific CPU flags & variables +bsd.cpu.gcc40.mk - handle GCC 4.0 specific CPU flags & variables +bsd.cpu.mk - handle CPU flags & variables bsd.dep.mk - handle Makefile dependencies bsd.doc.mk - building troff system documents bsd.files.mk - +bsd.hostlib.mk - bsd.hostprog.mk - bsd.incs.mk - bsd.info.mk - building GNU Info hypertext system @@ -24,8 +24,10 @@ bsd.lib.mk - support for building libraries bsd.libnames.mk - define library names bsd.links.mk - bsd.man.mk - installing manual pages and their links +bsd.nls.mk - bsd.obj.mk - creating 'obj' directories and cleaning up bsd.own.mk - define common variables +bsd.patch.mk - bsd.prog.mk - building programs from source files bsd.subdir.mk - targets for building subdirectories bsd.sys.mk - diff --git a/share/mk/bsd.cpu.gcc2.mk b/share/mk/bsd.cpu.gcc2.mk deleted file mode 100644 index 5bcee2684d..0000000000 --- a/share/mk/bsd.cpu.gcc2.mk +++ /dev/null @@ -1,118 +0,0 @@ -# $FreeBSD: src/share/mk/bsd.cpu.mk,v 1.2.2.5 2002/07/19 08:09:32 ru Exp $ -# $DragonFly: src/share/mk/Attic/bsd.cpu.gcc2.mk,v 1.4 2004/06/20 00:43:28 joerg Exp $ - -# Set default baseline values of CPUTYPE based on MACHINE_ARCH -- this is -# the minimum CPU type we support for each architecture - -_CPUCFLAGS = -.if ${MACHINE_ARCH} == "i386" -CPUTYPE ?= i386 -.elif ${MACHINE_ARCH} == "alpha" -CPUTYPE ?= ev4 -.endif - -# Handle aliases (not documented in make.conf to avoid user confusion -# between e.g. i586 and pentium) - -.if ${MACHINE_ARCH} == "i386" -. if ${CPUTYPE} == "pentiumpro" -CPUTYPE = i686 -. elif ${CPUTYPE} == "pentium" -CPUTYPE = i586 -. elif ${CPUTYPE} == "athlon" || ${CPUTYPE} == "k8" || ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || ${CPUTYPE} == "athlon-fx" -CPUTYPE = k7 -. endif -.endif - -# Logic to set up correct gcc optimization flag. This must be included -# after /etc/make.conf so it can react to the local value of CPUTYPE -# defined therein. - -.if !defined(NO_CPU_CFLAGS) || !defined(NO_CPU_COPTFLAGS) -. if ${MACHINE_ARCH} == "i386" -. if ${CPUTYPE} == "k7" -_CPUCFLAGS = -march=k6 # gcc doesn't support athlon yet, but it will -. elif ${CPUTYPE} == "k6-2" -_CPUCFLAGS = -march=k6 -. elif ${CPUTYPE} == "k6" -_CPUCFLAGS = -march=k6 -. elif ${CPUTYPE} == "k5" -_CPUCFLAGS = -march=pentium -. elif ${CPUTYPE} == "p4" -_CPUCFLAGS = -march=pentiumpro -. elif ${CPUTYPE} == "p3" -_CPUCFLAGS = -march=pentiumpro -. elif ${CPUTYPE} == "p2" -_CPUCFLAGS = -march=pentiumpro -. elif ${CPUTYPE} == "i686" -_CPUCFLAGS = -march=pentiumpro -. elif ${CPUTYPE} == "i586/mmx" -_CPUCFLAGS = -march=pentium -. elif ${CPUTYPE} == "i586" -_CPUCFLAGS = -march=pentium -. elif ${CPUTYPE} == "i486" -_CPUCFLAGS = -march=i486 -. endif -. elif ${MACHINE_ARCH} == "alpha" -. if ${CPUTYPE} == "ev6" -_CPUCFLAGS = -mcpu=ev6 -. elif ${CPUTYPE} == "pca56" -_CPUCFLAGS = -mcpu=pca56 -. elif ${CPUTYPE} == "ev56" -_CPUCFLAGS = -mcpu=ev56 -. elif ${CPUTYPE} == "ev5" -_CPUCFLAGS = -mcpu=ev5 -. elif ${CPUTYPE} == "ev45" -_CPUCFLAGS = -mcpu=ev4 # No -mcpu=ev45 for gcc -. elif ${CPUTYPE} == "ev4" -_CPUCFLAGS = -mcpu=ev4 -. endif -. endif -.endif - -# Set up the list of CPU features based on the CPU type. This is an -# unordered list to make it easy for client makefiles to test for the -# presence of a CPU feature. - -.if ${MACHINE_ARCH} == "i386" -. if ${CPUTYPE} == "k7" -MACHINE_CPU = k7 3dnow mmx k6 k5 i586 i486 i386 -. elif ${CPUTYPE} == "k6-2" -MACHINE_CPU = 3dnow mmx k6 k5 i586 i486 i386 -. elif ${CPUTYPE} == "k6" -MACHINE_CPU = mmx k6 k5 i586 i486 i386 -. elif ${CPUTYPE} == "k5" -MACHINE_CPU = k5 i586 i486 i386 -. elif ${CPUTYPE} == "p4" -MACHINE_CPU = sse i686 mmx i586 i486 i386 -. elif ${CPUTYPE} == "p3" -MACHINE_CPU = sse i686 mmx i586 i486 i386 -. elif ${CPUTYPE} == "p2" -MACHINE_CPU = i686 mmx i586 i486 i386 -. elif ${CPUTYPE} == "i686" -MACHINE_CPU = i686 i586 i486 i386 -. elif ${CPUTYPE} == "i586/mmx" -MACHINE_CPU = mmx i586 i486 i386 -. elif ${CPUTYPE} == "i586" -MACHINE_CPU = i586 i486 i386 -. elif ${CPUTYPE} == "i486" -MACHINE_CPU = i486 i386 -. elif ${CPUTYPE} == "i386" -MACHINE_CPU = i386 -. endif -.elif ${MACHINE_ARCH} == "alpha" -. if ${CPUTYPE} == "ev6" -MACHINE_CPU = ev6 ev56 pca56 ev5 ev45 ev4 -. elif ${CPUTYPE} == "pca56" -MACHINE_CPU = pca56 ev56 ev5 ev45 ev4 -. elif ${CPUTYPE} == "ev56" -MACHINE_CPU = ev56 ev5 ev45 ev4 -. elif ${CPUTYPE} == "ev5" -MACHINE_CPU = ev5 ev45 ev4 -. elif ${CPUTYPE} == "ev45" -MACHINE_CPU = ev45 ev4 -. elif ${CPUTYPE} == "ev4" -MACHINE_CPU = ev4 -. endif -.endif - diff --git a/share/mk/bsd.cpu.gcc3.mk b/share/mk/bsd.cpu.gcc3.mk deleted file mode 100644 index 7e25597a52..0000000000 --- a/share/mk/bsd.cpu.gcc3.mk +++ /dev/null @@ -1,146 +0,0 @@ -# $FreeBSD: src/share/mk/bsd.cpu.v, 1.30 2004/01/10 18:01:08 ru Exp $ -# $DragonFly: src/share/mk/Attic/bsd.cpu.gcc3.mk,v 1.3 2004/06/15 07:53:32 joerg Exp $ - -# Set default CPU compile flags and baseline CPUTYPE for each arch. The -# compile flags must support the minimum CPU type for each architecture but -# may tune support for more advanced processors. - -.if !defined(CPUTYPE) || empty(CPUTYPE) -. if ${MACHINE_ARCH} == "i386" -_CPUCFLAGS = -mcpu=pentiumpro -MACHINE_CPU = i486 -. elif ${MACHINE_ARCH} == "alpha" -_CPUCFLAGS = -mcpu=ev4 -mtune=ev5 -MACHINE_CPU = ev4 -.elif ${MACHINE_ARCH} == "amd64" -MACHINE_CPU = amd64 sse2 sse -. elif ${MACHINE_ARCH} == "ia64" -_CPUCFLAGS = -MACHINE_CPU = itanium -. elif ${MACHINE_ARCH} == "sparc64" -_CPUCFLAGS = -. endif -.else - -# Handle aliases (not documented in make.conf to avoid user confusion -# between e.g. i586 and pentium) - -. if ${MACHINE_ARCH} == "i386" -. if ${CPUTYPE} == "pentiumpro" -CPUTYPE = i686 -. elif ${CPUTYPE} == "pentium" -CPUTYPE = i586 -. elif ${CPUTYPE} == "k7" -CPUTYPE = athlon -. endif -. endif - -# Logic to set up correct gcc optimization flag. This must be included -# after /etc/make.conf so it can react to the local value of CPUTYPE -# defined therein. Consult: -# http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86-64-Options.html -# http://gcc.gnu.org/onlinedocs/gcc/DEC-Alpha-Options.html -# http://gcc.gnu.org/onlinedocs/gcc/SPARC-Options.html -# http://gcc.gnu.org/onlinedocs/gcc/RS-6000-and-PowerPC-Options.html - -. if ${MACHINE_ARCH} == "i386" -. if ${CPUTYPE} == "k8" || ${CPUTYPE} == "opteron" || ${CPUTYPE} == "athlon64" || ${CPUTYPE} == "athlon-fx" -_CPUCFLAGS = -march=athlon -. elif ${CPUTYPE} == "athlon-mp" || ${CPUTYPE} == "athlon-xp" || ${CPUTYPE} == "athlon-4" || ${CPUTYPE} == "athlon-tbird" || ${CPUTYPE} == "athlon" -_CPUCFLAGS = -march=${CPUTYPE} -. elif ${CPUTYPE} == "k6-3" || ${CPUTYPE} == "k6-2" || ${CPUTYPE} == "k6" -_CPUCFLAGS = -march=${CPUTYPE} -. elif ${CPUTYPE} == "k5" -_CPUCFLAGS = -march=pentium -. elif ${CPUTYPE} == "p4" -_CPUCFLAGS = -march=pentium4 -. elif ${CPUTYPE} == "p3" -_CPUCFLAGS = -march=pentium3 -. elif ${CPUTYPE} == "p2" -_CPUCFLAGS = -march=pentium2 -. elif ${CPUTYPE} == "i686" -_CPUCFLAGS = -march=pentiumpro -. elif ${CPUTYPE} == "i586/mmx" -_CPUCFLAGS = -march=pentium-mmx -. elif ${CPUTYPE} == "i586" -_CPUCFLAGS = -march=pentium -. elif ${CPUTYPE} == "i486" -_CPUCFLAGS = -march=i486 -. endif -. elif ${MACHINE_ARCH} == "alpha" -. if ${CPUTYPE} == "ev67" -_CPUCFLAGS = -mcpu=ev67 -. elif ${CPUTYPE} == "ev6" -_CPUCFLAGS = -mcpu=ev6 -. elif ${CPUTYPE} == "pca56" -_CPUCFLAGS = -mcpu=pca56 -. elif ${CPUTYPE} == "ev56" -_CPUCFLAGS = -mcpu=ev56 -. elif ${CPUTYPE} == "ev5" -_CPUCFLAGS = -mcpu=ev5 -. elif ${CPUTYPE} == "ev45" -_CPUCFLAGS = -mcpu=ev45 -. elif ${CPUTYPE} == "ev4" -_CPUCFLAGS = -mcpu=ev4 -. endif -. endif - -# Set up the list of CPU features based on the CPU type. This is an -# unordered list to make it easy for client makefiles to test for the -# presence of a CPU feature. - -.if ${MACHINE_ARCH} == "i386" -. if ${CPUTYPE} == "athlon-mp" || ${CPUTYPE} == "athlon-xp" || ${CPUTYPE} == "athlon-4" -MACHINE_CPU = athlon-xp k7 3dnow sse mmx k6 k5 i586 i486 i386 -. elif ${CPUTYPE} == "athlon" || ${CPUTYPE} == "athlon-tbird" -MACHINE_CPU = athlon k7 3dnow mmx k6 k5 i586 i486 i386 -. elif ${CPUTYPE} == "k6-3" || ${CPUTYPE} == "k6-2" -MACHINE_CPU = 3dnow mmx k6 k5 i586 i486 i386 -. elif ${CPUTYPE} == "k6" -MACHINE_CPU = mmx k6 k5 i586 i486 i386 -. elif ${CPUTYPE} == "k5" -MACHINE_CPU = k5 i586 i486 i386 -. elif ${CPUTYPE} == "p4" -MACHINE_CPU = sse2 sse i686 mmx i586 i486 i386 -. elif ${CPUTYPE} == "p3" -MACHINE_CPU = sse i686 mmx i586 i486 i386 -. elif ${CPUTYPE} == "p2" -MACHINE_CPU = i686 mmx i586 i486 i386 -. elif ${CPUTYPE} == "i686" -MACHINE_CPU = i686 i586 i486 i386 -. elif ${CPUTYPE} == "i586/mmx" -MACHINE_CPU = mmx i586 i486 i386 -. elif ${CPUTYPE} == "i586" -MACHINE_CPU = i586 i486 i386 -. elif ${CPUTYPE} == "i486" -MACHINE_CPU = i486 i386 -. elif ${CPUTYPE} == "i386" -MACHINE_CPU = i386 -. endif -. elif ${MACHINE_ARCH} == "alpha" -. if ${CPUTYPE} == "ev6" -MACHINE_CPU = ev6 ev56 pca56 ev5 ev45 ev4 -. elif ${CPUTYPE} == "pca56" -MACHINE_CPU = pca56 ev56 ev5 ev45 ev4 -. elif ${CPUTYPE} == "ev56" -MACHINE_CPU = ev56 ev5 ev45 ev4 -. elif ${CPUTYPE} == "ev5" -MACHINE_CPU = ev5 ev45 ev4 -. elif ${CPUTYPE} == "ev45" -MACHINE_CPU = ev45 ev4 -. elif ${CPUTYPE} == "ev4" -MACHINE_CPU = ev4 -. endif -. elif ${MACHINE_ARCH} == "amd64" -MACHINE_CPU = amd64 sse2 sse -. elif ${MACHINE_ARCH} == "ia64" -. if ${CPUTYPE} == "itanium" -MACHINE_CPU = itanium -. endif -. endif -.endif - -.if ${MACHINE_ARCH} == "alpha" -_CPUCFLAGS += -mieee -.endif - diff --git a/share/mk/bsd.cpu.mk b/share/mk/bsd.cpu.mk index 297eb8d429..c2932a6ab3 100644 --- a/share/mk/bsd.cpu.mk +++ b/share/mk/bsd.cpu.mk @@ -1,5 +1,5 @@ # $FreeBSD: src/share/mk/bsd.cpu.mk,v 1.2.2.5 2002/07/19 08:09:32 ru Exp $ -# $DragonFly: src/share/mk/bsd.cpu.mk,v 1.11 2005/06/05 22:43:19 corecode Exp $ +# $DragonFly: src/share/mk/bsd.cpu.mk,v 1.12 2006/08/12 05:42:26 swildner Exp $ # include compiler-specific bsd.cpu.mk. Note that CCVER may or may not # be passed as an environment variable. If not set we make it consistent @@ -16,11 +16,7 @@ CCVER ?= gcc34 _CCVER := ${CCVER} HOST_CCVER?= ${_CCVER} -.if ${CCVER} == "gcc2" -. include -.elif ${CCVER} == "gcc3" -. include -.elif ${CCVER} == "gcc34" +.if ${CCVER} == "gcc34" . include .elif ${CCVER} == "gcc40" . include diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk index cafa431bd5..342cd68241 100644 --- a/share/mk/bsd.sys.mk +++ b/share/mk/bsd.sys.mk @@ -1,5 +1,5 @@ # $FreeBSD: src/share/mk/bsd.sys.mk,v 1.3.2.5 2002/07/03 16:59:14 des Exp $ -# $DragonFly: src/share/mk/bsd.sys.mk,v 1.7 2005/07/08 13:05:53 joerg Exp $ +# $DragonFly: src/share/mk/bsd.sys.mk,v 1.8 2006/08/12 05:42:26 swildner Exp $ # # This file contains common settings used for building FreeBSD # sources. @@ -18,10 +18,7 @@ CFLAGS += -Wno-uninitialized CFLAGS += -Werror . endif . if ${WARNS} > 0 -CFLAGS += -Wunknown-pragmas -. if ${CCVER} != gcc2 -CFLAGS += -Wsystem-headers -. endif +CFLAGS += -Wunknown-pragmas -Wsystem-headers .endif . if ${WARNS} > 1 CFLAGS += -Wall @@ -43,9 +40,6 @@ WFORMAT = 1 . if defined(WFORMAT) . if ${WFORMAT} > 0 CFLAGS += -Wno-format-extra-args -. if ${CCVER} == gcc2 -CFLAGS += -Wnon-const-format -. endif . if defined(WARNS_WERROR) && !defined(NO_WERROR) CFLAGS += -Werror . endif diff --git a/sys/boot/i386/boot2/Makefile b/sys/boot/i386/boot2/Makefile index a60ee3b24e..726d17ec46 100644 --- a/sys/boot/i386/boot2/Makefile +++ b/sys/boot/i386/boot2/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/sys/boot/i386/boot2/Makefile,v 1.47 2003/06/26 03:51:57 peter Exp $ -# $DragonFly: src/sys/boot/i386/boot2/Attic/Makefile,v 1.16 2005/09/25 12:43:58 asmodai Exp $ +# $DragonFly: src/sys/boot/i386/boot2/Attic/Makefile,v 1.17 2006/08/12 05:42:26 swildner Exp $ PROG= boot2 NOMAN= @@ -61,31 +61,15 @@ CFLAGS= -elf -ffreestanding -Os -fno-builtin \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ -D__BOOT2_HACK -# -mrtd will produce bad code (missing stack pops) when combined with -# gcc-3.4's (default on) unit-at-a-time optimization. See the code -# generated for 'xputc' as an example. -# -# __USING_MRTD__ is used to conditionalize any assembly modules -# (aka sio_putc()) -# -.if ${CCVER} == "gcc2" -CFLAGS+= -mrtd -MRTDFLAGS=-D__USING_MRTD__ -.else -MRTDFLAGS= -.endif - -# Unfortunately, unit-at-a-time creates other issues as well, as yet +# Unfortunately, unit-at-a-time creates issues as yet # not tracked down, in boot2, so we have to turn it off. Note that # the problem has been narrowed down to the 'boot2' code. The /boot/loader # doesn't seem to have a problem. # -.if ${CCVER} != "gcc2" CFLAGS+= -fno-unit-at-a-time -.endif -# Disable propolice on gcc that support it -.if ${CCVER} == "gcc2" || ${CCVER} == "gcc34" +# Disable propolice on gcc that supports it +.if ${CCVER} == "gcc34" CFLAGS+= -fno-stack-protector .endif @@ -140,8 +124,8 @@ boot2.o: boot2.h sio.o: sio.S ${CC} -DSIOPRT=${BOOT_COMCONSOLE_PORT} -DSIOFMT=${B2SIOFMT} \ - -DSIOSPD=${BOOT_COMCONSOLE_SPEED} ${MRTDFLAGS} \ - ${AFLAGS} ${.IMPSRC} -o ${.TARGET} -c + -DSIOSPD=${BOOT_COMCONSOLE_SPEED} ${AFLAGS} \ + ${.IMPSRC} -o ${.TARGET} -c install: ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ diff --git a/sys/boot/i386/boot2/sio.S b/sys/boot/i386/boot2/sio.S index 0d410ae921..9a804bcd34 100644 --- a/sys/boot/i386/boot2/sio.S +++ b/sys/boot/i386/boot2/sio.S @@ -13,7 +13,7 @@ * purpose. * * $FreeBSD: src/sys/boot/i386/boot2/sio.s,v 1.4 1999/08/28 00:40:02 peter Exp $ - * $DragonFly: src/sys/boot/i386/boot2/Attic/sio.S,v 1.7 2004/09/12 18:37:15 dillon Exp $ + * $DragonFly: src/sys/boot/i386/boot2/Attic/sio.S,v 1.8 2006/08/12 05:42:26 swildner Exp $ */ .set SIO_PRT,SIOPRT # Base port .set SIO_FMT,SIOFMT # 8N1 @@ -80,12 +80,7 @@ sio_putc.1: inb (%dx),%al # Transmitter buffer empty? movb 0x4(%esp,1),%al # Get character subb $0x5,%dl # Transmitter hold reg outb %al,(%dx) # Write character -sio_putc.2: -#ifdef __USING_MRTD__ - ret $0x4 -#else - ret -#endif +sio_putc.2: ret /* * int sio_getc(void) diff --git a/sys/boot/pc32/boot2/Makefile b/sys/boot/pc32/boot2/Makefile index eeb0a4d8e7..d6ef958864 100644 --- a/sys/boot/pc32/boot2/Makefile +++ b/sys/boot/pc32/boot2/Makefile @@ -1,5 +1,5 @@ # $FreeBSD: src/sys/boot/i386/boot2/Makefile,v 1.47 2003/06/26 03:51:57 peter Exp $ -# $DragonFly: src/sys/boot/pc32/boot2/Makefile,v 1.16 2005/09/25 12:43:58 asmodai Exp $ +# $DragonFly: src/sys/boot/pc32/boot2/Makefile,v 1.17 2006/08/12 05:42:26 swildner Exp $ PROG= boot2 NOMAN= @@ -61,31 +61,15 @@ CFLAGS= -elf -ffreestanding -Os -fno-builtin \ -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings \ -D__BOOT2_HACK -# -mrtd will produce bad code (missing stack pops) when combined with -# gcc-3.4's (default on) unit-at-a-time optimization. See the code -# generated for 'xputc' as an example. -# -# __USING_MRTD__ is used to conditionalize any assembly modules -# (aka sio_putc()) -# -.if ${CCVER} == "gcc2" -CFLAGS+= -mrtd -MRTDFLAGS=-D__USING_MRTD__ -.else -MRTDFLAGS= -.endif - -# Unfortunately, unit-at-a-time creates other issues as well, as yet +# Unfortunately, unit-at-a-time creates issues as yet # not tracked down, in boot2, so we have to turn it off. Note that # the problem has been narrowed down to the 'boot2' code. The /boot/loader # doesn't seem to have a problem. # -.if ${CCVER} != "gcc2" CFLAGS+= -fno-unit-at-a-time -.endif -# Disable propolice on gcc that support it -.if ${CCVER} == "gcc2" || ${CCVER} == "gcc34" +# Disable propolice on gcc that supports it +.if ${CCVER} == "gcc34" CFLAGS+= -fno-stack-protector .endif @@ -140,8 +124,8 @@ boot2.o: boot2.h sio.o: sio.S ${CC} -DSIOPRT=${BOOT_COMCONSOLE_PORT} -DSIOFMT=${B2SIOFMT} \ - -DSIOSPD=${BOOT_COMCONSOLE_SPEED} ${MRTDFLAGS} \ - ${AFLAGS} ${.IMPSRC} -o ${.TARGET} -c + -DSIOSPD=${BOOT_COMCONSOLE_SPEED} ${AFLAGS} \ + ${.IMPSRC} -o ${.TARGET} -c install: ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ diff --git a/sys/boot/pc32/boot2/sio.S b/sys/boot/pc32/boot2/sio.S index 7d7b736c16..8270420c99 100644 --- a/sys/boot/pc32/boot2/sio.S +++ b/sys/boot/pc32/boot2/sio.S @@ -13,7 +13,7 @@ * purpose. * * $FreeBSD: src/sys/boot/i386/boot2/sio.s,v 1.4 1999/08/28 00:40:02 peter Exp $ - * $DragonFly: src/sys/boot/pc32/boot2/sio.S,v 1.7 2004/09/12 18:37:15 dillon Exp $ + * $DragonFly: src/sys/boot/pc32/boot2/sio.S,v 1.8 2006/08/12 05:42:26 swildner Exp $ */ .set SIO_PRT,SIOPRT # Base port .set SIO_FMT,SIOFMT # 8N1 @@ -80,12 +80,7 @@ sio_putc.1: inb (%dx),%al # Transmitter buffer empty? movb 0x4(%esp,1),%al # Get character subb $0x5,%dl # Transmitter hold reg outb %al,(%dx) # Write character -sio_putc.2: -#ifdef __USING_MRTD__ - ret $0x4 -#else - ret -#endif +sio_putc.2: ret /* * int sio_getc(void) -- 2.41.0