Date: Mon, 06 Jan 1997 20:32:27 +1100 (EST) From: peter.jeremy@alcatel.com.au To: FreeBSD-gnats-submit@freebsd.org Subject: i386/2381: gcc built with i486 default can't compile biosboot files Message-ID: <199701060932.UAA27078@vk2pj.alcatel.com.au> Resent-Message-ID: <199701060940.BAA23243@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701060932.UAA27078>