From owner-freebsd-bugs Mon Jan 6 01:40:04 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id BAA23256 for bugs-outgoing; Mon, 6 Jan 1997 01:40:04 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id BAA23243; Mon, 6 Jan 1997 01:40:02 -0800 (PST) Resent-Date: Mon, 6 Jan 1997 01:40:02 -0800 (PST) Resent-Message-Id: <199701060940.BAA23243@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, peter.jeremy@alcatel.com.au Received: from gatekeeper.alcatel.com.au (gatekeeper.alcatel.com.au [203.17.66.1]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id BAA22859 for ; Mon, 6 Jan 1997 01:33:20 -0800 (PST) Received: from 139.188.22.50 (139.188.22.50) by gatekeeper.alcatel.com.au (PMDF V5.0-5 #11861) id <01IDWMA0L9ZK0008KC@gatekeeper.alcatel.com.au> for FreeBSD-gnats-submit@freebsd.org; Mon, 06 Jan 1997 20:31:58 +1000 Received: from vk2pj.alcatel.com.au (vk2pj.alcatel.com.au) by cbd.alcatel.com.au (PMDF V5.0-5 #9241) id <01IDWM8VV87K9QVITG@cbd.alcatel.com.au> for FreeBSD-gnats-submit@freebsd.org; Mon, 06 Jan 1997 20:31:07 +1100 Received: (from peter@localhost) by vk2pj.alcatel.com.au (8.7.5/8.7.3) id UAA27078; Mon, 06 Jan 1997 20:32:27 +1100 (EST) Message-Id: <199701060932.UAA27078@vk2pj.alcatel.com.au> Date: Mon, 06 Jan 1997 20:32:27 +1100 (EST) From: peter.jeremy@alcatel.com.au Reply-To: peter.jeremy@alcatel.com.au To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: i386/2381: gcc built with i486 default can't compile biosboot files Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 2381 >Category: i386 >Synopsis: gcc built with i486 default can't compile biosboot files >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jan 6 01:40:01 PST 1997 >Last-Modified: >Originator: Peter Jeremy >Organization: Peter Jeremy (VK2PJ) peter.jeremy@alcatel.com.au Alcatel Australia Limited 41 Mandible St Phone: +61 2 9690 5019 ALEXANDRIA NSW 2015 Fax: +61 2 9690 5247 >Release: FreeBSD 2.1-STABLE i386 >Environment: gcc built with i486 as default target CPU. >Description: When gcc is built with the i486 as the default target, code alignment is increased to match the i486 cache. This has the side-effect of increasing code size. In most cases, this is unimportant, however the BIOS bootstrap programs are restricted in size and the increased code size causes the stage 2 bootstrap to exceed its allowable size. >How-To-Repeat: # cd /sys/i386/boot/biosboot # make (or make "CC=cc -m486") ... cp -p boot boot.strip strip boot.strip size boot.strip text data bss dec hex 8048 112 51132 59292 e79c dd if=boot.strip of=boot.nohdr ibs=32 skip=1 obs=1024b 255+0 records in 0+1 records out 8160 bytes transferred in 1 secs (8160 bytes/sec) ls -l boot.nohdr -rw-rw-r-- 1 root wheel 8160 Jan 4 13:10 boot.nohdr dd if=boot.nohdr of=boot1 bs=512 count=1 1+0 records in 1+0 records out 512 bytes transferred in 1 secs (512 bytes/sec) dd if=boot.nohdr of=boot2 bs=512 skip=1 14+1 records in 14+1 records out 7648 bytes transferred in 1 secs (7648 bytes/sec) *** Boot2 is too BIG *** *** Error code 2 Stop. # >Fix: Force gcc to assume an i386 (and hence align to words rather than cache lines) when building the BIOS bootstraps: *** /cdrom/usr/src/sys/i386/boot/biosboot/Makefile Mon Jul 1 12:35:36 1996 --- /usr/src/sys/i386/boot/biosboot/Makefile Sun Dec 15 09:53:24 1996 *************** *** 11,16 **** --- 11,17 ---- CFLAGS= -O2 -DDO_BAD144 -DBOOTWAIT=${BOOTWAIT} -DCOMCONSOLE=0x3F8 CFLAGS+= -DBOOTSEG=${BOOTSEG} -DBOOTSTACK=${BOOTSTACK} CFLAGS+= -I${.CURDIR} -I${.CURDIR}/../.. + CFLAGS+= -m386 # Reduce alignment requirements so it fits # force usage of serial console instead of keyboard probing #CFLAGS+= -DFORCE_COMCONSOLE >Audit-Trail: >Unformatted: