Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Sep 2006 14:15:35 +0400
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        amd64@FreeBSD.org, current@FreeBSD.org
Subject:   Re: [head tinderbox] failure on amd64/amd64
Message-ID:  <20060928101535.GB4708@rambler-co.ru>
In-Reply-To: <20060928001028.A6D907302F@freebsd-current.sentex.ca>
References:  <20060928001028.A6D907302F@freebsd-current.sentex.ca>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On Wed, Sep 27, 2006 at 08:10:28PM -0400, FreeBSD Tinderbox wrote:
> TB --- 2006-09-27 23:02:01 - starting HEAD tinderbox run for amd64/amd64
[...]
> >>> World build started on Wed Sep 27 23:09:02 UTC 2006
[...]
> >>> stage 4.4: building everything
> [...]
> cc -Os  -fno-guess-branch-probability  -fomit-frame-pointer  -fno-unit-at-a-time  -mno-align-long-strings  -mrtd  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3  -DUFS1_AND_UFS2  -DFLAGS=0x80  -DSIOPRT=0x3f8  -DSIOFMT=0x3  -DSIOSPD=9600  -I/src/sys/boot/i386/boot2/../../common  -I/src/sys/boot/i386/boot2/../btx/lib -I.  -Wall -Waggregate-return -Wbad-function-cast -Wcast-align  -Wmissing-declarations -Wmissing-prototypes -Wnested-externs  -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings -ffreestanding -mpreferred-stack-boundary=2  -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -m32  -c /src/sys/boot/i386/boot2/sio.S
> ld -static -N --gc-sections -nostdlib -m elf_i386_fbsd -Ttext 0x2000 -o boot2.out /obj/amd64/src/sys/boot/i386/boot2/../btx/lib/crt0.o boot2.o sio.o
> objcopy -S -O binary boot2.out boot2.bin
> btxld -v -E 0x2000 -f bin -b /obj/amd64/src/sys/boot/i386/boot2/../btx/btx/btx -l boot2.ldr  -o boot2.ld -P 1 boot2.bin
> kernel: ver=1.01 size=7d0 load=9000 entry=9010 map=16M pgctl=1:1
> client: fmt=bin size=152d text=0 data=0 bss=0 entry=0
> output: fmt=bin size=1e11 text=114 data=1cfd org=0 entry=0
> -17 bytes available
> *** Error code 1
> 
> Stop in /src/sys/boot/i386/boot2.
> *** Error code 1
> 
Should be fixed now.

After John's commit to btx.S, boot2 build on amd64 broke but
not on i386.

I added -march=i386 to CFLAGS when MACHINE_ARCH is amd64, and
got the same object code that i386 would produce (modulo the
timestamps).

Here's the difference between ``cpp -m32 -dM /dev/null'' and
``cpp -m32 -march=i386 -dM /dev/null'' outputs, on amd64:

33a34
> #define __tune_i386__ 1
63d63
< #define __tune_k8__ 1

I.e., by default, -m32 on amd64 still tunes for k8.  I don't
know what others think about it (perhaps it would still be
a good idea to tune for k8 on amd64 even in the boot code),
but for now this looked a good work-around to me, and it
definitely takes less bytes than the k8-tuned version.


Cheers,
-- 
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)

iD8DBQFFG6DHqRfpzJluFF4RAtQeAJ48t7xrcI8OQIWAUggihnw6lZNc/wCcDwS1
9fQuhsZaXYm8pkN538B0AG4=
=M6Zu
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060928101535.GB4708>