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>

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

--neYutvxvOLaeuPCA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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=3D0x80  -DSIOPRT=3D0x3f8  -DSIOFMT=
=3D0x3  -DSIOSPD=3D9600  -I/src/sys/boot/i386/boot2/../../common  -I/src/sy=
s/boot/i386/boot2/../btx/lib -I.  -Wall -Waggregate-return -Wbad-function-c=
ast -Wcast-align  -Wmissing-declarations -Wmissing-prototypes -Wnested-exte=
rns  -Wpointer-arith -Wshadow -Wstrict-prototypes -Wwrite-strings -ffreesta=
nding -mpreferred-stack-boundary=3D2  -mno-mmx -mno-3dnow -mno-sse -mno-sse=
2 -mno-sse3 -m32  -c /src/sys/boot/i386/boot2/sio.S
> ld -static -N --gc-sections -nostdlib -m elf_i386_fbsd -Ttext 0x2000 -o b=
oot2.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/bt=
x/btx -l boot2.ldr  -o boot2.ld -P 1 boot2.bin
> kernel: ver=3D1.01 size=3D7d0 load=3D9000 entry=3D9010 map=3D16M pgctl=3D=
1:1
> client: fmt=3Dbin size=3D152d text=3D0 data=3D0 bss=3D0 entry=3D0
> output: fmt=3Dbin size=3D1e11 text=3D114 data=3D1cfd org=3D0 entry=3D0
> -17 bytes available
> *** Error code 1
>=20
> Stop in /src/sys/boot/i386/boot2.
> *** Error code 1
>=20
Should be fixed now.

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

I added -march=3Di386 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=3Di386 -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,
--=20
Ruslan Ermilov
ru@FreeBSD.org
FreeBSD committer

--neYutvxvOLaeuPCA
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (FreeBSD)

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

--neYutvxvOLaeuPCA--



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